profunctors-5.2.1: Profunctors

Data.Profunctor

Description

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

Synopsis

# Profunctors

class Profunctor p where #

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 #

Map over both arguments at the same time.

dimap f g ≡ lmap f . rmap g

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

Map the first argument contravariantly.

lmap f ≡ dimap f id

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

Map the second argument covariantly.

rmap ≡ dimap id

Instances

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

## Profunctorial Strength

class Profunctor p => Strong p where #

Generalizing Star of a strong Functor

Note: Every Functor in Haskell is strong with respect to (,).

This describes profunctor strength with respect to the product structure of Hask.

Minimal complete definition

Methods

first' :: p a b -> p (a, c) (b, c) #

Laws:

first' ≡ dimap swap swap . second'
lmap fst ≡ rmap fst . first'
lmap (second f) . first' ≡ rmap (second f) . first
first' . first' ≡ dimap assoc unassoc . first' where
assoc ((a,b),c) = (a,(b,c))
unassoc (a,(b,c)) = ((a,b),c)


second' :: p a b -> p (c, a) (c, b) #

Laws:

second' ≡ dimap swap swap . first'
lmap snd ≡ rmap snd . second'
lmap (first f) . second' ≡ rmap (first f) . second'
second' . second' ≡ dimap unassoc assoc . second' where
assoc ((a,b),c) = (a,(b,c))
unassoc (a,(b,c)) = ((a,b),c)


Instances

 Strong (->) # Methodsfirst' :: (a -> b) -> (a, c) -> (b, c) #second' :: (a -> b) -> (c, a) -> (c, b) # Monad m => Strong (Kleisli m) # Methodsfirst' :: Kleisli m a b -> Kleisli m (a, c) (b, c) #second' :: Kleisli m a b -> Kleisli m (c, a) (c, b) # Strong (Forget r) # Methodsfirst' :: Forget r a b -> Forget r (a, c) (b, c) #second' :: Forget r a b -> Forget r (c, a) (c, b) # Arrow p => Strong (WrappedArrow p) # Arrow is Strong Category Methodsfirst' :: WrappedArrow p a b -> WrappedArrow p (a, c) (b, c) #second' :: WrappedArrow p a b -> WrappedArrow p (c, a) (c, b) # Functor m => Strong (Star m) # Methodsfirst' :: Star m a b -> Star m (a, c) (b, c) #second' :: Star m a b -> Star m (c, a) (c, b) # Strong (Pastro p) # Methodsfirst' :: Pastro p a b -> Pastro p (a, c) (b, c) #second' :: Pastro p a b -> Pastro p (c, a) (c, b) # Profunctor p => Strong (Tambara p) # Methodsfirst' :: Tambara p a b -> Tambara p (a, c) (b, c) #second' :: Tambara p a b -> Tambara p (c, a) (c, b) # Strong p => Strong (Closure p) # Methodsfirst' :: Closure p a b -> Closure p (a, c) (b, c) #second' :: Closure p a b -> Closure p (c, a) (c, b) # # Methodsfirst' :: FreeTraversing p a b -> FreeTraversing p (a, c) (b, c) #second' :: FreeTraversing p a b -> FreeTraversing p (c, a) (c, b) # # Methodsfirst' :: CofreeTraversing p a b -> CofreeTraversing p (a, c) (b, c) #second' :: CofreeTraversing p a b -> CofreeTraversing p (c, a) (c, b) # # Methodsfirst' :: FreeMapping p a b -> FreeMapping p (a, c) (b, c) #second' :: FreeMapping p a b -> FreeMapping p (c, a) (c, b) # # Methodsfirst' :: CofreeMapping p a b -> CofreeMapping p (a, c) (b, c) #second' :: CofreeMapping p a b -> CofreeMapping p (c, a) (c, b) # Strong p => Strong (Coyoneda p) # Methodsfirst' :: Coyoneda p a b -> Coyoneda p (a, c) (b, c) #second' :: Coyoneda p a b -> Coyoneda p (c, a) (c, b) # Strong p => Strong (Yoneda p) # Methodsfirst' :: Yoneda p a b -> Yoneda p (a, c) (b, c) #second' :: Yoneda p a b -> Yoneda p (c, a) (c, b) # (Functor f, Strong p) => Strong (Cayley f p) # Methodsfirst' :: Cayley f p a b -> Cayley f p (a, c) (b, c) #second' :: Cayley f p a b -> Cayley f p (c, a) (c, b) # (Strong p, Strong q) => Strong (Procompose p q) # Methodsfirst' :: Procompose p q a b -> Procompose p q (a, c) (b, c) #second' :: Procompose p q a b -> Procompose p q (c, a) (c, b) # Contravariant f => Strong (Clown * * f) # Methodsfirst' :: Clown * * f a b -> Clown * * f (a, c) (b, c) #second' :: Clown * * f a b -> Clown * * f (c, a) (c, b) # (Strong p, Strong q) => Strong (Product * * p q) # Methodsfirst' :: Product * * p q a b -> Product * * p q (a, c) (b, c) #second' :: Product * * p q a b -> Product * * p q (c, a) (c, b) # (Functor f, Strong p) => Strong (Tannen * * * f p) # Methodsfirst' :: Tannen * * * f p a b -> Tannen * * * f p (a, c) (b, c) #second' :: Tannen * * * f p a b -> Tannen * * * f p (c, a) (c, b) #

