profunctors-5.2: Profunctors

Data.Profunctor.Types

Description

For a good explanation of profunctors in Haskell see Dan Piponi's article:

Synopsis

# Documentation

class Profunctor p where Source #

Formally, the class Profunctor represents a profunctor from Hask -> Hask.

Intuitively it is a bifunctor where the first argument is contravariant and the second argument is covariant.

You can define a Profunctor by either defining dimap or by defining both lmap and rmap.

If you supply dimap, you should ensure that:

dimap id id ≡ id

If you supply lmap and rmap, ensure:

lmap id ≡ id
rmap id ≡ id


If you supply both, you should also ensure:

dimap f g ≡ lmap f . rmap g

These ensure by parametricity:

dimap (f . g) (h . i) ≡ dimap g h . dimap f i
lmap (f . g) ≡ lmap g . lmap f
rmap (f . g) ≡ rmap f . rmap g


Minimal complete definition

Methods

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

Map over both arguments at the same time.

dimap f g ≡ lmap f . rmap g

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

Map the first argument contravariantly.

lmap f ≡ dimap f id

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

Map the second argument covariantly.

rmap ≡ dimap id

Instances

 Profunctor (->) Source # Methodsdimap :: (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 #(#.) :: Coercible * c b => (b -> c) -> (a -> b) -> a -> c Source #(.#) :: Coercible * b a => (b -> c) -> (a -> b) -> a -> c Source # Monad m => Profunctor (Kleisli m) Source # Methodsdimap :: (a -> b) -> (c -> d) -> Kleisli m b c -> Kleisli m a d Source #lmap :: (a -> b) -> Kleisli m b c -> Kleisli m a c Source #rmap :: (b -> c) -> Kleisli m a b -> Kleisli m a c Source #(#.) :: Coercible * c b => (b -> c) -> Kleisli m a b -> Kleisli m a c Source #(.#) :: Coercible * b a => Kleisli m b c -> (a -> b) -> Kleisli m a c Source # Functor w => Profunctor (Cokleisli w) Source # Methodsdimap :: (a -> b) -> (c -> d) -> Cokleisli w b c -> Cokleisli w a d Source #lmap :: (a -> b) -> Cokleisli w b c -> Cokleisli w a c Source #rmap :: (b -> c) -> Cokleisli w a b -> Cokleisli w a c Source #(#.) :: Coercible * c b => (b -> c) -> Cokleisli w a b -> Cokleisli w a c Source #(.#) :: Coercible * b a => Cokleisli w b c -> (a -> b) -> Cokleisli w a c Source # Source # Methodsdimap :: (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 #(#.) :: Coercible * c b => (b -> c) -> Tagged * a b -> Tagged * a c Source #(.#) :: Coercible * b a => Tagged * b c -> (a -> b) -> Tagged * a c Source # Source # Methodsdimap :: (a -> b) -> (c -> d) -> Forget r b c -> Forget r a d Source #lmap :: (a -> b) -> Forget r b c -> Forget r a c Source #rmap :: (b -> c) -> Forget r a b -> Forget r a c Source #(#.) :: Coercible * c b => (b -> c) -> Forget r a b -> Forget r a c Source #(.#) :: Coercible * b a => Forget r b c -> (a -> b) -> Forget r a c Source # Arrow p => Profunctor (WrappedArrow p) Source # Methodsdimap :: (a -> b) -> (c -> d) -> WrappedArrow p b c -> WrappedArrow p a d Source #lmap :: (a -> b) -> WrappedArrow p b c -> WrappedArrow p a c Source #rmap :: (b -> c) -> WrappedArrow p a b -> WrappedArrow p a c Source #(#.) :: Coercible * c b => (b -> c) -> WrappedArrow p a b -> WrappedArrow p a c Source #(.#) :: Coercible * b a => WrappedArrow p b c -> (a -> b) -> WrappedArrow p a c Source # Functor f => Profunctor (Costar f) Source # Methodsdimap :: (a -> b) -> (c -> d) -> Costar f b c -> Costar f a d Source #lmap :: (a -> b) -> Costar f b c -> Costar f a c Source #rmap :: (b -> c) -> Costar f a b -> Costar f a c Source #(#.) :: Coercible * c b => (b -> c) -> Costar f a b -> Costar f a c Source #(.#) :: Coercible * b a => Costar f b c -> (a -> b) -> Costar f a c Source # Functor f => Profunctor (Star f) Source # Methodsdimap :: (a -> b) -> (c -> d) -> Star f b c -> Star f a d Source #lmap :: (a -> b) -> Star f b c -> Star f a c Source #rmap :: (b -> c) -> Star f a b -> Star f a c Source #(#.) :: Coercible * c b => (b -> c) -> Star f a b -> Star f a c Source #(.#) :: Coercible * b a => Star f b c -> (a -> b) -> Star f a c Source # Source # Methodsdimap :: (a -> b) -> (c -> d) -> Copastro p b c -> Copastro p a d Source #lmap :: (a -> b) -> Copastro p b c -> Copastro p a c Source #rmap :: (b -> c) -> Copastro p a b -> Copastro p a c Source #(#.) :: Coercible * c b => (b -> c) -> Copastro p a b -> Copastro p a c Source #(.#) :: Coercible * b a => Copastro p b c -> (a -> b) -> Copastro p a c Source # Source # Methodsdimap :: (a -> b) -> (c -> d) -> Cotambara p b c -> Cotambara p a d Source #lmap :: (a -> b) -> Cotambara p b c -> Cotambara p a c Source #rmap :: (b -> c) -> Cotambara p a b -> Cotambara p a c Source #(#.) :: Coercible * c b => (b -> c) -> Cotambara p a b -> Cotambara p a c Source #(.#) :: Coercible * b a => Cotambara p b c -> (a -> b) -> Cotambara p a c Source # Source # Methodsdimap :: (a -> b) -> (c -> d) -> Pastro p b c -> Pastro p a d Source #lmap :: (a -> b) -> Pastro p b c -> Pastro p a c Source #rmap :: (b -> c) -> Pastro p a b -> Pastro p a c Source #(#.) :: Coercible * c b => (b -> c) -> Pastro p a b -> Pastro p a c Source #(.#) :: Coercible * b a => Pastro p b c -> (a -> b) -> Pastro p a c Source # Profunctor p => Profunctor (Tambara p) Source # Methodsdimap :: (a -> b) -> (c -> d) -> Tambara p b c -> Tambara p a d Source #lmap :: (a -> b) -> Tambara p b c -> Tambara p a c Source #rmap :: (b -> c) -> Tambara p a b -> Tambara p a c Source #(#.) :: Coercible * c b => (b -> c) -> Tambara p a b -> Tambara p a c Source #(.#) :: Coercible * b a => Tambara p b c -> (a -> b) -> Tambara p a c Source # Source # Methodsdimap :: (a -> b) -> (c -> d) -> CopastroSum p b c -> CopastroSum p a d Source #lmap :: (a -> b) -> CopastroSum p b c -> CopastroSum p a c Source #rmap :: (b -> c) -> CopastroSum p a b -> CopastroSum p a c Source #(#.) :: Coercible * c b => (b -> c) -> CopastroSum p a b -> CopastroSum p a c Source #(.#) :: Coercible * b a => CopastroSum p b c -> (a -> b) -> CopastroSum p a c Source # Source # Methodsdimap :: (a -> b) -> (c -> d) -> CotambaraSum p b c -> CotambaraSum p a d Source #lmap :: (a -> b) -> CotambaraSum p b c -> CotambaraSum p a c Source #rmap :: (b -> c) -> CotambaraSum p a b -> CotambaraSum p a c Source #(#.) :: Coercible * c b => (b -> c) -> CotambaraSum p a b -> CotambaraSum p a c Source #(.#) :: Coercible * b a => CotambaraSum p b c -> (a -> b) -> CotambaraSum p a c Source # Source # Methodsdimap :: (a -> b) -> (c -> d) -> PastroSum p b c -> PastroSum p a d Source #lmap :: (a -> b) -> PastroSum p b c -> PastroSum p a c Source #rmap :: (b -> c) -> PastroSum p a b -> PastroSum p a c Source #(#.) :: Coercible * c b => (b -> c) -> PastroSum p a b -> PastroSum p a c Source #(.#) :: Coercible * b a => PastroSum p b c -> (a -> b) -> PastroSum p a c Source # Source # Methodsdimap :: (a -> b) -> (c -> d) -> TambaraSum p b c -> TambaraSum p a d Source #lmap :: (a -> b) -> TambaraSum p b c -> TambaraSum p a c Source #rmap :: (b -> c) -> TambaraSum p a b -> TambaraSum p a c Source #(#.) :: Coercible * c b => (b -> c) -> TambaraSum p a b -> TambaraSum p a c Source #(.#) :: Coercible * b a => TambaraSum p b c -> (a -> b) -> TambaraSum p a c Source # Source # Methodsdimap :: (a -> b) -> (c -> d) -> Environment p b c -> Environment p a d Source #lmap :: (a -> b) -> Environment p b c -> Environment p a c Source #rmap :: (b -> c) -> Environment p a b -> Environment p a c Source #(#.) :: Coercible * c b => (b -> c) -> Environment p a b -> Environment p a c Source #(.#) :: Coercible * b a => Environment p b c -> (a -> b) -> Environment p a c Source # Profunctor p => Profunctor (Closure p) Source # Methodsdimap :: (a -> b) -> (c -> d) -> Closure p b c -> Closure p a d Source #lmap :: (a -> b) -> Closure p b c -> Closure p a c Source #rmap :: (b -> c) -> Closure p a b -> Closure p a c Source #(#.) :: Coercible * c b => (b -> c) -> Closure p a b -> Closure p a c Source #(.#) :: Coercible * b a => Closure p b c -> (a -> b) -> Closure p a c Source # Source # Methodsdimap :: (a -> b) -> (c -> d) -> FreeTraversing p b c -> FreeTraversing p a d Source #lmap :: (a -> b) -> FreeTraversing p b c -> FreeTraversing p a c Source #rmap :: (b -> c) -> FreeTraversing p a b -> FreeTraversing p a c Source #(#.) :: Coercible * c b => (b -> c) -> FreeTraversing p a b -> FreeTraversing p a c Source #(.#) :: Coercible * b a => FreeTraversing p b c -> (a -> b) -> FreeTraversing p a c Source # Source # Methodsdimap :: (a -> b) -> (c -> d) -> CofreeTraversing p b c -> CofreeTraversing p a d Source #lmap :: (a -> b) -> CofreeTraversing p b c -> CofreeTraversing p a c Source #rmap :: (b -> c) -> CofreeTraversing p a b -> CofreeTraversing p a c Source #(#.) :: Coercible * c b => (b -> c) -> CofreeTraversing p a b -> CofreeTraversing p a c Source #(.#) :: Coercible * b a => CofreeTraversing p b c -> (a -> b) -> CofreeTraversing p a c Source # Source # Methodsdimap :: (a -> b) -> (c -> d) -> FreeMapping p b c -> FreeMapping p a d Source #lmap :: (a -> b) -> FreeMapping p b c -> FreeMapping p a c Source #rmap :: (b -> c) -> FreeMapping p a b -> FreeMapping p a c Source #(#.) :: Coercible * c b => (b -> c) -> FreeMapping p a b -> FreeMapping p a c Source #(.#) :: Coercible * b a => FreeMapping p b c -> (a -> b) -> FreeMapping p a c Source # Source # Methodsdimap :: (a -> b) -> (c -> d) -> CofreeMapping p b c -> CofreeMapping p a d Source #lmap :: (a -> b) -> CofreeMapping p b c -> CofreeMapping p a c Source #rmap :: (b -> c) -> CofreeMapping p a b -> CofreeMapping p a c Source #(#.) :: Coercible * c b => (b -> c) -> CofreeMapping p a b -> CofreeMapping p a c Source #(.#) :: Coercible * b a => CofreeMapping p b c -> (a -> b) -> CofreeMapping p a c Source # Source # Methodsdimap :: (a -> b) -> (c -> d) -> Codensity p b c -> Codensity p a d Source #lmap :: (a -> b) -> Codensity p b c -> Codensity p a c Source #rmap :: (b -> c) -> Codensity p a b -> Codensity p a c Source #(#.) :: Coercible * c b => (b -> c) -> Codensity p a b -> Codensity p a c Source #(.#) :: Coercible * b a => Codensity p b c -> (a -> b) -> Codensity p a c Source # (Functor f, Profunctor p) => Profunctor (Cayley f p) Source # Methodsdimap :: (a -> b) -> (c -> d) -> Cayley f p b c -> Cayley f p a d Source #lmap :: (a -> b) -> Cayley f p b c -> Cayley f p a c Source #rmap :: (b -> c) -> Cayley f p a b -> Cayley f p a c Source #(#.) :: Coercible * c b => (b -> c) -> Cayley f p a b -> Cayley f p a c Source #(.#) :: Coercible * b a => Cayley f p b c -> (a -> b) -> Cayley f p a c Source # (Profunctor p, Profunctor q) => Profunctor (Rift p q) Source # Methodsdimap :: (a -> b) -> (c -> d) -> Rift p q b c -> Rift p q a d Source #lmap :: (a -> b) -> Rift p q b c -> Rift p q a c Source #rmap :: (b -> c) -> Rift p q a b -> Rift p q a c Source #(#.) :: Coercible * c b => (b -> c) -> Rift p q a b -> Rift p q a c Source #(.#) :: Coercible * b a => Rift p q b c -> (a -> b) -> Rift p q a c Source # (Profunctor p, Profunctor q) => Profunctor (Procompose p q) Source # Methodsdimap :: (a -> b) -> (c -> d) -> Procompose p q b c -> Procompose p q a d Source #lmap :: (a -> b) -> Procompose p q b c -> Procompose p q a c Source #rmap :: (b -> c) -> Procompose p q a b -> Procompose p q a c Source #(#.) :: Coercible * c b => (b -> c) -> Procompose p q a b -> Procompose p q a c Source #(.#) :: Coercible * b a => Procompose p q b c -> (a -> b) -> Procompose p q a c Source # (Profunctor p, Profunctor q) => Profunctor (Ran p q) Source # Methodsdimap :: (a -> b) -> (c -> d) -> Ran p q b c -> Ran p q a d Source #lmap :: (a -> b) -> Ran p q b c -> Ran p q a c Source #rmap :: (b -> c) -> Ran p q a b -> Ran p q a c Source #(#.) :: Coercible * c b => (b -> c) -> Ran p q a b -> Ran p q a c Source #(.#) :: Coercible * b a => Ran p q b c -> (a -> b) -> Ran p q a c Source # Functor f => Profunctor (Joker * * f) Source # Methodsdimap :: (a -> b) -> (c -> d) -> Joker * * f b c -> Joker * * f a d Source #lmap :: (a -> b) -> Joker * * f b c -> Joker * * f a c Source #rmap :: (b -> c) -> Joker * * f a b -> Joker * * f a c Source #(#.) :: Coercible * c b => (b -> c) -> Joker * * f a b -> Joker * * f a c Source #(.#) :: Coercible * b a => Joker * * f b c -> (a -> b) -> Joker * * f a c Source # Source # Methodsdimap :: (a -> b) -> (c -> d) -> Clown * * f b c -> Clown * * f a d Source #lmap :: (a -> b) -> Clown * * f b c -> Clown * * f a c Source #rmap :: (b -> c) -> Clown * * f a b -> Clown * * f a c Source #(#.) :: Coercible * c b => (b -> c) -> Clown * * f a b -> Clown * * f a c Source #(.#) :: Coercible * b a => Clown * * f b c -> (a -> b) -> Clown * * f a c Source # (Profunctor p, Profunctor q) => Profunctor (Product * * p q) Source # Methodsdimap :: (a -> b) -> (c -> d) -> Product * * p q b c -> Product * * p q a d Source #lmap :: (a -> b) -> Product * * p q b c -> Product * * p q a c Source #rmap :: (b -> c) -> Product * * p q a b -> Product * * p q a c Source #(#.) :: Coercible * c b => (b -> c) -> Product * * p q a b -> Product * * p q a c Source #(.#) :: Coercible * b a => Product * * p q b c -> (a -> b) -> Product * * p q a c Source # (Functor f, Profunctor p) => Profunctor (Tannen * * * f p) Source # Methodsdimap :: (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 #(#.) :: Coercible * c b => (b -> c) -> Tannen * * * f p a b -> Tannen * * * f p a c Source #(.#) :: Coercible * b a => Tannen * * * f p b c -> (a -> b) -> Tannen * * * f p a c Source # (Profunctor p, Functor f, Functor g) => Profunctor (Biff * * * * p f g) Source # Methodsdimap :: (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 #(#.) :: Coercible * c b => (b -> c) -> Biff * * * * p f g a b -> Biff * * * * p f g a c Source #(.#) :: Coercible * b a => Biff * * * * p f g b c -> (a -> b) -> Biff * * * * p f g a c Source #

