Module

Data.Functor.Pairing.Co

Package
purescript-open-pairing
Repository
purescript-open-community/purescript-open-pairing

Monads from comonads, based on https://hackage.haskell.org/package/kan-extensions-5.0.1/docs/Control-Monad-Co.html.

#Co Source

newtype Co :: (Type -> Type) -> Type -> Typenewtype Co w a

Instances

#co Source

co :: forall w a. (forall r. w (a -> r) -> r) -> Co w a

#runCo Source

runCo :: forall w a r. Co w a -> w (a -> r) -> r

#pairCo Source

pairCo :: forall w. Functor w => w  (Co w)

w pairs with Co w whenever w is a Functor.

#liftCo Source

liftCo :: forall w s. Comonad w => (forall a. w a -> s) -> Co w s

#lowerCo Source

lowerCo :: forall w a s. Functor w => Co w s -> w a -> s