-
-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ghc-modi integration #2
Comments
I can not reproduce this issue on Ubuntu. Which OS are you using? Do you normally get type info in Haskell files? |
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? |
Checks paths in 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. |
Btw, can you start ghc-modi in root directory of your project? |
Yes, I can, like I said if I throw the commands that are reported as Might it have something to do with subfolders? I have a subfolder in my 2014-11-13 17:33 GMT+01:00 Rik notifications@github.com:
|
Can it have something to do with the fact that my ghc-mod is installed in 2014-11-14 9:12 GMT+01:00 Kasper Janssens <kasper.janssens.android@gmail.com
|
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. |
I have ghc-mod and ghc-modi in ~/cabal/bin. In Settings/Haskell I have set paths to ghc-mod and ghc-modi. |
jip, it's on my github, it's a toy project About adding source, it's for example complaining about the source to Concerning ghc-mod and ghc-modi, same thing for me. I now tried with the Thanks for the responsiveness up until now already, I would really like to 2014-11-14 9:39 GMT+01:00 Rik notifications@github.com:
|
About source code. What I do is:
No problem :-) |
Which version of IntelliJ are you using? |
13.1.5. Wrong version? (that would be very very very silly of me). 2014-11-14 9:57 GMT+01:00 Rik notifications@github.com:
|
13.1.5 is okay. I asked question because 14 is just released. |
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. |
No probs, thanks for the help. I'll try to keep hammering on your plugin 2014-11-14 11:10 GMT+01:00 Rik notifications@github.com:
|
Alt+Equals shows type In 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). |
You also select expression and ask for type. |
You can try version 0.4. It's already in Jetbrains repo and approved. |
Fantastic, I'll try as soon as possible! 2014-11-14 11:48 GMT+01:00 Rik notifications@github.com:
|
Works, thanks! |
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? Kasper |
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. |
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. |
No, because I do not build Haskell code inside IntelliJ. Could be a new feature :-) Normally I just do |
I think there's an issue with the way you interact with ghc-modi. For example, if I create a module, called A, and I unfortunately put my cursor in the first line, the same line as mentions
module A where
you seem to call ghc-modi with the instruction
info A.hs A
Ghc-modi will then answer 'Cannot find info' (tried this directly on ghc-modi, command line) to inform the user that it didn't find this information. However, the plugin interprets this 'cannot find info' as if there's something wrong with ghc-modi, it seems to get interpreted as a Future that timed out and ghc-modi will not be called for 5 seconds. (Error in communication with ghc-modi: Futures timed out after [1 second]. Check if GHC SDK is set and ghc-modi is okay. ghc-modi will not be called for 5 seconds). This makes the plugin not having any type information anymore for the next 5s.
The text was updated successfully, but these errors were encountered: