Add support for haskell preprocessors
wdanilo opened this issue · 5 comments
Hello! Is it possible to allow using helium with custom GHC preprocessors (using ghci -F -pgmF flag)?
Helium relies on ghc-mod (and thus the GHC API) for almost all Haskell introspection, so it should be fine as long as you add a pragma to the source file.
eg
{-# OPTIONS_GHC -F -pgmF s/foo.sh #-}
Does this work for you?
I do not want to add this pragma - I want to supply preprocessors using ghc flags - are we able somehow to add support for it? (Eventually modyfying all files adding on tope appropriate pragmas together with LINE pragma - in case some errors occur - to know exactlywhich line it was before the change)
We could certainly add a config option for extra options to pass to ghc-mod. This would not be a per-project setting, though: these extra options would be passed to ghc-mod for all Haskell code you edit.
Would that work for you?
Yes, definitely - it would work great! :)
Try this out: 2a71699