I'd like to update the search path of a Haskell module, using the OPTIONS_GHC pragma.
>From the documentation[0], OPTIONS_GHC allows you to set dynamic flags, which `-i` appears to be.[1]
Here's a quick demo of what I believe _should_ work, but doesn't:
A.hs:
{-# OPTIONS_GHC -isrc #-}
import B
main = print b
src/B.hs:
module B where
b = "!"
`ghc A.hs` fails, but (of course) `ghc -isrc A.hs` succeeds. Is there a way to get this to work? Is the current behavior intended? Is what I want a misfeature? (E.g. there are security implications?)
Thanks,
Tom
[0] https://downloads.haskell.org/ghc/latest/docs/users_guide/using.html#command-line-options-in-source-files
[1] https://downloads.haskell.org/ghc/latest/docs/users_guide/flags.html#finding-imports
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.