Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Module for the core result type, and related functions
Synopsis
- data Result e ok
- getResult :: Result e ok -> Maybe ok
- data FormId
- = FormId { }
- | FormIdCustom String Int
- zeroId :: String -> FormId
- mapId :: (NonEmpty Int -> NonEmpty Int) -> FormId -> FormId
- data FormRange = FormRange FormId FormId
- incrementFormId :: FormId -> FormId
- unitRange :: FormId -> FormRange
- isInRange :: FormId -> FormRange -> Bool
- isSubRange :: FormRange -> FormRange -> Bool
- retainErrors :: FormRange -> [(FormRange, e)] -> [e]
- retainChildErrors :: FormRange -> [(FormRange, e)] -> [e]
Documentation
Type for failing computations
An ID used to identify forms
FormId | |
| |
FormIdCustom String Int |
mapId :: (NonEmpty Int -> NonEmpty Int) -> FormId -> FormId Source #
map a function over the NonEmpty Int
inside a FormId
A range of ID's to specify a group of forms
incrementFormId :: FormId -> FormId Source #
Increment a form ID
retainErrors :: FormRange -> [(FormRange, e)] -> [e] Source #
Select the errors for a certain range
retainChildErrors :: FormRange -> [(FormRange, e)] -> [e] Source #
Select the errors originating from this form or from any of the children of this form