hs-functors-0.1.4.0: Functors from products of Haskell and its dual to Haskell

Safe HaskellNone
LanguageHaskell2010

Control.Comonad

Documentation

class Functor ɯ => Comonad ɯ where Source #

Minimal complete definition

copure

Methods

copure :: ɯ a -> a Source #

cut :: ɯ a -> ɯ (ɯ a) Source #

(<<=) :: (ɯ a -> b) -> ɯ a -> ɯ b infixr 1 Source #

Instances
Comonad Identity Source # 
Instance details

Defined in Control.Comonad

Methods

copure :: Identity a -> a Source #

cut :: Identity a -> Identity (Identity a) Source #

(<<=) :: (Identity a -> b) -> Identity a -> Identity b Source #

Comonad NonEmpty Source # 
Instance details

Defined in Control.Comonad

Methods

copure :: NonEmpty a -> a Source #

cut :: NonEmpty a -> NonEmpty (NonEmpty a) Source #

(<<=) :: (NonEmpty a -> b) -> NonEmpty a -> NonEmpty b Source #

Comonad ((,) a) Source # 
Instance details

Defined in Control.Comonad

Methods

copure :: (a, a0) -> a0 Source #

cut :: (a, a0) -> (a, (a, a0)) Source #

(<<=) :: ((a, a0) -> b) -> (a, a0) -> (a, b) Source #

Comonad (Arg a) Source # 
Instance details

Defined in Control.Comonad

Methods

copure :: Arg a a0 -> a0 Source #

cut :: Arg a a0 -> Arg a (Arg a a0) Source #

(<<=) :: (Arg a a0 -> b) -> Arg a a0 -> Arg a b Source #

Functor f => Comonad (Cofree f) Source # 
Instance details

Defined in Control.Comonad.Cofree

Methods

copure :: Cofree f a -> a Source #

cut :: Cofree f a -> Cofree f (Cofree f a) Source #

(<<=) :: (Cofree f a -> b) -> Cofree f a -> Cofree f b Source #

Comonad ɯ => Comonad (IdentityT ɯ) Source # 
Instance details

Defined in Control.Comonad

Methods

copure :: IdentityT ɯ a -> a Source #

cut :: IdentityT ɯ a -> IdentityT ɯ (IdentityT ɯ a) Source #

(<<=) :: (IdentityT ɯ a -> b) -> IdentityT ɯ a -> IdentityT ɯ b Source #

Comonad (Density f) Source # 
Instance details

Defined in Control.Comonad.Density

Methods

copure :: Density f a -> a Source #

cut :: Density f a -> Density f (Density f a) Source #

(<<=) :: (Density f a -> b) -> Density f a -> Density f b Source #

(Semigroup m, Monoid m) => Comonad ((->) m :: Type -> Type) Source # 
Instance details

Defined in Control.Comonad

Methods

copure :: (m -> a) -> a Source #

cut :: (m -> a) -> m -> (m -> a) Source #

(<<=) :: ((m -> a) -> b) -> (m -> a) -> m -> b Source #

(=>>) :: Comonad ɯ => ɯ a -> (ɯ a -> b) -> ɯ b infixl 1 Source #

(=>=) :: Comonad ɯ => (ɯ a -> b) -> (ɯ b -> c) -> ɯ a -> c infixr 1 Source #

(=<=) :: Comonad ɯ => (ɯ b -> c) -> (ɯ a -> b) -> ɯ a -> c infixr 1 Source #

wfix :: Comonad ɯ => (ɯ a -> a) -> ɯ a Source #

newtype Cokleisli ɯ a b Source #

Constructors

Cokleisli 

Fields

Instances
(Cotraversable f, Functor ɯ) => Closed f (Cokleisli ɯ) Source # 
Instance details

Defined in Data.Profunctor

Methods

closed :: Cokleisli ɯ a b -> Cokleisli ɯ (f a) (f b) Source #

Functor f => Costrong Either (Cokleisli f) Source # 
Instance details

Defined in Data.Profunctor

Methods

costrongL :: Cokleisli f (Either a c) (Either b c) -> Cokleisli f a b Source #

costrongR :: Cokleisli f (Either a b) (Either a c) -> Cokleisli f b c Source #

Comonad ɯ => Strong Either (Cokleisli ɯ) Source # 
Instance details

Defined in Data.Profunctor

Methods

strong :: Cokleisli ɯ a₁ b₁ -> Cokleisli ɯ a₂ b₂ -> Cokleisli ɯ (Either a₁ a₂) (Either b₁ b₂) Source #

Comonad ɯ => Category (Cokleisli ɯ :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Comonad

Methods

id :: Cokleisli ɯ a a #

(.) :: Cokleisli ɯ b c -> Cokleisli ɯ a b -> Cokleisli ɯ a c #

Functor f => Profunctor (Cokleisli f) Source # 
Instance details

Defined in Data.Profunctor

Methods

dimap :: (a -> b) -> (c -> d) -> Cokleisli f b c -> Cokleisli f a d Source #

lmap :: (a -> b) -> Cokleisli f b c -> Cokleisli f a c Source #

rmap :: (b -> c) -> Cokleisli f a b -> Cokleisli f a c Source #

Monad (Cokleisli ɯ a) Source # 
Instance details

Defined in Control.Comonad

Methods

(>>=) :: Cokleisli ɯ a a0 -> (a0 -> Cokleisli ɯ a b) -> Cokleisli ɯ a b #

(>>) :: Cokleisli ɯ a a0 -> Cokleisli ɯ a b -> Cokleisli ɯ a b #

return :: a0 -> Cokleisli ɯ a a0 #

fail :: String -> Cokleisli ɯ a a0 #

Functor (Cokleisli ɯ a) Source # 
Instance details

Defined in Control.Comonad

Methods

fmap :: (a0 -> b) -> Cokleisli ɯ a a0 -> Cokleisli ɯ a b #

(<$) :: a0 -> Cokleisli ɯ a b -> Cokleisli ɯ a a0 #

Applicative (Cokleisli ɯ a) Source # 
Instance details

Defined in Control.Comonad

Methods

pure :: a0 -> Cokleisli ɯ a a0 #

(<*>) :: Cokleisli ɯ a (a0 -> b) -> Cokleisli ɯ a a0 -> Cokleisli ɯ a b #

liftA2 :: (a0 -> b -> c) -> Cokleisli ɯ a a0 -> Cokleisli ɯ a b -> Cokleisli ɯ a c #

(*>) :: Cokleisli ɯ a a0 -> Cokleisli ɯ a b -> Cokleisli ɯ a b #

(<*) :: Cokleisli ɯ a a0 -> Cokleisli ɯ a b -> Cokleisli ɯ a a0 #