uncurry' :: Strong p => p a (b -> c) -> p (a, b) c #

class Profunctor p => Choice p where #

The generalization of Costar of Functor that is strong with respect to Either.

Note: This is also a notion of strength, except with regards to another monoidal structure that we can choose to equip Hask with: the cocartesian coproduct.

Minimal complete definition

Methods

left' :: p a b -> p (Either a c) (Either b c) #

Laws:

left' ≡ dimap swapE swapE . right' where
swapE :: Either a b -> Either b a
swapE = either Right Left
rmap Left ≡ lmap Left . left'
lmap (right f) . left' ≡ rmap (right f) . left'
left' . left' ≡ dimap assocE unassocE . left' where
assocE :: Either (Either a b) c -> Either a (Either b c)
assocE (Left (Left a)) = Left a
assocE (Left (Right b)) = Right (Left b)
assocE (Right c) = Right (Right c)
unassocE :: Either a (Either b c) -> Either (Either a b) c
unassocE (Left a) = Left (Left a)
unassocE (Right (Left b) = Left (Right b)
unassocE (Right (Right c)) = Right c)


right' :: p a b -> p (Either c a) (Either c b) #

Laws:

right' ≡ dimap swapE swapE . left' where
swapE :: Either a b -> Either b a
swapE = either Right Left
rmap Right ≡ lmap Right . right'
lmap (left f) . right' ≡ rmap (left f) . right'
right' . right' ≡ dimap unassocE assocE . right' where
assocE :: Either (Either a b) c -> Either a (Either b c)
assocE (Left (Left a)) = Left a
assocE (Left (Right b)) = Right (Left b)
assocE (Right c) = Right (Right c)
unassocE :: Either a (Either b c) -> Either (Either a b) c
unassocE (Left a) = Left (Left a)
unassocE (Right (Left b) = Left (Right b)
unassocE (Right (Right c)) = Right c)