newtype Star f d c Source #

Lift a Functor into a Profunctor (forwards).

Constructors

 Star FieldsrunStar :: d -> f c

Instances

 Functor f => Profunctor (Star f) Source # Methodsdimap :: (a -> b) -> (c -> d) -> Star f b c -> Star f a d Source #lmap :: (a -> b) -> Star f b c -> Star f a c Source #rmap :: (b -> c) -> Star f a b -> Star f a c Source #(#.) :: Coercible * c b => (b -> c) -> Star f a b -> Star f a c Source #(.#) :: Coercible * b a => Star f b c -> (a -> b) -> Star f a c Source # Functor m => Strong (Star m) Source # Methodsfirst' :: Star m a b -> Star m (a, c) (b, c) Source #second' :: Star m a b -> Star m (c, a) (c, b) Source # Traversable f => Cochoice (Star f) Source # Methodsunleft :: Star f (Either a d) (Either b d) -> Star f a b Source #unright :: Star f (Either d a) (Either d b) -> Star f a b Source # Applicative f => Choice (Star f) Source # Methodsleft' :: Star f a b -> Star f (Either a c) (Either b c) Source #right' :: Star f a b -> Star f (Either c a) (Either c b) Source # Distributive f => Closed (Star f) Source # Methodsclosed :: Star f a b -> Star f (x -> a) (x -> b) Source # Applicative m => Traversing (Star m) Source # Methodstraverse' :: Traversable f => Star m a b -> Star m (f a) (f b) Source #wander :: (forall f. Applicative f => (a -> f b) -> s -> f t) -> Star m a b -> Star m s t Source # (Applicative m, Distributive m) => Mapping (Star m) Source # Methodsmap' :: Functor f => Star m a b -> Star m (f a) (f b) Source # Functor f => Representable (Star f) Source # Associated Typestype Rep (Star f :: * -> * -> *) :: * -> * Source # Methodstabulate :: (d -> Rep (Star f) c) -> Star f d c Source # Functor f => Sieve (Star f) f Source # Methodssieve :: Star f a b -> a -> f b Source # Monad f => Monad (Star f a) Source # Methods(>>=) :: Star f a a -> (a -> Star f a b) -> Star f a b #(>>) :: Star f a a -> Star f a b -> Star f a b #return :: a -> Star f a a #fail :: String -> Star f a a # Functor f => Functor (Star f a) Source # Methodsfmap :: (a -> b) -> Star f a a -> Star f a b #(<$) :: a -> Star f a b -> Star f a a # Applicative f => Applicative (Star f a) Source # Methodspure :: a -> Star f a a #(<*>) :: Star f a (a -> b) -> Star f a a -> Star f a b #(*>) :: Star f a a -> Star f a b -> Star f a b #(<*) :: Star f a a -> Star f a b -> Star f a a # Alternative f => Alternative (Star f a) Source # Methodsempty :: Star f a a #(<|>) :: Star f a a -> Star f a a -> Star f a a #some :: Star f a a -> Star f a [a] #many :: Star f a a -> Star f a [a] # MonadPlus f => MonadPlus (Star f a) Source # Methodsmzero :: Star f a a #mplus :: Star f a a -> Star f a a -> Star f a a # Distributive f => Distributive (Star f a) Source # Methodsdistribute :: Functor f => f (Star f a a) -> Star f a (f a) #collect :: Functor f => (a -> Star f a b) -> f a -> Star f a (f b) #distributeM :: Monad m => m (Star f a a) -> Star f a (m a) #collectM :: Monad m => (a -> Star f a b) -> m a -> Star f a (m b) # type Rep (Star f) Source # type Rep (Star f) = f newtype Costar f d c Source # Lift a Functor into a Profunctor (backwards). Constructors  Costar FieldsrunCostar :: f d -> c Instances  Functor f => Profunctor (Costar f) Source # Methodsdimap :: (a -> b) -> (c -> d) -> Costar f b c -> Costar f a d Source #lmap :: (a -> b) -> Costar f b c -> Costar f a c Source #rmap :: (b -> c) -> Costar f a b -> Costar f a c Source #(#.) :: Coercible * c b => (b -> c) -> Costar f a b -> Costar f a c Source #(.#) :: Coercible * b a => Costar f b c -> (a -> b) -> Costar f a c Source # Functor f => Costrong (Costar f) Source # Methodsunfirst :: Costar f (a, d) (b, d) -> Costar f a b Source #unsecond :: Costar f (d, a) (d, b) -> Costar f a b Source # Applicative f => Cochoice (Costar f) Source # Methodsunleft :: Costar f (Either a d) (Either b d) -> Costar f a b Source #unright :: Costar f (Either d a) (Either d b) -> Costar f a b Source # Traversable w => Choice (Costar w) Source # Methodsleft' :: Costar w a b -> Costar w (Either a c) (Either b c) Source #right' :: Costar w a b -> Costar w (Either c a) (Either c b) Source # Functor f => Closed (Costar f) Source # Methodsclosed :: Costar f a b -> Costar f (x -> a) (x -> b) Source # Functor f => Corepresentable (Costar f) Source # Associated Typestype Corep (Costar f :: * -> * -> *) :: * -> * Source # Methodscotabulate :: (Corep (Costar f) d -> c) -> Costar f d c Source # Functor f => Cosieve (Costar f) f Source # Methodscosieve :: Costar f a b -> f a -> b Source # Monad (Costar f a) Source # Methods(>>=) :: Costar f a a -> (a -> Costar f a b) -> Costar f a b #(>>) :: Costar f a a -> Costar f a b -> Costar f a b #return :: a -> Costar f a a #fail :: String -> Costar f a a # Functor (Costar f a) Source # Methodsfmap :: (a -> b) -> Costar f a a -> Costar f a b #(<$) :: a -> Costar f a b -> Costar f a a # Applicative (Costar f a) Source # Methodspure :: a -> Costar f a a #(<*>) :: Costar f a (a -> b) -> Costar f a a -> Costar f a b #(*>) :: Costar f a a -> Costar f a b -> Costar f a b #(<*) :: Costar f a a -> Costar f a b -> Costar f a a # Distributive (Costar f d) Source # Methodsdistribute :: Functor f => f (Costar f d a) -> Costar f d (f a) #collect :: Functor f => (a -> Costar f d b) -> f a -> Costar f d (f b) #distributeM :: Monad m => m (Costar f d a) -> Costar f d (m a) #collectM :: Monad m => (a -> Costar f d b) -> m a -> Costar f d (m b) # type Corep (Costar f) Source # type Corep (Costar f) = f

