Module

Polyform.Validator

Package
purescript-polyform
Repository
purescript-polyform/polyform

#ask Source

ask :: forall i m e. Monad m => Semigroup e => Validator m e i i

#bimapM Source

bimapM :: forall e e' i m o o'. Monad m => Semigroup e' => (e -> m e') -> (o -> m o') -> Validator m e i o -> Validator m e' i o'

#bimapMWithInput Source

bimapMWithInput :: forall e e' i m o o'. Monad m => Semigroup e' => ((Tuple i e) -> m e') -> ((Tuple i o) -> m o') -> Validator m e i o -> Validator m e' i o'

#bimapValidator Source

bimapValidator :: forall i e e' m o o'. Monad m => (e -> e') -> (o -> o') -> Validator m e i o -> Validator m e' i o'

#check Source

check :: forall e i m. Applicative m => Semigroup e => (i -> e) -> (i -> Boolean) -> Validator m e i i

#checkM Source

checkM :: forall e i m. Monad m => Semigroup e => (i -> e) -> (i -> m Boolean) -> Validator m e i i

#invalidate Source

invalidate :: forall e i o m. Applicative m => (i -> e) -> Validator m e i o

#liftEither Source

liftEither :: forall e m o. Applicative m => Semigroup e => Validator m e (Either e o) o

#liftFn Source

liftFn :: forall e i m o. Applicative m => Semigroup e => (i -> o) -> Validator m e i o

These hoists set is used to lift functions into Validator

#liftFnEither Source

liftFnEither :: forall e i m o. Applicative m => Semigroup e => (i -> Either e o) -> Validator m e i o

TODO: Drop it - its redundant

#liftFnM Source

liftFnM :: forall e i m o. Applicative m => Semigroup e => (i -> m o) -> Validator m e i o

#liftFnMV Source

liftFnMV :: forall e i m o. (i -> m (V e o)) -> Validator m e i o

#liftFnMaybe Source

liftFnMaybe :: forall e i m o. Applicative m => (i -> e) -> (i -> Maybe o) -> Validator m e i o

#liftFnMMaybe Source

liftFnMMaybe :: forall e i m o. Applicative m => (i -> m e) -> (i -> m (Maybe o)) -> Validator m e i o

#liftFnV Source

liftFnV :: forall e i m o. Applicative m => (i -> V e o) -> Validator m e i o

#hoist Source

hoist :: forall e i n m. Functor m => m ~> n -> (Validator m e i) ~> (Validator n e i)

Lifts natural transformation so it hoists internal validator functor.

#lmapM Source

lmapM :: forall i m e e'. Monad m => (e -> m e') -> (Validator m e i) ~> (Validator m e' i)

#lmapMWithInput Source

lmapMWithInput :: forall i m e e'. Monad m => ((Tuple i e) -> m e') -> (Validator m e i) ~> (Validator m e' i)

#lmapValidator Source

lmapValidator :: forall e e' i m o. Monad m => (e -> e') -> Validator m e i o -> Validator m e' i o

#runValidator Source

runValidator :: forall i m o e. Validator m e i o -> (i -> m (V e o))

#Validator Source

newtype Validator m e i o

Constructors

Instances