Instances

 Choice (->) # Methodsleft' :: (a -> b) -> Either a c -> Either b c #right' :: (a -> b) -> Either c a -> Either c b # Monad m => Choice (Kleisli m) # Methodsleft' :: Kleisli m a b -> Kleisli m (Either a c) (Either b c) #right' :: Kleisli m a b -> Kleisli m (Either c a) (Either c b) # Comonad w => Choice (Cokleisli w) # extract approximates costrength Methodsleft' :: Cokleisli w a b -> Cokleisli w (Either a c) (Either b c) #right' :: Cokleisli w a b -> Cokleisli w (Either c a) (Either c b) # # Methodsleft' :: Tagged * a b -> Tagged * (Either a c) (Either b c) #right' :: Tagged * a b -> Tagged * (Either c a) (Either c b) # Monoid r => Choice (Forget r) # Methodsleft' :: Forget r a b -> Forget r (Either a c) (Either b c) #right' :: Forget r a b -> Forget r (Either c a) (Either c b) # # Methodsleft' :: WrappedArrow p a b -> WrappedArrow p (Either a c) (Either b c) #right' :: WrappedArrow p a b -> WrappedArrow p (Either c a) (Either c b) # Traversable w => Choice (Costar w) # Methodsleft' :: Costar w a b -> Costar w (Either a c) (Either b c) #right' :: Costar w a b -> Costar w (Either c a) (Either c b) # Applicative f => Choice (Star f) # Methodsleft' :: Star f a b -> Star f (Either a c) (Either b c) #right' :: Star f a b -> Star f (Either c a) (Either c b) # Choice p => Choice (Tambara p) # Methodsleft' :: Tambara p a b -> Tambara p (Either a c) (Either b c) #right' :: Tambara p a b -> Tambara p (Either c a) (Either c b) # # Methodsleft' :: PastroSum p a b -> PastroSum p (Either a c) (Either b c) #right' :: PastroSum p a b -> PastroSum p (Either c a) (Either c b) # Profunctor p => Choice (TambaraSum p) # Methodsleft' :: TambaraSum p a b -> TambaraSum p (Either a c) (Either b c) #right' :: TambaraSum p a b -> TambaraSum p (Either c a) (Either c b) # # Methodsleft' :: FreeTraversing p a b -> FreeTraversing p (Either a c) (Either b c) #right' :: FreeTraversing p a b -> FreeTraversing p (Either c a) (Either c b) # # Methodsleft' :: CofreeTraversing p a b -> CofreeTraversing p (Either a c) (Either b c) #right' :: CofreeTraversing p a b -> CofreeTraversing p (Either c a) (Either c b) # # Methodsleft' :: FreeMapping p a b -> FreeMapping p (Either a c) (Either b c) #right' :: FreeMapping p a b -> FreeMapping p (Either c a) (Either c b) # # Methodsleft' :: CofreeMapping p a b -> CofreeMapping p (Either a c) (Either b c) #right' :: CofreeMapping p a b -> CofreeMapping p (Either c a) (Either c b) # Choice p => Choice (Coyoneda p) # Methodsleft' :: Coyoneda p a b -> Coyoneda p (Either a c) (Either b c) #right' :: Coyoneda p a b -> Coyoneda p (Either c a) (Either c b) # Choice p => Choice (Yoneda p) # Methodsleft' :: Yoneda p a b -> Yoneda p (Either a c) (Either b c) #right' :: Yoneda p a b -> Yoneda p (Either c a) (Either c b) # (Functor f, Choice p) => Choice (Cayley f p) # Methodsleft' :: Cayley f p a b -> Cayley f p (Either a c) (Either b c) #right' :: Cayley f p a b -> Cayley f p (Either c a) (Either c b) # (Choice p, Choice q) => Choice (Procompose p q) # Methodsleft' :: Procompose p q a b -> Procompose p q (Either a c) (Either b c) #right' :: Procompose p q a b -> Procompose p q (Either c a) (Either c b) # Functor f => Choice (Joker * * f) # Methodsleft' :: Joker * * f a b -> Joker * * f (Either a c) (Either b c) #right' :: Joker * * f a b -> Joker * * f (Either c a) (Either c b) # (Choice p, Choice q) => Choice (Product * * p q) # Methodsleft' :: Product * * p q a b -> Product * * p q (Either a c) (Either b c) #right' :: Product * * p q a b -> Product * * p q (Either c a) (Either c b) # (Functor f, Choice p) => Choice (Tannen * * * f p) # Methodsleft' :: Tannen * * * f p a b -> Tannen * * * f p (Either a c) (Either b c) #right' :: Tannen * * * f p a b -> Tannen * * * f p (Either c a) (Either c b) #

