4

I use ghc with TemplateHaskell. Somebody told me, that ghc itself uses ghci during compilation time to implement TemplateHaskell. Is there a way to pass parameters to ghci which may differ from the parameters used in ghc?

Reason for my question: I always get an error message when I use -dynamic with ghc during the phase TemplateHaskell is executed. So I want to try to pass -static to the ghci interpreter while still using -dynamic for ghc.

Stephan Kulla
  • 4,739
  • 3
  • 26
  • 35
  • What error messages do you get exactly? We need more information in order to debug. I don't think solving it the way you propose is necessary, if you have specific error messages regarding to `-dynamic`, there should be specific solutions. – Uli Köhler Mar 03 '14 at 13:46
  • I fixed my bug in the meanwhile by updating cabal to 1.18. Here I am more interested in the possibility to pass arguments to ghci. Maybe it is also interesting for others... – Stephan Kulla Mar 03 '14 at 14:29
  • 1
    I think you're overrating the way GHCi is used in TH. As far as I know, GHCi itself is not used, but mainly the GHCi runtime linker component. If that is the case (see [here](https://www.haskell.org/ghc/docs/7.6.3/html/users_guide/template-haskell.html), especially 7.14.4) I can't see any way how it could be possible to pass any parameters, as there is nothing running that you could pass parameters to. – Uli Köhler Mar 03 '14 at 14:34

0 Answers0