hs-profunctors-0.1.0.0: Profunctors from Haskell 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 => Related f p where Source #

Methods

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

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

Defined in Data.Profunctor

Methods

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

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

Defined in Data.Profunctor

Methods

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

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

Defined in Data.Profunctor

Methods

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

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

Defined in Data.Profunctor

Methods

relate :: Cokleisli ɯ a0 b -> Cokleisli ɯ (Either a a0) (Either a b) Source #

class Profunctor p => Corelated f p where Source #

Methods

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

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

Defined in Data.Profunctor

Methods

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

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

Defined in Data.Profunctor

Methods

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

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

Defined in Data.Profunctor

Methods

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

Corelated (Either a) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Profunctor

Methods

corelate :: (Either a a0 -> Either a b) -> a0 -> b Source #

Corelated ((,) a) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Profunctor

Methods

corelate :: ((a, a0) -> (a, b)) -> a0 -> b Source #