digestive-functors-happstack-0.1.0.1: Happstack backend for the digestive-functors library

Text.Digestive.Forms.Happstack

Description

Module providing a happstack backend for the digestive-functors library

Synopsis

Documentation

type HappstackForm m e v a = Form m [Input] e v aSource

Simplification of the Form type, instantiated to Happstack

happstackEnvironment :: (HasRqData m, MonadPlus m, Alternative m) => Environment m [Input]Source

Environment that will fetch input from the parameters parsed by Happstack

eitherHappstackFormSource

Arguments

:: (HasRqData m, MonadPlus m, Alternative m, ServerMonad m) 
=> HappstackForm m e v a

Form

-> String

Form name

-> m (Either v a)

Result

Run a happstack form

  • When we are responding to a GET request, you will simply receive the form as a view
  • When we are responding to another request method, the form data will be used. When errors occur, you will receive the form as a view, otherwise, you will get the actual result