Module

Polyform.Validator.Dual

Package
purescript-polyform
Repository
purescript-polyform/polyform

#Dual Source

type Dual m e = Dual (Validator m e) Identity

#DualD Source

type DualD m e = DualD (Validator m e) Identity

#check Source

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

#checkM Source

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

#iso Source

iso :: forall e i m o. Semigroup e => Applicative m => (i -> o) -> (o -> i) -> Dual m e i o

#lmapDual Source

lmapDual :: forall e e' i m o. Monad m => (e -> e') -> Dual m e i o -> Dual m e' i o

#lmapDualD Source

lmapDualD :: forall e e' i m o o'. Monad m => (e -> e') -> DualD m e i o' o -> DualD m e' i o' o

#liftEither Source

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

#lmapM Source

lmapM :: forall e e' i m o. Monad m => (e -> m e') -> Dual m e i o -> Dual m e' i o

#newtypeIso Source

newtypeIso :: forall a e m n. Monad m => Semigroup e => Newtype n a => Dual m e a n

Using not so smart constructor so succeed all the time

#hoist Source

hoist :: forall e i o m m'. Functor m => (m ~> m') -> Dual m e i o -> Dual m' e i o

#invalidate Source

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

#smartNewtypeIso Source

smartNewtypeIso :: forall a e m n. Monad m => Semigroup e => Newtype n a => (a -> Maybe n) -> (a -> e) -> Dual m e a n

Using smart constructor so possibly fail

#runSerializer Source

runSerializer :: forall e i o m. Dual m e i o -> (o -> i)

#runValidator Source

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