newtype WrappedArrow p a b Source #

Wrap an arrow for use as a Profunctor.

Constructors

 WrapArrow FieldsunwrapArrow :: p a b

Instances

 Arrow p => Arrow (WrappedArrow p) Source # Methodsarr :: (b -> c) -> WrappedArrow p b c #first :: WrappedArrow p b c -> WrappedArrow p (b, d) (c, d) #second :: WrappedArrow p b c -> WrappedArrow p (d, b) (d, c) #(***) :: WrappedArrow p b c -> WrappedArrow p b' c' -> WrappedArrow p (b, b') (c, c') #(&&&) :: WrappedArrow p b c -> WrappedArrow p b c' -> WrappedArrow p b (c, c') # Source # MethodszeroArrow :: WrappedArrow p b c # Source # Methodsleft :: WrappedArrow p b c -> WrappedArrow p (Either b d) (Either c d) #right :: WrappedArrow p b c -> WrappedArrow p (Either d b) (Either d c) #(+++) :: WrappedArrow p b c -> WrappedArrow p b' c' -> WrappedArrow p (Either b b') (Either c c') #(|||) :: WrappedArrow p b d -> WrappedArrow p c d -> WrappedArrow p (Either b c) d # Source # Methodsapp :: WrappedArrow p (WrappedArrow p b c, b) c # Source # Methodsloop :: WrappedArrow p (b, d) (c, d) -> WrappedArrow p b c # Arrow p => Profunctor (WrappedArrow p) Source # Methodsdimap :: (a -> b) -> (c -> d) -> WrappedArrow p b c -> WrappedArrow p a d Source #lmap :: (a -> b) -> WrappedArrow p b c -> WrappedArrow p a c Source #rmap :: (b -> c) -> WrappedArrow p a b -> WrappedArrow p a c Source #(#.) :: Coercible * c b => (b -> c) -> WrappedArrow p a b -> WrappedArrow p a c Source #(.#) :: Coercible * b a => WrappedArrow p b c -> (a -> b) -> WrappedArrow p a c Source # Source # Methodsunfirst :: WrappedArrow p (a, d) (b, d) -> WrappedArrow p a b Source #unsecond :: WrappedArrow p (d, a) (d, b) -> WrappedArrow p a b Source # Arrow p => Strong (WrappedArrow p) Source # Arrow is Strong Category Methodsfirst' :: WrappedArrow p a b -> WrappedArrow p (a, c) (b, c) Source #second' :: WrappedArrow p a b -> WrappedArrow p (c, a) (c, b) Source # Source # Methodsleft' :: WrappedArrow p a b -> WrappedArrow p (Either a c) (Either b c) Source #right' :: WrappedArrow p a b -> WrappedArrow p (Either c a) (Either c b) Source # Source # Methodsid :: cat a a #(.) :: cat b c -> cat a b -> cat a c #

