[Haskell-cafe] GUIs, FRP, (Delimited) Continuations and Zippers

oleg at okmij.org oleg at okmij.org
Tue May 19 03:58:53 EDT 2009

> Could either of those approaches (FRP / Delimited Continuations) be a
> solution for implementing complex GUI code?

I think the answer is generally yes; I have tried writing a user
interface which has a form with several controls; a change in one
control may affect all other controls on the form (or change the
form). I have tried it for a particular GUI: the web page -- displayed
in a browser interacting with a CGI script. The choice of CGI was
deliberate because it is harder than FastCGI: it requires the ability
to save the state of the interaction. The continuation must outlive
its process. The point I was trying to make is that the GUI is
programmed as if it were a uncursed console application: you send one
question, get a reply, send another question, etc. With a GUI,
questions are sent in parallel and answers are delivered in any order;
yet the programmer can still think he deals with a regular console
application; as if the interaction never happens and the program
merely reads the data from a file.


It was done in OCaml though (because OCaml has native persistent
delimited continuations).

More information about the Haskell-Cafe mailing list