GithubHelp home page GithubHelp logo

Comments (24)

rikvdkleij avatar rikvdkleij commented on May 18, 2024

I can not reproduce this issue on Ubuntu. Which OS are you using?

Do you normally get type info in Haskell files?

from intellij-haskell.

KasperJanssens avatar KasperJanssens commented on May 18, 2024

Ubuntu 14.04. No, it might be that I didn't get your plugin running correctly yet. Although if I hover my cursor over another expression it seems not to show this error message at the very least. The ghc-modi version is 5.1.0.2 by the way. Is there some way I can verify whether I didn't activate something in the IDE or so?

from intellij-haskell.

rikvdkleij avatar rikvdkleij commented on May 18, 2024

Checks paths in Settings\Haskell

Did you create sandbox for your Haskell project? If not, I advice you to create sandbox.

I used latest version of ghc-mod (5.2.1.1) but that can not be the problem.

from intellij-haskell.

rikvdkleij avatar rikvdkleij commented on May 18, 2024

Btw, can you start ghc-modi in root directory of your project?

from intellij-haskell.

KasperJanssens avatar KasperJanssens commented on May 18, 2024

Yes, I can, like I said if I throw the commands that are reported as
failing into ghc-modi I get an answer from ghc-modi. Sometimes the answer
is that it cannot find something, but it doesn't time out like the error
message suggests.

Might it have something to do with subfolders? I have a subfolder in my
project and if I comment out the import B.C in my module A it stops
complaining about the ghc-modi stuff, seems to work (well, I get a warning
that it cannot find source code for System.Random in this case and to add
the source code of the package to Project Settings/LIbraries, I just point
it to my cabal sandbox to fix this?)

2014-11-13 17:33 GMT+01:00 Rik [email protected]:

Btw, can you start ghc-modi in root of your project?


Reply to this email directly or view it on GitHub
#2 (comment)
.

from intellij-haskell.

KasperJanssens avatar KasperJanssens commented on May 18, 2024

Can it have something to do with the fact that my ghc-mod is installed in
my ~/.cabal and the other stuff is in my cabal-sandbox in my project folder?

2014-11-14 9:12 GMT+01:00 Kasper Janssens <[email protected]

:

Yes, I can, like I said if I throw the commands that are reported as
failing into ghc-modi I get an answer from ghc-modi. Sometimes the answer
is that it cannot find something, but it doesn't time out like the error
message suggests.

Might it have something to do with subfolders? I have a subfolder in my
project and if I comment out the import B.C in my module A it stops
complaining about the ghc-modi stuff, seems to work (well, I get a warning
that it cannot find source code for System.Random in this case and to add
the source code of the package to Project Settings/LIbraries, I just point
it to my cabal sandbox to fix this?)

2014-11-13 17:33 GMT+01:00 Rik [email protected]:

Btw, can you start ghc-modi in root of your project?


Reply to this email directly or view it on GitHub
#2 (comment)
.

from intellij-haskell.

rikvdkleij avatar rikvdkleij commented on May 18, 2024

Is your project on github? So I can try to reproduce issue?

About the warning. Yes, add source code directory to Project Settings/Libraries. Tip: to see library source code in navigation window, put source codes of libraries inside project root.

from intellij-haskell.

rikvdkleij avatar rikvdkleij commented on May 18, 2024

I have ghc-mod and ghc-modi in ~/cabal/bin.

In Settings/Haskell I have set paths to ghc-mod and ghc-modi.

from intellij-haskell.

KasperJanssens avatar KasperJanssens commented on May 18, 2024

jip, it's on my github, it's a toy project
:[email protected]:KasperJanssens/talisman-haskell.git
to checkout some haskell stuff like lenses and so on, do a checkout of the
Board branch (that one has a cabal file :-)).

About adding source, it's for example complaining about the source to
system.random, how do I best go about putting the source of this library in
my project root? Next to that, IntelliJ only show my the possibility to add
jar files or stuff from maven in Project Settings/Libraries, expected or a
sign that the plugin didn't get correctly installed?

Concerning ghc-mod and ghc-modi, same thing for me. I now tried with the
latest version of ghc-mod as well, doesn't change anything.

Thanks for the responsiveness up until now already, I would really like to
use intellij for my haskell development and haven't managed to get one
haskell plugin working in a decent way, all my hope is on your plugin ;-).

2014-11-14 9:39 GMT+01:00 Rik [email protected]:

I have ghc-mod and ghc-modi in ~/cabal/bin.

In Settings/Haskell I have set paths to ghc-mod and ghc-modi.


Reply to this email directly or view it on GitHub
#2 (comment)
.

from intellij-haskell.

rikvdkleij avatar rikvdkleij commented on May 18, 2024

About source code. What I do is:

  • Create in project root directory lib (or other name)
  • Inside lib do: cabal get random
  • Go to Projects settings/Libraries.
  • New project library
  • Add random directory (as sources)

No problem :-)

from intellij-haskell.

rikvdkleij avatar rikvdkleij commented on May 18, 2024