newtype Forget r a b Source #

Constructors

 Forget FieldsrunForget :: a -> r

Instances

 Source # Methodsdimap :: (a -> b) -> (c -> d) -> Forget r b c -> Forget r a d Source #lmap :: (a -> b) -> Forget r b c -> Forget r a c Source #rmap :: (b -> c) -> Forget r a b -> Forget r a c Source #(#.) :: Coercible * c b => (b -> c) -> Forget r a b -> Forget r a c Source #(.#) :: Coercible * b a => Forget r b c -> (a -> b) -> Forget r a c Source # Strong (Forget r) Source # Methodsfirst' :: Forget r a b -> Forget r (a, c) (b, c) Source #second' :: Forget r a b -> Forget r (c, a) (c, b) Source # Monoid r => Choice (Forget r) Source # Methodsleft' :: Forget r a b -> Forget r (Either a c) (Either b c) Source #right' :: Forget r a b -> Forget r (Either c a) (Either c b) Source # Source # Associated Typestype Rep (Forget r :: * -> * -> *) :: * -> * Source # Methodstabulate :: (d -> Rep (Forget r) c) -> Forget r d c Source # Sieve (Forget r) (Const * r) Source # Methodssieve :: Forget r a b -> a -> Const * r b Source # Functor (Forget r a) Source # Methodsfmap :: (a -> b) -> Forget r a a -> Forget r a b #(<\$) :: a -> Forget r a b -> Forget r a a # Foldable (Forget r a) Source # Methodsfold :: Monoid m => Forget r a m -> m #foldMap :: Monoid m => (a -> m) -> Forget r a a -> m #foldr :: (a -> b -> b) -> b -> Forget r a a -> b #foldr' :: (a -> b -> b) -> b -> Forget r a a -> b #foldl :: (b -> a -> b) -> b -> Forget r a a -> b #foldl' :: (b -> a -> b) -> b -> Forget r a a -> b #foldr1 :: (a -> a -> a) -> Forget r a a -> a #foldl1 :: (a -> a -> a) -> Forget r a a -> a #toList :: Forget r a a -> [a] #null :: Forget r a a -> Bool #length :: Forget r a a -> Int #elem :: Eq a => a -> Forget r a a -> Bool #maximum :: Ord a => Forget r a a -> a #minimum :: Ord a => Forget r a a -> a #sum :: Num a => Forget r a a -> a #product :: Num a => Forget r a a -> a # Traversable (Forget r a) Source # Methodstraverse :: Applicative f => (a -> f b) -> Forget r a a -> f (Forget r a b) #sequenceA :: Applicative f => Forget r a (f a) -> f (Forget r a a) #mapM :: Monad m => (a -> m b) -> Forget r a a -> m (Forget r a b) #sequence :: Monad m => Forget r a (m a) -> m (Forget r a a) # type Rep (Forget r) Source # type Rep (Forget r) = Const * r

type (:->) p q = forall a b. p a b -> q a b infixr 0 Source #