
8 Dec
2013
8 Dec
'13
3:37 p.m.
On Sun, Dec 8, 2013 at 7:50 PM, Peter Selinger
thanks for your reply! So say my package directory contains two files:
Test.hs PreProc.hs
What you are suggesting is:
ghc Test.hs -F -pgmF ./PreProc
However, this gives the error message:
ghc: could not execute: ./PreProc
And indeed, while GHC is smart enough to automatically run a preprocessor, it is not smart enough to automatically *compile* the preprocessor. So it needs to be compiled beforehand, which would be Cabal's job.
Not per se. You could try making it executable, and prepending a line like: #!/usr/bin/env runhaskell That way you can run your preprocessor like a script, without compiling it. Erik