[Haskell-cafe] -f flag to runghc broken,
or is it just me? (because trying switch
elegantly between ghc 6.6 and ghc 6.7)
thomas.hartman at db.com
Wed Aug 22 13:38:39 EDT 2007
I'm doing a lot of switching between ghc 6.6 and ghc 6.7 on the same
computer. I install modules using
$ runghc Setup.hs configure
I would like to specify which version of ghc should be getting the package
installed via the f flag to runghc
runghc: syntax: runghc [-f GHCPATH] [GHC-ARGS] FILE ARG...
but this appears to be broken.
arghandling-nice.hs: args length does not equal 3. args: : 
usage example: $ runghc arghandling-nice.hs firstarg secondarg thirdarg
without the flag works but
-f /usr/local/bin/ghc-6.6.1 arghandling-nice.hs
-rwxr-xr-x 1 root root 151 2007-06-16 20:22 /usr/local/bin/ghc-6.6.1
In general I don't like using runghc because it doesn't appear to be
documented anywhere except that (incorrect?) usage message. Is there a way
to do a package install just using ghc -e? (Sure I could compile, but it
helps me sometimes if I can not, a la runghc.) At any rate I couldn't
figure out how to pass arguments to main via ghc -e.
main = do args <- getArgs
let usagemsg = "usage example: $ runghc arghandling-nice.hs
firstarg secondarg thirdarg"
case args of
[first,second,third] -> process first second third
_ -> error $ "args length does not equal 3.
args: : " ++ ( show args ) ++ "\n" ++ usagemsg
process a b c = print $ unwords [a,b,c]
Thanks for anybody who can help me out with this.
This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe