using haskell as a shell language

D. Tweed tweed@compsci.bristol.ac.uk
Tue, 6 Nov 2001 01:01:58 +0000 (GMT)


On Tue, 6 Nov 2001, Hal Daume wrote:

> Hi,
> 
> 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:
> 
> 
> #!/usr/local/ghc/bin/ghc
> main = do putStrLn "foo"

I don't know if you want ghc especially; if hugs is enough the standard
distribution installs runhugs which you can cause to be invoked with the
line

#!/usr/bin/runhugs

I do this with some scripts and, when there aren't any errors during
either reading in or execution things work well. I seem to find that if
something goes wrong I just end up with a line

runhugs:

without an actual error message. I seem to recall Alastair Reid saying
it was something to do with the lack of vsnprintf (?) in a shared lib or
something.

___cheers,_dave________________________________________________________
www.cs.bris.ac.uk/~tweed/pi.htm |tweed's law:  however many computers
email: tweed@cs.bris.ac.uk      |   you have, half your time is spent
work tel: (0117) 954-5250       |   waiting for compilations to finish.