digestive-functors-snap-0.0.2.1: Snap backend for the digestive-functors library

Text.Digestive.Forms.Snap

Description

Module providing a snap backend for the digestive-functors library

Synopsis

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

eitherSnapFormSource

Arguments

:: MonadSnap m 
=> SnapForm e v a

Form

-> String

Form name

-> m (Either v a)

Result

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