- input' :: (String -> String -> xml) -> Maybe String -> Form xml String
- inputFile :: (String -> xml) -> Form xml File
- fmapFst :: (t -> t2) -> (t, t1) -> (t2, t1)
- check :: Form xml a -> (a -> Failing b) -> Form xml b
- ensure :: Show a => (a -> Bool) -> String -> a -> Failing a
- ensures :: Show a => [(a -> Bool, String)] -> a -> Failing a
- runFormState :: Env -> Form xml a -> (Collector (Failing a), xml, FormContentType)
- xml :: xml -> Form xml ()
- plug :: Plus xml => (xml -> xml) -> Form xml a -> Form xml a
- type Env = [(String, Either String File)]
- data Form xml a
- class Plus a where
- data File = File {}
- data ContentType = ContentType {}
- data FormContentType
- = UrlEncoded
- | MultiPart
Documentation
input' :: (String -> String -> xml) -> Maybe String -> Form xml StringSource
Helper function for genereting input components based forms.
check :: Form xml a -> (a -> Failing b) -> Form xml bSource
Add additional validation to an already validated component
:: Show a | |
=> (a -> Bool) | The predicate |
-> String | The error message, in case the predicate fails |
-> a | The value |
-> Failing a |
Apply a predicate to a value and return Success or Failure as appropriate
:: Show a | |
=> [(a -> Bool, String)] | List of predicate functions and error messages, in case the predicate fails |
-> a | The value |
-> Failing a |
Apply multiple predicates to a value, return Success or all the Failure messages
:: Env | A previously filled environment (may be empty) |
-> Form xml a | The form |
-> (Collector (Failing a), xml, FormContentType) |
Runs the form state
File | |
|