Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- data PastroSum (p :: Type -> Type -> Type) a b where
- type ChoiceA p = Free (PastroSum p)
- liftChoice :: p a b -> ChoiceA p a b
- foldChoice :: Category q => Choice q => (p :-> q) -> ChoiceA p a b -> q a b
- runChoiceT :: Choice q => (p :-> q) -> PastroSum p a b -> q a b
- runChoiceM :: Monad m => (forall x y. p x y -> x -> m y) -> ChoiceA p a b -> a -> m b
- runChoiceW :: Comonad w => (forall x y. p x y -> w x -> y) -> ChoiceA p a b -> w a -> b
Documentation
data PastroSum (p :: Type -> Type -> Type) a b where #
PastroSum -| TambaraSum
PastroSum freely constructs strength with respect to Either.
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 | |
Defined in Data.Profunctor.Choice | |
ProfunctorMonad PastroSum | |
Defined in Data.Profunctor.Choice | |
ProfunctorAdjunction PastroSum TambaraSum | |
Defined in Data.Profunctor.Choice unit :: Profunctor p => p :-> TambaraSum (PastroSum p) # counit :: Profunctor p => PastroSum (TambaraSum p) :-> p # | |
Choice (PastroSum p) | |
Profunctor (PastroSum p) | |
Defined in Data.Profunctor.Choice 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
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