Which version of IntelliJ are you using?

from intellij-haskell.

KasperJanssens avatar KasperJanssens commented on May 18, 2024

13.1.5. Wrong version? (that would be very very very silly of me).

2014-11-14 9:57 GMT+01:00 Rik [email protected]:

Which version of IntelliJ are you using?


Reply to this email directly or view it on GitHub
#2 (comment)
.

from intellij-haskell.

rikvdkleij avatar rikvdkleij commented on May 18, 2024

13.1.5 is okay. I asked question because 14 is just released.

from intellij-haskell.

rikvdkleij avatar rikvdkleij commented on May 18, 2024

I found the problem. Future time-out was too short. Because your project has more dependencies than projects I used, I did not notice this problem (ghc-modi is a slower in startup).

I will release new version today.

Thanks for reporting.

from intellij-haskell.

KasperJanssens avatar KasperJanssens commented on May 18, 2024

No probs, thanks for the help. I'll try to keep hammering on your plugin
from within my little pet project, you'll hear more from me most likely,
I'm extremely demanding on an IDE ;-P. Is there somewhere a list of
intellij-shortcuts that your plugin supports? I can see lots of stuff
that's supported, but I can't for example seem to find the inferred type
signature, doesn't show up when I hover, I don't seem to find a shortcut
that shows the inferred type, ... Being blind?

2014-11-14 11:10 GMT+01:00 Rik [email protected]:

I found the problem. Future time-out was too short. Because your project
has more dependencies than projects I used, I did not notice this problem
(ghc-modi is a slower in startup).

I will release new version today.

Thanks for reporting.


Reply to this email directly or view it on GitHub
#2 (comment)
.

from intellij-haskell.

rikvdkleij avatar rikvdkleij commented on May 18, 2024

Alt+Equals shows type

In View (of menu bar) you can see all actions (with short-cuts).

Btw, if you do not define type signature at top level, you can use Alt+Enter to put type signature above definition (derived by ghc-modi).

from intellij-haskell.

rikvdkleij avatar rikvdkleij commented on May 18, 2024

You also select expression and ask for type.

from intellij-haskell.

rikvdkleij avatar rikvdkleij commented on May 18, 2024

You can try version 0.4. It's already in Jetbrains repo and approved.

from intellij-haskell.

KasperJanssens avatar KasperJanssens commented on May 18, 2024

Fantastic, I'll try as soon as possible!

2014-11-14 11:48 GMT+01:00 Rik [email protected]:

You can try version 0.4. It's already in Jetbrains repo and approved.


Reply to this email directly or view it on GitHub
#2 (comment)
.

from intellij-haskell.

KasperJanssens avatar KasperJanssens commented on May 18, 2024

Works, thanks!

from intellij-haskell.

KasperJanssens avatar KasperJanssens commented on May 18, 2024

Rik,

I'm going to abuse this (closed) issue to ask a question. First of all, I'm very happy with the plugin, it works nice and fast, I guess I didn't discover everything yet, but navigating into the libraries and getting type info and such works really nicely. However, is there a way to run tests from within IntelliJ? I know this borders on cabal integration, but just asking. Also, is there a way to open modules by starting to type their name (like Ctrl-N for Java)? If these features aren't there, are they planned?
I'm open to start creating pull requests, but I haven't really made an intellij plugin yet (did some scala already, so the language should be okay), and I don't really know where to start in your source code if I would want to change functionality.

Kasper

from intellij-haskell.

rikvdkleij avatar rikvdkleij commented on May 18, 2024

No, at the moment I do not have plans to run tests in IntelliJ. I do not see a reason for that because if you use hspec (http://hspec.github.io/), you get already nice output in terminal.

To open a module, I use open file with (Ctrl+Shift+N). If you exclude directories like .cabal-sandbox,dist and so on, this way works fine for me because name of module is name of file. So no special feature planned for that.

You can checkout plugin code and try to understand it. If you have question let me know. Maybe we should use gtalk for helping you.
Take a look at:
http://confluence.jetbrains.com/display/IDEADEV/Developing+Custom+Language+Plugins+for+IntelliJ+IDEA
http://confluence.jetbrains.com/display/IntelliJIDEA/Custom+Language+Support

from intellij-haskell.

KasperJanssens avatar KasperJanssens commented on May 18, 2024

Ah, indeed, thanks for the tip about Ctrl Shift N, satisfies my needs indeed.

About the tests, you then use the terminal to talk to cabal/the compiled test binary and run tests like that, I take it? Okay, also possible indeed.

Oh, by the way, (I know I should stop hijacking this issue, it's the last thing), is there a place where you can see all the build issues? Crtl-F9 shows me build problems in the file I have open, but I don't seem to find a place where all the build issues are gathered.

from intellij-haskell.

rikvdkleij avatar rikvdkleij commented on May 18, 2024

No, because I do not build Haskell code inside IntelliJ. Could be a new feature :-) Normally I just do cabal build in terminal.

from intellij-haskell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.