category-extras-0.53.5: Various modules and constructs inspired by category theory

Portabilitynon-portable (functional-dependencies)
Stabilityexperimental
MaintainerEdward Kmett <ekmett@gmail.com>

Control.Functor.Combinators.Lift

Description

transform a pair of functors with a bifunctor deriving a new functor. this subsumes functor product and functor coproduct

Documentation

newtype Lift p f g a Source

Constructors

Lift 

Fields

runLift :: p (f a) (g a)
 

type :*: f g = Lift (,) f gSource

runProductF :: (f :*: g) a -> (f a, g a)Source

type :+: f g = Lift Either f gSource

runCoproductF :: (f :+: g) a -> Either (f a) (g a)Source

runAp :: Bifunctor p Hask Hask Hask => Ap p f a -> p a (f a)Source

mkAp :: Bifunctor p Hask Hask Hask => p a (f a) -> Ap p f aSource