#! for GHC?

Hampus Ram d00ram at dtek.chalmers.se
Mon Mar 8 12:20:08 EST 2004

On Sat, Mar 06 2004, Dean Herington wrote:
> Can GHC be invoked somehow via the #! mechanism?  Put another way, is 
> there a GHC analogue to runhugs?

Well, ghc now has an -e flag to evaluate stuff directly from the prompt 
(e.g. ghc -e Main.main Main.hs). But you can't execute shell-scripts
from a shell-script with #! so you can't just put it in your Haskell
module. Neither can you use the binary directly since you can only give
one argument to programs executed with #! and you need both -e and -B.


Homepage: http://www.dtek.chalmers.se/~d00ram
E-mail: d00ram at dtek.chalmers.se

"Det är aldrig försent att ge upp"

More information about the Glasgow-haskell-users mailing list