hs-functors-0.1.6.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 (Tagged :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Profunctor

Methods

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

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

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

Profunctor (FnList a) Source # 
Instance details

Defined in Data.FnList

Methods

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

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

rmap :: (b -> c) -> FnList a a0 b -> FnList a a0 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 #

(Functor f, Profunctor p) => Profunctor (Tannen f p) Source # 
Instance details

Defined in Data.Profunctor

Methods

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

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

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

(Profunctor p, Functor f, Functor g) => Profunctor (Biff p f g) Source # 
Instance details

Defined in Data.Profunctor

Methods

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

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

rmap :: (b -> c) -> Biff p f g a b -> Biff p f g 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 => Lift f p where Source #

Methods

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

Instances
Applicative f => Lift f (Tagged :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Profunctor

Methods

lift :: Tagged a b -> Tagged (f a) (f b) Source #

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

Defined in Data.Profunctor

Methods

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

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

Defined in Data.Profunctor

Methods

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

Functor f => Lift f ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Profunctor

Methods

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

(Lift f p, Functor g) => Lift f (Tannen g p) Source # 
Instance details

Defined in Data.Profunctor

Methods

lift :: Tannen g p a b -> Tannen g p (f a) (f b) Source #

(Lift φ p, Functor f, Applicative g, Traversable φ, Cotraversable φ) => Lift φ (Biff p f g) Source # 
Instance details

Defined in Data.Profunctor

Methods

lift :: Biff p f g a b -> Biff p f g (φ a) (φ b) Source #

Cotraversable m => Lift ((->) a :: Type -> Type) (Kleisli m) Source # 
Instance details

Defined in Data.Profunctor

Methods

lift :: Kleisli m a0 b -> Kleisli m (a -> a0) (a -> b) Source #

Functor f => Lift ((->) a :: Type -> Type) (Cokleisli f) Source # 
Instance details

Defined in Data.Profunctor

Methods

lift :: Cokleisli f a0 b -> Cokleisli f (a -> a0) (a -> b) Source #

(Functor f, Cotraversable g, Lift ((->) a :: Type -> Type) p) => Lift ((->) a :: Type -> Type) (Biff p f g) Source # 
Instance details

Defined in Data.Profunctor

Methods

lift :: Biff p f g a0 b -> Biff p f g (a -> a0) (a -> b) Source #

class Profunctor p => Colift f p where Source #

Methods

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

Instances
(Colift f p, Functor g) => Colift f (Tannen g p) Source # 
Instance details

Defined in Data.Profunctor

Methods

colift :: Tannen g p (f a) (f b) -> Tannen g p a b Source #

Monad m => Colift (Either c) (Kleisli m) Source # 
Instance details

Defined in Data.Profunctor

Methods

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

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

Defined in Data.Profunctor

Methods

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

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

Defined in Data.Profunctor

Methods

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

Colift (Either c) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Profunctor

Methods

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

Functor ɯ => Colift ((,) c) (Cokleisli ɯ) Source # 
Instance details

Defined in Data.Profunctor

Methods

colift :: Cokleisli ɯ (c, a) (c, b) -> Cokleisli ɯ a b Source #

Colift ((,) c) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Profunctor

Methods

colift :: ((c, a) -> (c, b)) -> a -> b 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 #