profunctor-arrows-0.0.0.2: Profunctor arrows

Safe HaskellSafe
LanguageHaskell2010

Data.Profunctor.Arrow.Choice

Synopsis

Documentation

data PastroSum (p :: Type -> Type -> Type) a b where #

PastroSum -| TambaraSum

PastroSum freely constructs strength with respect to Either.

Constructors

PastroSum :: forall (p :: Type -> Type -> Type) a b y z x. (Either y z -> b) -> p x y -> (a -> Either x z) -> PastroSum p a b 
Instances
ProfunctorFunctor PastroSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

promap :: Profunctor p => (p :-> q) -> PastroSum p :-> PastroSum q #

ProfunctorMonad PastroSum 
Instance details

Defined in Data.Profunctor.Choice

ProfunctorAdjunction PastroSum TambaraSum 
Instance details

Defined in Data.Profunctor.Choice

Choice (PastroSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: PastroSum p a b -> PastroSum p (Either a c) (Either b c) #

right' :: PastroSum p a b -> PastroSum p (Either c a) (Either c b) #

Profunctor (PastroSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

dimap :: (a -> b) -> (c -> d) -> PastroSum p b c -> PastroSum p a d #

lmap :: (a -> b) -> PastroSum p b c -> PastroSum p a c #

rmap :: (b -> c) -> PastroSum p a b -> PastroSum p a c #

(#.) :: Coercible c b => q b c -> PastroSum p a b -> PastroSum p a c #

(.#) :: Coercible b a => PastroSum p b c -> q a b -> PastroSum p a c #

liftChoice :: p a b -> ChoiceA p a b Source #

TODO: Document

foldChoice :: Category q => Choice q => (p :-> q) -> ChoiceA p a b -> q a b Source #

TODO: Document

runChoiceT :: Choice q => (p :-> q) -> PastroSum p a b -> q a b Source #

TODO: Document

runChoiceM :: Monad m => (forall x y. p x y -> x -> m y) -> ChoiceA p a b -> a -> m b Source #

TODO: Document

runChoiceW :: Comonad w => (forall x y. p x y -> w x -> y) -> ChoiceA p a b -> w a -> b Source #

TODO: Document