Re: invoking a Haskell script without a .hs extension

2008-08-18 Thread Bertram Felgenhauer
Paul Jarc wrote: I have a Haskell script called notify, without a .hs extension, which causes some problems. (I'm using ghc 6.8.3.) First attempt: runhaskell notify Without the .hs extension, ghc doesn't know it's a Haskell script, and so I get Could not find module `notify'. Maybe

Re: invoking a Haskell script without a .hs extension

2008-08-18 Thread Paul Jarc
Bertram Felgenhauer [EMAIL PROTECTED] wrote: Paul Jarc wrote: Maybe runhaskell should automatically add -x hs to the ghc command? The 6.9 branch version of runghc does that, actually. Ah, that's good news. There's an undocumented runghc flag which I found by looking at the source code,

Re: invoking a Haskell script without a .hs extension

2008-08-18 Thread Brandon S. Allbery KF8NH
On 2008 Aug 17, at 23:45, Paul Jarc wrote: A somewhat related issue: I'd like to avoid hard-coding the path to runhaskell or ghc in the #! line. Instead, I'd like to use #!/bin/sh, and have the shell find runhaskell or ghc in $PATH. This means the #! /usr/bin/env runhaskell ... -- brandon

invoking a Haskell script without a .hs extension

2008-08-17 Thread Paul Jarc
I have a Haskell script called notify, without a .hs extension, which causes some problems. (I'm using ghc 6.8.3.) First attempt: runhaskell notify Without the .hs extension, ghc doesn't know it's a Haskell script, and so I get Could not find module `notify'. Maybe runhaskell should

Re: invoking a Haskell script without a .hs extension

2008-08-17 Thread Paul Jarc
Philip Weaver [EMAIL PROTECTED] 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