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

Safe HaskellNone
LanguageHaskell2010

Data.Profunctor

Documentation

class Profunctor p where Source #

Minimal complete definition

Nothing

Methods

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

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

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

Instances
Functor f => Profunctor (Kleisli f) Source # 
Instance details

Defined in Data.Profunctor

Methods

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

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

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

Profunctor ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Profunctor

Methods

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

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

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

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 #

(^>>) :: Profunctor p => (a -> b) -> p b c -> p a c infixr 1 Source #

(>>^) :: Profunctor p => p a b -> (b -> c) -> p a c infixr 1 Source #

(<<^) :: Profunctor p => p b c -> (a -> b) -> p a c infixr 1 Source #

(^<<) :: Profunctor p => (b -> c) -> p a b -> p a c infixr 1 Source #

class Profunctor p => Strong f p where Source #

Methods

strong :: p a₁ b₁ -> p a₂ b₂ -> p (f a₁ a₂) (f b₁ b₂) Source #

Instances
Functor f => Strong Either (Kleisli f) Source # 
Instance details

Defined in Data.Profunctor

Methods

strong :: Kleisli f a₁ b₁ -> Kleisli f a₂ b₂ -> Kleisli f (Either a₁ a₂) (Either b₁ b₂) Source #

Applicative p => Strong (,) (Kleisli p) Source # 
Instance details

Defined in Data.Profunctor

Methods

strong :: Kleisli p a₁ b₁ -> Kleisli p a₂ b₂ -> Kleisli p (a₁, a₂) (b₁, b₂) Source #

Strong Either ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Profunctor

Methods

strong :: (a₁ -> b₁) -> (a₂ -> b₂) -> Either a₁ a₂ -> Either b₁ b₂ 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 #

Strong (,) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Profunctor

Methods

strong :: (a₁ -> b₁) -> (a₂ -> b₂) -> (a₁, a₂) -> (b₁, b₂) Source #

(***) :: Strong (,) p => p a₁ b₁ -> p a₂ b₂ -> p (a₁, a₂) (b₁, b₂) infixr 3 Source #

(&&&) :: Strong (,) p => p a b₁ -> p a b₂ -> p a (b₁, b₂) infixr 3 Source #

(+++) :: Strong Either p => p a₁ b₁ -> p a₂ b₂ -> p (Either a₁ a₂) (Either b₁ b₂) infixr 2 Source #

(|||) :: Strong Either p => p a₁ b -> p a₂ b -> p (Either a₁ a₂) b infixr 2 Source #

class Profunctor p => Costrong f p where Source #

Minimal complete definition

Nothing

Methods

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

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

costrongL :: Braided f => p (f a c) (f b c) -> p a b Source #

costrongR :: Braided f => p (f a b) (f a c) -> p b c Source #

Instances
Monad m => Costrong Either (Kleisli m) Source # 
Instance details

Defined in Data.Profunctor

Methods

costrongL :: Kleisli m (Either a c) (Either b c) -> Kleisli m a b Source #

costrongR :: Kleisli m (Either a b) (Either a c) -> Kleisli m b c Source #

MonadFix m => Costrong (,) (Kleisli m) Source # 
Instance details

Defined in Data.Profunctor

Methods

costrongL :: Kleisli m (a, c) (b, c) -> Kleisli m a b Source #

costrongR :: Kleisli m (a, b) (a, c) -> Kleisli m b c Source #

Costrong Either ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Profunctor

Methods

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

costrongR :: (Either a b -> Either a c) -> b -> c 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 #

Costrong (,) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Profunctor

Methods

costrongL :: ((a, c) -> (b, c)) -> a -> b Source #

costrongR :: ((a, b) -> (a, c)) -> b -> c Source #

class Profunctor p => Closed f p where Source #

Methods

closed :: p a b -> p (f a) (f b) Source #

Instances
(Traversable f, Applicative p) => Closed f (Kleisli p) Source # 
Instance details

Defined in Data.Profunctor

Methods

closed :: Kleisli p a b -> Kleisli p (f a) (f b) Source #

(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 => Closed f ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Profunctor

Methods

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