I compile the programs, instead of trying to run them as scripts. Is there any reason you prefer to interpret the scripts? I'm not saying it's not a legitimate thing to do, just wondering why you prefer to do it that way.
Seth Kurtzberg On Wed, 14 Mar 2007 19:31:55 +0000 Frederik Eaton <[EMAIL PROTECTED]> wrote: > Hello, > > What is the proper technique for creating a Haskell script on a Unix > system? > > e.g. with Perl I do > > #!/bin/sh > echo DEFANGED.348224 > exit > #!/usr/bin/env perl > print "hello world\n"; > > or > > #!/usr/bin/perl > print "hello world\n"; > > I tried > > $ cat test > #!/usr/bin/env runhaskell > module Main where > main = do > putStrLn "hello world" > > But that doesn't work: > > $ ./test > Warning: ignoring unrecognised input `./test' > > <interactive>:1:73: > Failed to load interface for `Main': > Use -v to see a list of the files searched for. > > When I use "runghc" I get the same error. > > If I change the first line to "-x hs" then the error is: > > ghc-6.6: unrecognised flags: -x hs > Usage: For basic information, try the `--help' option. > > because the #! mechanism only allows a single argument. Thoughts? > > Thanks, > > Frederik > > -- > http://ofb.net/~frederik/ > _______________________________________________ > Glasgow-haskell-users mailing list > [email protected] > http://www.haskell.org/mailman/listinfo/glasgow-haskell-users > _______________________________________________ Glasgow-haskell-users mailing list [email protected] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
