What is a Haskell-based web infrastructure?

Sometimes I come across the concept of continuation-based web frameworks for Haskell. What does it mean?

Continuations, as I know them, are glorious transition management structures. I don’t see how they relate to web content.

What exactly will the sequels use?

+8
haskell continuations
source share
2 answers

A continuation-based web environment inverts the flow of control in a web application. Instead of being page oriented, it is stream oriented. The display of a web page is handled in the same way as the display of a modal dialog in a desktop application. The control flow (from the point of view of the user of the framework) is that one mandatory action may request the display of several pages. The continuation referred to is the rest of the action that the user started.

+5
source share

The canonical web structure, based on the continuation for Haskell, is a venerable WASH system .

The idea is to fix the state in the continuation, allowing fully RESTful, stateless web applications, which in some cases can be automatically generated from a non-continuation version of the program.

From "WASH / CGI: Server-Side Web Scripts with Sessions and Typed, Compound Forms": (2001):

The main idea is to use a continuation to take a snapshot of the state from the script after submitting the form to the browser. This continuation is then stored on the server, and the form contains a key for later searching for the continuation.

A modern description of the approach is given in the review of MFlow Monad Reader .

+4
source share

All Articles