Module
Polyform.Field.Generic.Option
- Package
- purescript-polyform
- Repository
- paluh/purescript-polyform
#Nil Source
data Nil
"Custom sum" type (heavly inspired by (or ripped from) purescript-variant internals) which allows you to easily provide options (together with order) for you Choice/Multichoice fields "without" defining dedicated type.
Instances
#Cons Source
data Cons (s :: Symbol) tail
Instances
(IsSymbol s) => DropOpt s (Cons s tail) tail
(IsSymbol s, DropOpt s tail tail') => DropOpt s (Cons head tail) (Cons head tail')
(IsSymbol n) => Elem n (Cons n tail)
(Elem n tail, IsSymbol n) => Elem n (Cons head tail)
(IsSymbol head, Eq (Option tail)) => Eq (Option (Cons head tail))
(IsSymbol name, SingleChoice tail) => SingleChoice (Option (Cons name Nil))
(IsSymbol name, SingleChoice (Option tail)) => SingleChoice (Option (Cons name tail))
(IsSymbol name, Cons name Boolean () row, Lacks name ()) => MultiChoice (Option (Cons name Nil)) row
(IsSymbol name, MultiChoice (Option tail) br, Cons name Boolean br row, Lacks name br) => MultiChoice (Option (Cons name tail)) row
#type (:-) Source
Operator alias for Polyform.Field.Generic.Option.Cons (right-associative / precedence 8)
#Option Source
data Option :: Type -> Type
Option
is our symbol list carrier
Instances
Eq (Option Nil)
(IsSymbol head, Eq (Option tail)) => Eq (Option (Cons head tail))
(IsSymbol name, SingleChoice tail) => SingleChoice (Option (Cons name Nil))
(IsSymbol name, SingleChoice (Option tail)) => SingleChoice (Option (Cons name tail))
(IsSymbol name, Cons name Boolean () row, Lacks name ()) => MultiChoice (Option (Cons name Nil)) row
(IsSymbol name, MultiChoice (Option tail) br, Cons name Boolean br row, Lacks name br) => MultiChoice (Option (Cons name tail)) row
#choiceParser Source
choiceParser :: forall opt m. Monad m => SingleChoice (Option opt) => Proxy opt -> Validation m String String (Option opt)
#multiChoiceParser Source
multiChoiceParser :: forall row opt m. Monad m => MultiChoice (Option opt) row => Proxy opt -> Validation m (Array String) (Array String) { checkChoice :: Option opt -> Boolean, product :: Record row }
- Modules
- Polyform.
Field - Polyform.
Field. Generic - Polyform.
Field. Generic. Option - Polyform.
Field. Html5 - Polyform.
Field. Validation. Combinators - Polyform.
Form. Component - Polyform.
Input. Foreign - Polyform.
Input. Http - Polyform.
Input. Interpret - Polyform.
Input. Interpret. Http - Polyform.
Input. Interpret. Record - Polyform.
Input. Interpret. Validation - Polyform.
Validation - Polyform.
Validation. Par