[Haskell] client-side web scripting in Haskell?

Marius Nita marius at cs.pdx.edu
Wed Mar 9 16:31:37 EST 2005

On Mar 3, 2005, at 8:45 PM, Dean Herington wrote:
> Is there any practical way to do client-side web scripting in Haskell? 
>  All the references I have found to HaskellScript seem quite out of 
> date.


If you are using hugs, it comes with a program named 'runhugs' that you 
can use on the shebang line in executable haskell scripts, e.g.

   #!/usr/bin/env runhugs
   main = putStrLn "hello"

I believe the latest ghc comes with a similar tool named runghci, but I 
am not sure about this.

Alternatively you can hack up a runghci script, something along the 
lines of

   file=`mktemp -t ghci`
   mv $file $file.hs
   cat $* | tail +2 > $file.hs
   echo main | ghci -v0 $file.hs

Hope that helps,

> Dean
> _______________________________________________
> Haskell mailing list
> Haskell at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell

More information about the Haskell mailing list