As there were no concrete ideas on what to implement in all possible
languages, I hacked around something random.
So, here goes the crown of creation:
http://www.honey-net.eu:8000/ (sources in
http://code.google.com/r/rotsor-tuura-hs/)
The most important parts are the transactional persistence, provided
by the Happstack State, and the formlet framework used to make a form.
The persistent state schema lies in src/Database.hs. It defines
several simple Haskell types and uses Template Haskell (TH) to derive
a lot of useful class instances for them, implementing serialisation,
comparison, display, and even reflection. Most of those instances are
used by Happstack for something. The state operations (readTuuraDb,
addProblem) are defined as functions in src/TuuraQueries.hs. There
also is some TH action promoting them to serialisable types (needed
for, e.g., transaction log replay). I hope to learn some day how all
this really works, but for now it just works (saves everything and
restores on server restart).
Next, src/Pages/AddProblem.hs shows the use of formlets. Those allow a
single function (like problemForm) to specify the form display,
validation and result processing in one place in a type-safe manner.
Very nice.
I've not looked into ajax options yet and I'm afraid to... Ajax is
just scary.