Module providing a snap backend for the digestive-functors library
- data SnapInput
- type SnapForm e v a = MonadSnap m => Form m SnapInput e v a
- snapEnvironment :: MonadSnap m => Environment m SnapInput
- eitherSnapForm :: MonadSnap m => SnapForm e v a -> String -> m (Either v a)
Documentation
type SnapForm e v a = MonadSnap m => Form m SnapInput e v aSource
Simplification of the Form
type, instantiated to Snap
snapEnvironment :: MonadSnap m => Environment m 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