GithubHelp home page GithubHelp logo

Stream closed about intellij-haskell HOT 9 CLOSED

rikvdkleij avatar rikvdkleij commented on May 20, 2024
Stream closed

from intellij-haskell.

Comments (9)

rikvdkleij avatar rikvdkleij commented on May 20, 2024

Check if you can call ghc-mod from command line in root of your Haskell project

from intellij-haskell.

ParkinWu avatar ParkinWu commented on May 20, 2024

Thank you for your reply,I have tried this ghc-mod command in root of my project
pzwus-imac:yesodtest pzwu$ /Users/pzwu/.cabal/bin/ghc-mod info /Users/pzwu/outwork/haskell/yesodtest/app/Main.hs someFunc
and I got this, does that mean my ghc-mod configuration is correct?
someFunc :: IO () -- Defined at src/Lib.hs:6:1

from intellij-haskell.

rikvdkleij avatar rikvdkleij commented on May 20, 2024

Yes, can you also try to run:
ghc-mod legacy-interactive
in root of your Haskell project.

from intellij-haskell.

marcgrr avatar marcgrr commented on May 20, 2024

I think I am having the same problem.

My config is:

ghc-mod: /Users/marc/Library/Haskell/bin/ghc-mod
haskell-docs: /Users/marc/Library/Haskell/bin/haskell-docs
hlint: /Users/marc/Library/Haskell/bin/hlint
cabal: /Users/marc/Library/Haskell/bin/cabal

I have a simple file:

main :: IO ()
main = putStrLn "hello world!"

When I open it, I get these errors in my intellij:

8:03:06 PM Shutting down ghc-mod for project fbm-shirt.
8:03:06 PM Error while shutting down ghc-mod for project fbm-shirt. Error message: Stream closed
8:03:08 PM Starting ghc-mod in interactive mode for project fbm-shirt.
8:03:13 PM Error in communication with ghc-mod: Futures timed out after [5 seconds]. Check if GHC SDK is set and ghc-mod is okay. ghc-mod will not be called for 5 seconds. Command was: check /Users/marc/side_projects/fbm-shirt/app/Main.hs
8:03:18 PM Error in communication with ghc-mod: Stream closed. Check if GHC SDK is set and ghc-mod is okay. ghc-mod will not be called for 5 seconds. Command was: info /Users/marc/side_projects/fbm-shirt/app/Main.hs main
8:03:37 PM Error in communication with ghc-mod: Stream closed. Check if GHC SDK is set and ghc-mod is okay. ghc-mod will not be called for 5 seconds. Command was: info /Users/marc/side_projects/fbm-shirt/app/Main.hs main

I can run these commands in the root directory of my project:

➜  fbm-shirt  ghc-mod info /Users/marc/side_projects/fbm-shirt/app/Main.hs main
main :: IO ()   -- Defined at app/Main.hs:2:1
➜  fbm-shirt

And I can also do it with ghc-mod legacy-interactive:

➜  fbm-shirt  ghc-mod legacy-interactive
info /Users/marc/side_projects/fbm-shirt/app/Main.hs main
main :: IO ()   -- Defined at app/Main.hs:2:1
OK

from intellij-haskell.

rikvdkleij avatar rikvdkleij commented on May 20, 2024

@ParkinWu @marcgrr Do you use OSX?

from intellij-haskell.

marcgrr avatar marcgrr commented on May 20, 2024

I do use OSX. I think I have just fixed mine by building the plugin from the latest commit on master! Perhaps one of the latest commits fixes something.

Thanks!!

from intellij-haskell.

rikvdkleij avatar rikvdkleij commented on May 20, 2024

Yes, I just fixed a problem especially for OSX. PATH has to passed explicitly when running command line programs from IntelliJ

from intellij-haskell.

rikvdkleij avatar rikvdkleij commented on May 20, 2024

Btw, Cabal is replaced by Stack on master

Also important if you want to download all used packages its source code.

from intellij-haskell.

rikvdkleij avatar rikvdkleij commented on May 20, 2024

Should be fixed in latest release

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.