[Haskell-cafe] web musing

Philippa Cowderoy flippa at flippac.org
Fri Jun 5 15:40:58 EDT 2009


On Fri, 2009-06-05 at 16:18 +0100, Conor McBride wrote:
> I've got a function (possibly the identity, possibly const "",
> who knows?)
> 
>    assistant :: String -> String
> 
> and I want to make a webpage with an edit box and a submit
> button. If I press the submit button with the edit box
> containing string s, I'd like the page to reload with the
> edit box reset to (assistant s).
> 
> Will I need to ask systems support to let me install some
> haskelly sort of web server? Looks likely, I suppose.
> 
> In general, what's an easy way to put a web front end on
> functionality implemented in Haskell?

You don't need a web server so long as you've got a compiler -
Network.CGI ought to work nicely for your purposes, you just have a
binary that's called by the web server, processes the request and yields
input. If you're not doing disk I/O, pretty much the entire program's
plain functional stuff.

-- 
Philippa Cowderoy <flippa at flippac.org>



More information about the Haskell-Cafe mailing list