invoking a Haskell script without a .hs extension

Paul Jarc prj at
Mon Aug 18 01:53:06 EDT 2008

"Philip Weaver" <philip.weaver at> wrote:
> I'll let someone more knowledgeable address the other issues, but as for the
> argument to #!, I believe you could/should use "#!/usr/bin/env runhaskell".

That would work if runhaskell automatically supplied -x hs (passing
multiple arguments on the #! line doesn't work portably), and if no
other arguments to runhaskell are needed, and if there's no need/want
to do anything else in sh before re-executing with runhaskell.  Using
#!/bin/sh gives more flexibility, so I'd like to find a better way to
do that.


More information about the Glasgow-haskell-users mailing list