using haskell as a shell language

Hal Daume hdaume@ISI.EDU
Tue, 6 Nov 2001 00:48:12 GMT


As we all know well, we can write scripts like:

#!/usr/bin/perl -w
print "foo"

and whatnot.  i'd like to be able to write something like:

main = do putStrLn "foo"

and whatnot, even if I have to explicitely say something like:

module Main(main) where
main = do putStrLn "foo"

it doesn't really matter.  but i'd like to be able to write something
like this, chmod +x it and be able to execute it, interpreted.

i have *no* idea what the semantics of #!... is in shell scripts, so i
don't know if it's easy or hard to hack something like this together,
but if anyone has any pointer (or if anyone's done something like this
before), please please please let me know.


 - hal

Hal Daume III

 "Computer science is no more about computers    |
  than astronomy is about telescopes." -Dijkstra |