serveAs "said" $ hasIndex $ \x -> "click me" `linksTo` (text ("You said " ++ x))------
said = standardQuery "What's your name?" (p_T (do { text_S "Hi there! What's your name?" ; activate greeting textInputField empty }))
greeting :: String -> CGI ()
greeting name = standardQuery "Hello" (do { text_S "Hello " ; text name ; text_S ". This is my first interactive CGI program!" })
------
where said <==> helo5, code at http://www.informatik.uni-freiburg.de/~thiemann/WASH/Tutoria...
Try it, live (chose Hellow World Personalized):
http://nakalele.informatik.uni-freiburg.de/cgi/WASH/Tutorial...
-----
The last part looks pretty lispy.
Does this mean Haskell wins against Arc? :p
-----
The idea is that `hasIndex f` creates a page that prompts for a string, then (after the page is submitted) calls the function f with the input string as parameter and shows the resulting page.
By the way, \ is just the Haskell syntax for lambda -- hey, whaddayaknow, it's one character shorter than `fn` :-)
-----
But I like Haskell. :-) Interesting, how long will be explicit declaration of form.
BTW, this is your imagination or you are using something real and this can be used just now for web programming?
-----