#! for GHC?

Hampus Ram d00ram at dtek.chalmers.se
Mon Mar 8 13:53:33 EST 2004

On Mon, Mar 08 2004, Simon Marlow wrote:
> However, I just tried it on a recent Linux (RedHat 9) and it seems to
> accept nested #! scripts.

It doesn't work for me though (it tries to run the first script (the
Haskell module) with the interpreter for the second script (bash).
Anyway, one cannot expect it to work for everyone (esp. since shells
differ and OS:es too).

However it should be quite simple to include a program similar to the
attached one to provide "runhugs" capability.


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

"Det är aldrig försent att ge upp"
-------------- next part --------------
#include <cstdlib>
#include <string>

int main(int argc, char **argv)
    if (argc != 3)

    std::string cmd(argv[1]);

    cmd += " -e Main.main ";
    cmd += argv[2];


    return 0;

More information about the Glasgow-haskell-users mailing list