
22 Mar
2006
22 Mar
'06
12:12 p.m.
Donald Bruce Stewart wrote:
Well, I know this works:
$ cat A.lhs #!/usr/bin/env runhaskell > main = putStrLn "gotcha!"
$ ./A.lhs gotcha!
But for files with no .hs or .lhs extension? Anyone know of a trick?
GHC 6.6 will allow this, because we added the -x flag (works just like gcc's -x flag). eg. "ghc -x hs foo.wibble" will interpret foo.wibble as a .hs file. I have an uncommitted patch for runghc that uses -x, I need to test & commit it. Cheers, Simon