descriptive-0.9.4: Self-describing consumers/parsers; forms, cmd-line args, JSON, etc.

Safe Haskell | Safe
Language | Haskell98

Descriptive.Formlet

Contents

- Combinators
- Description

Description

Validating indexed formlet with auto-generated input names.

Synopsis

- indexed :: Monad m => Consumer FormletState Formlet m Text
- data FormletState = FormletState {
  - formletMap :: Map Integer Text
  - formletIndex :: !Integer
  }
- data Formlet
  - = Index !Integer
  - | Constrained !Text

# Combinators

indexed :: Monad m => Consumer FormletState Formlet m Text #

Consume any character.

data FormletState #

State used when running a formlet.

Constructors

FormletState |
Fields formletMap :: Map Integer Text formletIndex :: !Integer

Instances

Eq FormletState # |
Methods (==) :: FormletState -> FormletState -> Bool # (/=) :: FormletState -> FormletState -> Bool #
Show FormletState # |
Methods showsPrec :: Int -> FormletState -> ShowS # show :: FormletState -> String # showList :: [FormletState] -> ShowS #

# Description

data Formlet #

Description of a formlet.

Constructors

Index !Integer |
Constrained !Text |

Instances

Eq Formlet # |
Methods (==) :: Formlet -> Formlet -> Bool # (/=) :: Formlet -> Formlet -> Bool #
Show Formlet # |
Methods showsPrec :: Int -> Formlet -> ShowS # show :: Formlet -> String # showList :: [Formlet] -> ShowS #