## Closed

class Profunctor p => Closed p where #

A strong profunctor allows the monoidal structure to pass through.

A closed profunctor allows the closed structure to pass through.

Minimal complete definition

closed

Methods

closed :: p a b -> p (x -> a) (x -> b) #

Laws:

lmap (. f) . closed ≡ rmap (. f) . closed
closed . closed ≡ dimap uncurry curry . closed
dimap const ($()) . closed ≡ id  Instances  Closed (->) # Methodsclosed :: (a -> b) -> (x -> a) -> x -> b # (Distributive f, Monad f) => Closed (Kleisli f) # Methodsclosed :: Kleisli f a b -> Kleisli f (x -> a) (x -> b) # Functor f => Closed (Cokleisli f) # Methodsclosed :: Cokleisli f a b -> Cokleisli f (x -> a) (x -> b) # # Methodsclosed :: Tagged * a b -> Tagged * (x -> a) (x -> b) # Functor f => Closed (Costar f) # Methodsclosed :: Costar f a b -> Costar f (x -> a) (x -> b) # Distributive f => Closed (Star f) # Methodsclosed :: Star f a b -> Star f (x -> a) (x -> b) # # Methodsclosed :: Environment p a b -> Environment p (x -> a) (x -> b) # Profunctor p => Closed (Closure p) # Methodsclosed :: Closure p a b -> Closure p (x -> a) (x -> b) # # Methodsclosed :: FreeMapping p a b -> FreeMapping p (x -> a) (x -> b) # # Methodsclosed :: CofreeMapping p a b -> CofreeMapping p (x -> a) (x -> b) # Closed p => Closed (Coyoneda p) # Methodsclosed :: Coyoneda p a b -> Coyoneda p (x -> a) (x -> b) # Closed p => Closed (Yoneda p) # Methodsclosed :: Yoneda p a b -> Yoneda p (x -> a) (x -> b) # (Closed p, Closed q) => Closed (Procompose p q) # Methodsclosed :: Procompose p q a b -> Procompose p q (x -> a) (x -> b) # (Closed p, Closed q) => Closed (Product * * p q) # Methodsclosed :: Product * * p q a b -> Product * * p q (x -> a) (x -> b) # (Functor f, Closed p) => Closed (Tannen * * * f p) # Methodsclosed :: Tannen * * * f p a b -> Tannen * * * f p (x -> a) (x -> b) # curry' :: Closed p => p (a, b) c -> p a (b -> c) # class (Traversing p, Closed p) => Mapping p where # Minimal complete definition map' Methods map' :: Functor f => p a b -> p (f a) (f b) # Laws: map' . rmap f ≡ rmap (fmap f) . map' map' . map' ≡ dimap Compose getCompose . map' dimap Identity runIdentity . map' ≡ id  Instances  Mapping (->) # Methodsmap' :: Functor f => (a -> b) -> f a -> f b # (Monad m, Distributive m) => Mapping (Kleisli m) # Methodsmap' :: Functor f => Kleisli m a b -> Kleisli m (f a) (f b) # (Applicative m, Distributive m) => Mapping (Star m) # Methodsmap' :: Functor f => Star m a b -> Star m (f a) (f b) # # Methodsmap' :: Functor f => FreeMapping p a b -> FreeMapping p (f a) (f b) # # Methodsmap' :: Functor f => CofreeMapping p a b -> CofreeMapping p (f a) (f b) # Mapping p => Mapping (Coyoneda p) # Methodsmap' :: Functor f => Coyoneda p a b -> Coyoneda p (f a) (f b) # Mapping p => Mapping (Yoneda p) # Methodsmap' :: Functor f => Yoneda p a b -> Yoneda p (f a) (f b) # (Mapping p, Mapping q) => Mapping (Procompose p q) # Methodsmap' :: Functor f => Procompose p q a b -> Procompose p q (f a) (f b) # ## Profunctorial Costrength class Profunctor p => Costrong p where # Analogous to ArrowLoop, loop = unfirst Minimal complete definition Methods unfirst :: p (a, d) (b, d) -> p a b # Laws: unfirst ≡ unsecond . dimap swap swap lmap (,()) ≡ unfirst . rmap (,()) unfirst . lmap (second f) ≡ unfirst . rmap (second f) unfirst . unfirst = unfirst . dimap assoc unassoc where assoc ((a,b),c) = (a,(b,c)) unassoc (a,(b,c)) = ((a,b),c)  unsecond :: p (d, a) (d, b) -> p a b # Laws: unsecond ≡ unfirst . dimap swap swap lmap ((),) ≡ unsecond . rmap ((),) unsecond . lmap (first f) ≡ unsecond . rmap (first f) unsecond . unsecond = unsecond . dimap unassoc assoc where assoc ((a,b),c) = (a,(b,c)) unassoc (a,(b,c)) = ((a,b),c)  Instances  Costrong (->) # Methodsunfirst :: ((a, d) -> (b, d)) -> a -> b #unsecond :: ((d, a) -> (d, b)) -> a -> b # MonadFix m => Costrong (Kleisli m) # Methodsunfirst :: Kleisli m (a, d) (b, d) -> Kleisli m a b #unsecond :: Kleisli m (d, a) (d, b) -> Kleisli m a b # Functor f => Costrong (Cokleisli f) # Methodsunfirst :: Cokleisli f (a, d) (b, d) -> Cokleisli f a b #unsecond :: Cokleisli f (d, a) (d, b) -> Cokleisli f a b # # Methodsunfirst :: Tagged * (a, d) (b, d) -> Tagged * a b #unsecond :: Tagged * (d, a) (d, b) -> Tagged * a b # # Methodsunfirst :: WrappedArrow p (a, d) (b, d) -> WrappedArrow p a b #unsecond :: WrappedArrow p (d, a) (d, b) -> WrappedArrow p a b # Functor f => Costrong (Costar f) # Methodsunfirst :: Costar f (a, d) (b, d) -> Costar f a b #unsecond :: Costar f (d, a) (d, b) -> Costar f a b # # Methodsunfirst :: Copastro p (a, d) (b, d) -> Copastro p a b #unsecond :: Copastro p (d, a) (d, b) -> Copastro p a b # # Methodsunfirst :: Cotambara p (a, d) (b, d) -> Cotambara p a b #unsecond :: Cotambara p (d, a) (d, b) -> Cotambara p a b # Costrong p => Costrong (Coyoneda p) # Methodsunfirst :: Coyoneda p (a, d) (b, d) -> Coyoneda p a b #unsecond :: Coyoneda p (d, a) (d, b) -> Coyoneda p a b # Costrong p => Costrong (Yoneda p) # Methodsunfirst :: Yoneda p (a, d) (b, d) -> Yoneda p a b #unsecond :: Yoneda p (d, a) (d, b) -> Yoneda p a b # (Corepresentable p, Corepresentable q) => Costrong (Procompose p q) # Methodsunfirst :: Procompose p q (a, d) (b, d) -> Procompose p q a b #unsecond :: Procompose p q (d, a) (d, b) -> Procompose p q a b # (Costrong p, Costrong q) => Costrong (Product * * p q) # Methodsunfirst :: Product * * p q (a, d) (b, d) -> Product * * p q a b #unsecond :: Product * * p q (d, a) (d, b) -> Product * * p q a b # (Functor f, Costrong p) => Costrong (Tannen * * * f p) # Methodsunfirst :: Tannen * * * f p (a, d) (b, d) -> Tannen * * * f p a b #unsecond :: Tannen * * * f p (d, a) (d, b) -> Tannen * * * f p a b # class Profunctor p => Cochoice p where # Minimal complete definition Methods unleft :: p (Either a d) (Either b d) -> p a b # Laws: unleft ≡ unright . dimap swapE swapE where swapE :: Either a b -> Either b a swapE = either Right Left rmap (either id absurd) ≡ unleft . lmap (either id absurd) unfirst . rmap (second f) ≡ unfirst . lmap (second f) unleft . unleft ≡ unleft . dimap assocE unassocE where assocE :: Either (Either a b) c -> Either a (Either b c) assocE (Left (Left a)) = Left a assocE (Left (Right b)) = Right (Left b) assocE (Right c) = Right (Right c) unassocE :: Either a (Either b c) -> Either (Either a b) c unassocE (Left a) = Left (Left a) unassocE (Right (Left b) = Left (Right b) unassocE (Right (Right c)) = Right c)  unright :: p (Either d a) (Either d b) -> p a b # Laws: unright ≡ unleft . dimap swapE swapE where swapE :: Either a b -> Either b a swapE = either Right Left rmap (either absurd id) ≡ unright . lmap (either absurd id) unsecond . rmap (first f) ≡ unsecond . lmap (first f) unright . unright ≡ unright . dimap unassocE assocE where assocE :: Either (Either a b) c -> Either a (Either b c) assocE (Left (Left a)) = Left a assocE (Left (Right b)) = Right (Left b) assocE (Right c) = Right (Right c) unassocE :: Either a (Either b c) -> Either (Either a b) c unassocE (Left a) = Left (Left a) unassocE (Right (Left b) = Left (Right b) unassocE (Right (Right c)) = Right c)  Instances  Cochoice (->) # Methodsunleft :: (Either a d -> Either b d) -> a -> b #unright :: (Either d a -> Either d b) -> a -> b # Applicative f => Cochoice (Costar f) # Methodsunleft :: Costar f (Either a d) (Either b d) -> Costar f a b #unright :: Costar f (Either d a) (Either d b) -> Costar f a b # Traversable f => Cochoice (Star f) # Methodsunleft :: Star f (Either a d) (Either b d) -> Star f a b #unright :: Star f (Either d a) (Either d b) -> Star f a b # # Methodsunleft :: CopastroSum p (Either a d) (Either b d) -> CopastroSum p a b #unright :: CopastroSum p (Either d a) (Either d b) -> CopastroSum p a b # # Methodsunleft :: CotambaraSum p (Either a d) (Either b d) -> CotambaraSum p a b #unright :: CotambaraSum p (Either d a) (Either d b) -> CotambaraSum p a b # Cochoice p => Cochoice (Coyoneda p) # Methodsunleft :: Coyoneda p (Either a d) (Either b d) -> Coyoneda p a b #unright :: Coyoneda p (Either d a) (Either d b) -> Coyoneda p a b # Cochoice p => Cochoice (Yoneda p) # Methodsunleft :: Yoneda p (Either a d) (Either b d) -> Yoneda p a b #unright :: Yoneda p (Either d a) (Either d b) -> Yoneda p a b # (Cochoice p, Cochoice q) => Cochoice (Product * * p q) # Methodsunleft :: Product * * p q (Either a d) (Either b d) -> Product * * p q a b #unright :: Product * * p q (Either d a) (Either d b) -> Product * * p q a b # (Functor f, Cochoice p) => Cochoice (Tannen * * * f p) # Methodsunleft :: Tannen * * * f p (Either a d) (Either b d) -> Tannen * * * f p a b #unright :: Tannen * * * f p (Either d a) (Either d b) -> Tannen * * * f p a b # ## Common Profunctors newtype Star f d c # Lift a Functor into a Profunctor (forwards). Constructors  Star FieldsrunStar :: d -> f c Instances  Functor f => Profunctor (Star f) # Methodsdimap :: (a -> b) -> (c -> d) -> Star f b c -> Star f a d #lmap :: (a -> b) -> Star f b c -> Star f a c #rmap :: (b -> c) -> Star f a b -> Star f a c #(#.) :: Coercible * c b => (b -> c) -> Star f a b -> Star f a c #(.#) :: Coercible * b a => Star f b c -> (a -> b) -> Star f a c # Functor m => Strong (Star m) # Methodsfirst' :: Star m a b -> Star m (a, c) (b, c) #second' :: Star m a b -> Star m (c, a) (c, b) # Traversable f => Cochoice (Star f) # Methodsunleft :: Star f (Either a d) (Either b d) -> Star f a b #unright :: Star f (Either d a) (Either d b) -> Star f a b # Applicative f => Choice (Star f) # Methodsleft' :: Star f a b -> Star f (Either a c) (Either b c) #right' :: Star f a b -> Star f (Either c a) (Either c b) # Distributive f => Closed (Star f) # Methodsclosed :: Star f a b -> Star f (x -> a) (x -> b) # Applicative m => Traversing (Star m) # Methodstraverse' :: Traversable f => Star m a b -> Star m (f a) (f b) #wander :: (forall f. Applicative f => (a -> f b) -> s -> f t) -> Star m a b -> Star m s t # (Applicative m, Distributive m) => Mapping (Star m) # Methodsmap' :: Functor f => Star m a b -> Star m (f a) (f b) # Functor f => Representable (Star f) # Associated Typestype Rep (Star f :: * -> * -> *) :: * -> * # Methodstabulate :: (d -> Rep (Star f) c) -> Star f d c # Functor f => Sieve (Star f) f # Methodssieve :: Star f a b -> a -> f b # Monad f => Category * (Star f) # Methodsid :: cat a a #(.) :: cat b c -> cat a b -> cat a c # Monad f => Monad (Star f a) # 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) # 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) # 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) # 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) # Methodsmzero :: Star f a a #mplus :: Star f a a -> Star f a a -> Star f a a # Distributive f => Distributive (Star f a) # 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) # type Rep (Star f) = f

