What's the best way to iterate over all the modules (files) in a given package? Concretely, suppose I have
- an executable called "runThis"
- a cabal package P with files F1.hs, F2.hs, ..., Fn.hs
Whats the easiest way to execute:
runThis F1.hs
runThis F2.hs
...
runThis Fn.hs
?
I thought I might try --with-compiler but that fails with
cabal: The program ghc version >=6.4 is required but the version of runThis
(The other option looks like tweaking the Setup.lhs -- but ideally I'd like to hijack the build process and use "runThis" instead of, say, ghc)
Thanks!
runThis
? Would something like$ for file in *.hs; do runThis $file; done;
do what you want? - Daniel Fischer