atom-haskell-archive / haskell-ghc-mod

haskell-ghc-mod atom package
https://atom.io/packages/haskell-ghc-mod
MIT License
69 stars 20 forks source link

Does not work with ghc-mod 5.3.0.0 #48

Closed zsszatmari closed 9 years ago

zsszatmari commented 9 years ago

I have ghc-mod 5.3.0.0 on OS X. I get errors on launch:

ghc-mod runs perfectly fine when started from Terminal.app, it is installed by cabal, and is on path. I know that it is specifically stated that ghc-mod 5.2.x is supported, but I still hope that this can be fixed. I cannot downgrade because it seem to necessitate a downgrade of ghc itself.

Thank You!

lierdakil commented 9 years ago

Disclamer: ghc-mod 5.3.0.0 has a couple problems, which I can't solve on my end, but it should work in some cases (well, actually most cases one would care about)

Please try starting Atom from terminal and see if it helps.

zsszatmari commented 9 years ago

Yeah, when starting from command line, the error is gone!

lierdakil commented 9 years ago

Okay. This is caused by how OSX determines environment when starting from Finder. Long story short, it doesn't inherit those from your shell. That's what 'Additional Path Directories' setting for in haskell-ghc-mod settings. So add path to cabal's bin directory there -- then it should work even if you start Atom from Finder or wherever. Does this make sense to you?

zsszatmari commented 9 years ago

Sure, it works this way, big thanks!

zsszatmari commented 9 years ago

Is there a way to add a directory to $PATH so that every app sees it regardless of how it was started? It seems ~/.profile is not the way to go then.

lierdakil commented 9 years ago

Sorry, Linux user here. Quick google search lead me to this stackexchange question. I have no idea if it actually works, but I hope it helps.

zsszatmari commented 9 years ago

Oh, okay :-) :+1: