data Lift f a
Applicative functor formed by adding pure computations to a given applicative functor.
Adding a new kind of pure computation to an applicative functor.
data Lift f aApplicative functor formed by adding pure computations to a given applicative functor.
Pure :: a -> Lift f aOther :: (f a) -> Lift f aunLift :: (Applicative f) => Lift f a -> f aProjection to the other functor.
mapLift :: (f a -> g a) -> Lift f a -> Lift g aApply a transformation to the other computation.
elimLift :: (a -> r) -> (f a -> r) -> Lift f a -> rEliminator for Lift.
elimLift f g . pure = f
elimLift f g . Other = g
type Errors e = Lift (Constant e)An applicative functor that collects a monoid (e.g. lists) of errors.
A sequence of computations fails if any of its components do, but
unlike monads made with ExceptT from
Control.Monad.Trans.Except, these computations continue after an
error, collecting all the errors.
pure f <*> pure x = pure (f x)
pure f <*> failure e = failure e
failure e <*> pure x = failure e
failure e1 <*> failure e2 = failure (e1 <> e2)
runErrors :: Errors e a -> Either e aExtractor for computations with accumulating errors.
runErrors (pure x) = Right x
runErrors (failure e) = Left e
failure :: e -> Errors e aReport an error.
eitherToErrors :: Either e a -> Errors e aConvert from Either to Errors (inverse of runErrors).
instance (Generic f, Generic a) => Generic (Lift f a)instance (Generic1 f, Generic1 a) => Generic1 (Lift f a)instance (Eq1 f) => Eq1 (Lift f)instance (Ord1 f) => Ord1 (Lift f)instance (Read1 f) => Read1 (Lift f)instance (Show1 f) => Show1 (Lift f)instance (Eq1 f, Eq a) => Eq (Lift f a)instance (Ord1 f, Ord a) => Ord (Lift f a)instance (Read1 f, Read a) => Read (Lift f a)instance (Show1 f, Show a) => Show (Lift f a)instance (Functor f) => Functor (Lift f)instance (Foldable f) => Foldable (Lift f)instance (Traversable f) => Traversable (Lift f)instance (Applicative f) => Applicative (Lift f)A combination is Pure only if both parts are.
instance (Alternative f) => Alternative (Lift f)A combination is Pure only either part is.
instance (Foldable1 f) => Foldable1 (Lift f)Community contribution. The service has not verified this documentation.
Target: Linux on x86-64. Some inferred types and resolved links are not available.
Generator: aihc-haddock-858b1951-web-1
Metadata snapshot: ac77ab7d2b1e88487eeab41661abedb7bfb8bc846deb92e7874c08d166bff65d
Open the dependency plan · Download the documentation model