title: Haskell as REST server
body: <p>I would like to try Haskell on a smallish project which should be well suited to it.
  I would like to use it as a backend to a small ajax application.</p>
  
  <p>Haskell backend should be able to do authentication (basic, form, whatever, ...), keep track of user session (not much data there except for username) and to dispatch request to handlers based on uri and request type. It should also be able to serialize response to both xml and json format, depending on request parameter.</p>
  
  <p>I suppose the handlers are ideally suited for Haskell, since the service is basically stateless, but I don't know where to start for the rest of the story.</p>
  
  <p>Searching hackage didn't give me much hints.</p>
  
  <p>Solution for pure haskell server would be prefered.</p>