Module providing a snap backend for the digestive-functors library
- data SnapInput
- type SnapForm e v a = Form Snap SnapInput e v a
- snapEnvironment :: Environment Snap SnapInput
- eitherSnapForm :: SnapForm e v a -> String -> Snap (Either v a)
Documentation
type SnapForm e v a = Form Snap SnapInput e v aSource
Simplification of the Form
type, instantiated to Snap
snapEnvironment :: Environment Snap SnapInputSource
Environment that will fetch input from the parameters parsed by Snap
Run a snap 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