digestive-functors-0.8.4.0: A practical formlet library

Safe HaskellSafe
LanguageHaskell98

Text.Digestive.Form.Internal.Field

Description

Internal embedding of form fields with associated functions.

Synopsis

Documentation

data Field v a where Source #

A single input field. This usually maps to a single HTML input element.

Constructors

Singleton :: a -> Field v a 
Text :: Text -> Field v Text 
Choice :: [(Text, [(Text, (a, v))])] -> [Int] -> Field v [(a, Int)] 
Bool :: Bool -> Field v Bool 
File :: Field v [FilePath] 
Instances
Show (Field v a) Source # 
Instance details

Defined in Text.Digestive.Form.Internal.Field

Methods

showsPrec :: Int -> Field v a -> ShowS #

show :: Field v a -> String #

showList :: [Field v a] -> ShowS #

data SomeField v Source #

Value agnostic Field

Constructors

SomeField (Field v a) 

evalField Source #

Arguments

:: Method

Get/Post

-> [FormInput]

Given input

-> Field v a

Field

-> a

Result

Evaluate a field to retrieve a value, using the given method and a list of input.

fieldMapView :: (v -> w) -> Field v a -> Field w a Source #

Map on the error message type of a Field.