Which ghc binary does ghc-mod use?

Hi, I am a happy user of Emacs with ghc-mod for Haskell programming. There is just one issue I've run into: I have multiple versions of GHC installed on my machine. Now, ghc-mod seems to use the GHC binary that was used to compile ghc-mod itself, but that is not the version I want it to use for syntax checking, etc. In fact, I want to be able to switch ghc-mod between different GHC binaries depending on which project I'm working on, but I have no idea how to do that. Is there maybe some Elisp guru reading this list who can help me out? Can I somehow configure which GHC binary ghc-mod uses? Take care, Peter

On 24 July 2012 04:06, Peter Simons
Hi,
I am a happy user of Emacs with ghc-mod for Haskell programming. There is just one issue I've run into: I have multiple versions of GHC installed on my machine. Now, ghc-mod seems to use the GHC binary that was used to compile ghc-mod itself, but that is not the version I want it to use for syntax checking, etc. In fact, I want to be able to switch ghc-mod between different GHC binaries depending on which project I'm working on, but I have no idea how to do that.
Is there maybe some Elisp guru reading this list who can help me out? Can I somehow configure which GHC binary ghc-mod uses?
Just to get the potentially obvious out of the way: are you sure it's not a matter of which ghc it finds first in the PATH? It might even be using the internal emacs PATH: (getenv "PATH")
Take care, Peter
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com

On Mon, Jul 23, 2012 at 2:06 PM, Peter Simons
I am a happy user of Emacs with ghc-mod for Haskell programming. There is just one issue I've run into: I have multiple versions of GHC installed on my machine. Now, ghc-mod seems to use the GHC binary that was used to compile ghc-mod itself, but that is not the version I want it to use for syntax
I think you'd have to install a separate ghc-mod binary for each one, then, as it looks to me like ghc-mod is using ghc-as-a-library. That is, it actually has the compiler linked into itself. -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

Hi Brandon,
I think you'd have to install a separate ghc-mod binary for each one, then, as it looks to me like ghc-mod is using ghc-as-a-library. That is, it actually has the compiler linked into itself.
I see, thank you for the clarification. One more thing: I would like to configure search paths for extra libraries that ghc-mod won't find without help. Does anyone know a way to configure the set of flags that's being passed to GHC/ghc-mod? Take care, Peter
participants (3)
-
Brandon Allbery
-
Ivan Lazar Miljenovic
-
Peter Simons