Safe Haskell | Safe-Infered |
---|
Module providing a snap backend for the digestive-functors library
- data SnapInput
- type SnapForm m = Form m SnapInput
- snapEnvironment :: MonadSnap m => Environment m SnapInput
- eitherSnapForm :: MonadSnap m => SnapForm m e v a -> String -> m (Either v a)
- runViewSnapForm :: MonadSnap m => SnapForm m e v a -> String -> m (v, Maybe a)
Documentation
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