Module
Morello.Morello
- Package
- purescript-morello
- Repository
- sigma-andex/purescript-morello
Re-exports from Data.Lens.Barlow
#Barlow Source
class Barlow :: Symbol -> (Type -> Type -> Type) -> Type -> Type -> Type -> Type -> Constraint
class Barlow (string :: Symbol) p s t a b | string -> s t a b where
Members
Instances
(ParseSymbol string lenses, ConstructBarlow lenses p s t a b) => Barlow string p s t a b
Re-exports from Morello.Morello.Core
#pick Source
pick :: forall (input :: Type) (err :: Type) (output :: Type) (chosen :: Type) (sym :: Symbol) (tlist :: TList). ParseSymbol sym tlist => ConstructBarlow tlist (Forget chosen) input input chosen chosen => Proxy sym -> (chosen -> V (NonEmptyArray err) output) -> PickE input err output
#dual Source
dual :: forall input err from to' to. Union from to' to => (input -> ValidatedE err (Record to')) -> Tuple input (ValidatedE err (Record from)) -> Tuple input (ValidatedE err (Record to))
#core' Source
core' :: forall f s a err b. Traversable f => AGetter' s (f a) -> ValidateE a err b -> PickE s err (f b)
#core Source
core :: forall (f :: Type -> Type) (chosen :: Type) (input :: Type) (err :: Type) (output :: Type) (sym :: Symbol) (tlist :: TList). Traversable f => ParseSymbol sym tlist => ConstructBarlow tlist (Forget (f input)) chosen chosen (f input) (f input) => Proxy sym -> (input -> V (NonEmptyArray err) output) -> PickE chosen err (f output)
#cherry Source
cherry :: forall input err from to rin rinRL rthru rthruRL rout routRL. RowToList rin rinRL => RowToList rthru rthruRL => RowToList rout routRL => FoldlRecord (MapRecordKind (PickE input err) (V (NonEmptyArray err))) (Builder (Record ()) (Record ())) rinRL rin (Builder (Record ()) (Record rthru)) => FoldlRecord (SequenceRecord (V (NonEmptyArray err))) (V (NonEmptyArray err) (Builder (Record ()) (Record ()))) rthruRL rthru (V (NonEmptyArray err) (Builder (Record ()) (Record rout))) => Union from rout to => Record rin -> Tuple input (ValidatedE err (Record from)) -> Tuple input (ValidatedE err (Record to))
#blossom Source
blossom :: forall input err output. Tuple input (ValidatedE err output) -> ValidatedE err output
#applyTemplate Source
applyTemplate :: forall input err rin rinRL rthru rthruRL rout routRL. RowToList rin rinRL => RowToList rthru rthruRL => RowToList rout routRL => FoldlRecord (MapRecordKind (PickE input err) (V (NonEmptyArray err))) (Builder (Record ()) (Record ())) rinRL rin (Builder (Record ()) (Record rthru)) => FoldlRecord (SequenceRecord (V (NonEmptyArray err))) (V (NonEmptyArray err) (Builder (Record ()) (Record ()))) rthruRL rthru (V (NonEmptyArray err) (Builder (Record ()) (Record rout))) => ((PickE input err) ~> (ValidatedE err)) -> Record rin -> ValidatedE err (Record rout)
Re-exports from Morello.Morello.Simple
#ValidationError Source
#Validated Source
type Validated r = ValidatedE ValidationError r
#Validate Source
type Validate a b = ValidateE a ValidationError b
#Pick Source
type Pick input a = PickE input ValidationError a
Re-exports from Morello.Morello.Validated
#ValidatedE Source
type ValidatedE err r = V (NonEmptyArray err) r
#ValidateE Source
type ValidateE a err b = a -> ValidatedE err b
#valid Source
valid :: forall err r. r -> ValidatedE err r
#invalid Source
invalid :: forall err r. err -> ValidatedE err r
#asIs Source
asIs :: forall input err. ValidateE' input err
Type-safe lens for zooming into a deeply nested record