newtype Costar f d c #

Lift a Functor into a Profunctor (backwards).

Constructors

 Costar FieldsrunCostar :: f d -> c

Instances

 Functor f => Profunctor (Costar f) # Methodsdimap :: (a -> b) -> (c -> d) -> Costar f b c -> Costar f a d #lmap :: (a -> b) -> Costar f b c -> Costar f a c #rmap :: (b -> c) -> Costar f a b -> Costar f a c #(#.) :: Coercible * c b => (b -> c) -> Costar f a b -> Costar f a c #(.#) :: Coercible * b a => Costar f b c -> (a -> b) -> Costar f a c # Functor f => Costrong (Costar f) # Methodsunfirst :: Costar f (a, d) (b, d) -> Costar f a b #unsecond :: Costar f (d, a) (d, b) -> Costar f a b # Applicative f => Cochoice (Costar f) # Methodsunleft :: Costar f (Either a d) (Either b d) -> Costar f a b #unright :: Costar f (Either d a) (Either d b) -> Costar f a b # Traversable w => Choice (Costar w) # Methodsleft' :: Costar w a b -> Costar w (Either a c) (Either b c) #right' :: Costar w a b -> Costar w (Either c a) (Either c b) # Functor f => Closed (Costar f) # Methodsclosed :: Costar f a b -> Costar f (x -> a) (x -> b) # Functor f => Corepresentable (Costar f) # Associated Typestype Corep (Costar f :: * -> * -> *) :: * -> * # Methodscotabulate :: (Corep (Costar f) d -> c) -> Costar f d c # Functor f => Cosieve (Costar f) f # Methodscosieve :: Costar f a b -> f a -> b # Monad (Costar f a) # 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) # Methodsfmap :: (a -> b) -> Costar f a a -> Costar f a b #(<$) :: a -> Costar f a b -> Costar f a a # Applicative (Costar f a) # 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) # 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) # type Corep (Costar f) = f newtype WrappedArrow p a b # Wrap an arrow for use as a Profunctor. Constructors  WrapArrow FieldsunwrapArrow :: p a b Instances  Arrow p => Arrow (WrappedArrow p) # 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') # # MethodszeroArrow :: WrappedArrow p b c # # 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 # # Methodsapp :: WrappedArrow p (WrappedArrow p b c, b) c # # Methodsloop :: WrappedArrow p (b, d) (c, d) -> WrappedArrow p b c # Arrow p => Profunctor (WrappedArrow p) # Methodsdimap :: (a -> b) -> (c -> d) -> WrappedArrow p b c -> WrappedArrow p a d #lmap :: (a -> b) -> WrappedArrow p b c -> WrappedArrow p a c #rmap :: (b -> c) -> WrappedArrow p a b -> WrappedArrow p a c #(#.) :: Coercible * c b => (b -> c) -> WrappedArrow p a b -> WrappedArrow p a c #(.#) :: Coercible * b a => WrappedArrow p b c -> (a -> b) -> WrappedArrow p a c # # Methodsunfirst :: WrappedArrow p (a, d) (b, d) -> WrappedArrow p a b #unsecond :: WrappedArrow p (d, a) (d, b) -> WrappedArrow p a b # Arrow p => Strong (WrappedArrow p) # Arrow is Strong Category Methodsfirst' :: WrappedArrow p a b -> WrappedArrow p (a, c) (b, c) #second' :: WrappedArrow p a b -> WrappedArrow p (c, a) (c, b) # # Methodsleft' :: WrappedArrow p a b -> WrappedArrow p (Either a c) (Either b c) #right' :: WrappedArrow p a b -> WrappedArrow p (Either c a) (Either c b) # # Methodsid :: cat a a #(.) :: cat b c -> cat a b -> cat a c # newtype Forget r a b # Constructors  Forget FieldsrunForget :: a -> r Instances  # Methodsdimap :: (a -> b) -> (c -> d) -> Forget r b c -> Forget r a d #lmap :: (a -> b) -> Forget r b c -> Forget r a c #rmap :: (b -> c) -> Forget r a b -> Forget r a c #(#.) :: Coercible * c b => (b -> c) -> Forget r a b -> Forget r a c #(.#) :: Coercible * b a => Forget r b c -> (a -> b) -> Forget r a c # Strong (Forget r) # Methodsfirst' :: Forget r a b -> Forget r (a, c) (b, c) #second' :: Forget r a b -> Forget r (c, a) (c, b) # Monoid r => Choice (Forget r) # Methodsleft' :: Forget r a b -> Forget r (Either a c) (Either b c) #right' :: Forget r a b -> Forget r (Either c a) (Either c b) # Monoid m => Traversing (Forget m) # Methodstraverse' :: Traversable f => Forget m a b -> Forget m (f a) (f b) #wander :: (forall f. Applicative f => (a -> f b) -> s -> f t) -> Forget m a b -> Forget m s t # # Associated Typestype Rep (Forget r :: * -> * -> *) :: * -> * # Methodstabulate :: (d -> Rep (Forget r) c) -> Forget r d c # Sieve (Forget r) (Const * r) # Methodssieve :: Forget r a b -> a -> Const * r b # Functor (Forget r a) # Methodsfmap :: (a -> b) -> Forget r a a -> Forget r a b #(<$) :: a -> Forget r a b -> Forget r a a # Foldable (Forget r a) # 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) # 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) # type Rep (Forget r) = Const * r

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