Showing posts from August, 2009

Dynamic List Formlets in Haskell

The Haskell Formlets library (described here ) provides an elegant abstraction that takes the tedium out of HTML form generation, validation, and processing (not to mention make it less error prone). This abstraction allows you to develop HTML form UIs while still thinking in and working with haskell's type system and data structures. It also fits very naturally with Happstack's ideas about using in-memory state to leverage the pure type system. One important aspect of form abstraction is the handling of lists. Dynamic lists in particular are a bit more of a challenge because they require Javascript to handle the dynamic creation/removal of form fields. Until recently, the Formlets library has had poor support for list formlets. At the recent Hac-Phi Haskell hackathon, Chris Eidhoff and I worked on filling this gap. We made great progress at the hackathon, and it only took a little more work after the hackathon to finish the functionality we set out to solve. I would