profunctor-optics-0.0.0.3: An optics library compatible with the typeclasses in 'profunctors'.

Safe HaskellSafe
LanguageHaskell2010

Data.Profunctor.Optic.Types

Contents

Synopsis

Optic, IndexedOptic, & CoindexedOptic

type Optic p s t a b = p a b -> p s t Source #

type Optic' p s a = Optic p s s a a Source #

type IndexedOptic p i s t a b = p (i, a) b -> p (i, s) t Source #

type IndexedOptic' p i s a = IndexedOptic p i s s a a Source #

type CoindexedOptic p k s t a b = p a (k -> b) -> p s (k -> t) Source #

type CoindexedOptic' p k t b = CoindexedOptic p k t t b b Source #

Iso & Equality

type Iso s t a b = forall p. Profunctor p => Optic p s t a b Source #

Iso

\( \mathsf{Iso}\;S\;A = S \cong A \)

type Iso' s a = Iso s s a a Source #

type Equality s t a b = forall p. Optic p s t a b Source #

type Equality' s a = Equality s s a a Source #

Lens

type Lens s t a b = forall p. Strong p => Optic p s t a b Source #

Lenses access one piece of a product.

\( \mathsf{Lens}\;S\;A = \exists C, S \cong C \times A \)

type Lens' s a = Lens s s a a Source #

type Ixlens i s t a b = forall p. Strong p => IndexedOptic p i s t a b Source #

type Ixlens' i s a = Ixlens i s s a a Source #

Prism

type Prism s t a b = forall p. Choice p => Optic p s t a b Source #

Prisms access one piece of a sum.

\( \mathsf{Prism}\;S\;A = \exists D, S \cong D + A \)

type Prism' s a = Prism s s a a Source #

type Cxprism k s t a b = forall p. Choice p => CoindexedOptic p k s t a b Source #

type Cxprism' k s a = Cxprism k s s a a Source #

Grate

type Grate s t a b = forall p. Closed p => Optic p s t a b Source #

Grates access the codomain of a function.

\( \mathsf{Grate}\;S\;A = \exists I, S \cong I \to A \)

type Grate' s a = Grate s s a a Source #

type Cxgrate k s t a b = forall p. Closed p => CoindexedOptic p k s t a b Source #

type Cxgrate' k s a = Cxgrate k s s a a Source #

Affine & Option

type Affine s t a b = forall p. (Choice p, Strong p) => Optic p s t a b Source #

A Affine processes 0 or more parts of the whole, with no interactions.

\( \mathsf{Affine}\;S\;A = \exists C, D, S \cong D + C \times A \)

type Affine' s a = Affine s s a a Source #

type Ixaffine i s t a b = forall p. (Choice p, Strong p) => IndexedOptic p i s t a b Source #

type Ixaffine' i s a = Ixaffine i s s a a Source #

type Option s a = forall p. (Choice p, Strong p, forall x. Contravariant (p x)) => Optic' p s a Source #

A Option combines at most one element, with no interactions.

type Ixoption i s a = forall p. (Choice p, Strong p, forall x. Contravariant (p x)) => IndexedOptic' p i s a Source #

Grism

type Grism s t a b = forall p. (Choice p, Closed p) => Optic p s t a b Source #

type Grism' t b = Grism t t b b Source #

Traversal, Traversal1, Fold & Fold1

type Traversal s t a b = forall p. (Choice p, Strong p, Representable p, Applicative (Rep p)) => Optic p s t a b Source #

A Traversal processes 0 or more parts of the whole, with Applicative interactions.

\( \mathsf{Traversal}\;S\;A = \exists F : \mathsf{Traversable}, S \equiv F\,A \)

type Traversal' s a = Traversal s s a a Source #

type Ixtraversal i s t a b = forall p. (Choice p, Strong p, Representable p, Applicative (Rep p)) => IndexedOptic p i s t a b Source #

type Ixtraversal' i s a = Ixtraversal i s s a a Source #

type Traversal1 s t a b = forall p. (Strong p, Representable p, Apply (Rep p)) => Optic p s t a b Source #

A Traversal1 processes 1 or more parts of the whole, with Apply interactions.

\( \mathsf{Traversal1}\;S\;A = \exists F : \mathsf{Traversable1}, S \equiv F\,A \)

type Traversal1' s a = Traversal1 s s a a Source #

type Ixtraversal1 i s t a b = forall p. (Strong p, Representable p, Apply (Rep p)) => IndexedOptic p i s t a b Source #

type Ixtraversal1' i s a = Ixtraversal1 i s s a a Source #

type Fold s a = forall p. (Choice p, Representable p, Applicative (Rep p), forall x. Contravariant (p x)) => Optic' p s a Source #

A Fold combines 0 or more elements, with Monoid interactions.

type Ixfold i s a = forall p. (Choice p, Representable p, Applicative (Rep p), forall x. Contravariant (p x)) => IndexedOptic' p i s a Source #

type Fold1 s a = forall p. (Strong p, Representable p, Apply (Rep p), forall x. Contravariant (p x)) => Optic' p s a Source #

A Fold1 combines 1 or more elements, with Semigroup interactions.

type Ixfold1 i s a = forall p. (Strong p, Representable p, Apply (Rep p), forall x. Contravariant (p x)) => IndexedOptic' p i s a Source #

Cotraversal

type Cotraversal s t a b = forall p. (Choice p, Closed p, Coapplicative (Corep p), Corepresentable p) => Optic p s t a b Source #

type Cotraversal' t b = Cotraversal t t b b Source #

View & Review

type PrimView s t a b = forall p. (Profunctor p, forall x. Contravariant (p x)) => Optic p s t a b Source #

type View s a = forall p. (Strong p, forall x. Contravariant (p x)) => Optic' p s a Source #

type Ixview i s a = forall p. (Strong p, forall x. Contravariant (p x)) => IndexedOptic' p i s a Source #

type PrimReview s t a b = forall p. (Profunctor p, Bifunctor p) => Optic p s t a b Source #

type Review t b = forall p. (Closed p, Bifunctor p) => Optic' p t b Source #

type Cxview k t b = forall p. (Closed p, Bifunctor p) => CoindexedOptic' p k t b Source #

Setter & Resetter

type Setter s t a b = forall p. (Choice p, Strong p, Representable p, Applicative (Rep p), Distributive (Rep p)) => Optic p s t a b Source #

A Setter modifies part of a structure.

\( \mathsf{Setter}\;S\;A = \exists F : \mathsf{Functor}, S \equiv F\,A \)

type Setter' s a = Setter s s a a Source #

type Ixsetter i s t a b = forall p. (Choice p, Strong p, Representable p, Applicative (Rep p), Distributive (Rep p)) => IndexedOptic p i s t a b Source #

type Ixsetter' i s a = Ixsetter i s s a a Source #

type Resetter s t a b = forall p. (Choice p, Closed p, Corepresentable p, Coapplicative (Corep p), Traversable (Corep p)) => Optic p s t a b Source #

type Resetter' s a = Resetter s s a a Source #

type Cxsetter k s t a b = forall p. (Choice p, Closed p, Corepresentable p, Coapplicative (Corep p), Traversable (Corep p)) => CoindexedOptic p k s t a b Source #

type Cxsetter' k t b = Cxsetter k t t b b Source #

Coapplicative

class Branch f => Coapplicative f where Source #

Methods

copure :: f a -> a Source #

Instances
Coapplicative Identity Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

copure :: Identity a -> a Source #

Coapplicative NonEmpty Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

copure :: NonEmpty a -> a Source #

Coapplicative ((,) r) Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

copure :: (r, a) -> a Source #

Coapplicative (Tagged k) Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

copure :: Tagged k a -> a Source #

Monoid m => Coapplicative ((->) m :: Type -> Type) Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

copure :: (m -> a) -> a Source #

(Coapplicative f, Coapplicative g) => Coapplicative (Compose f g) Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

copure :: Compose f g a -> a Source #

class Functor f => Branch f where Source #

Methods

branch :: f (Either a b) -> Either (f a) (f b) Source #

Instances
Branch Identity Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

branch :: Identity (Either a b) -> Either (Identity a) (Identity b) Source #

Branch NonEmpty Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

branch :: NonEmpty (Either a b) -> Either (NonEmpty a) (NonEmpty b) Source #

Branch ((,) r) Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

branch :: (r, Either a b) -> Either (r, a) (r, b) Source #

Branch (Tagged k) Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

branch :: Tagged k (Either a b) -> Either (Tagged k a) (Tagged k b) Source #

Monoid m => Branch ((->) m :: Type -> Type) Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

branch :: (m -> Either a b) -> Either (m -> a) (m -> b) Source #

(Branch f, Branch g) => Branch (Compose f g) Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

branch :: Compose f g (Either a b) -> Either (Compose f g a) (Compose f g b) Source #

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

Can be used to rewrite

\g -> f . g . h

to

between f h

Re

newtype Re p s t a b Source #

The Re type and its instances witness the symmetry between the parameters of a Profunctor.

Constructors

Re 

Fields

  • runRe :: p b a -> p t s
     
Instances
(Profunctor p, forall x. Contravariant (p x)) => Bifunctor (Re p s t) Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

bimap :: (a -> b) -> (c -> d) -> Re p s t a c -> Re p s t b d #

first :: (a -> b) -> Re p s t a c -> Re p s t b c #

second :: (b -> c) -> Re p s t a b -> Re p s t a c #

Cochoice p => Choice (Re p s t) Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

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

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

Choice p => Cochoice (Re p s t) Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

unleft :: Re p s t (Either a d) (Either b d) -> Re p s t a b #

unright :: Re p s t (Either d a) (Either d b) -> Re p s t a b #

Costrong p => Strong (Re p s t) Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

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

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

Strong p => Costrong (Re p s t) Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

unfirst :: Re p s t (a, d) (b, d) -> Re p s t a b #

unsecond :: Re p s t (d, a) (d, b) -> Re p s t a b #

Profunctor p => Profunctor (Re p s t) Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

dimap :: (a -> b) -> (c -> d) -> Re p s t b c -> Re p s t a d #

lmap :: (a -> b) -> Re p s t b c -> Re p s t a c #

rmap :: (b -> c) -> Re p s t a b -> Re p s t a c #

(#.) :: Coercible c b => q b c -> Re p s t a b -> Re p s t a c #

(.#) :: Coercible b a => Re p s t b c -> q a b -> Re p s t a c #

Bifunctor p => Contravariant (Re p s t a) Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

contramap :: (a0 -> b) -> Re p s t a b -> Re p s t a a0 #

(>$) :: b -> Re p s t a b -> Re p s t a a0 #

re :: Optic (Re p a b) s t a b -> Optic p b a t s Source #

Reverse an optic to obtain its dual.

>>> 5 ^. re left'
Left 5
>>> 6 ^. re (left' . from succ)
Left 7
re . re  ≡ id
re :: Iso s t a b   -> Iso b a t s
re :: Lens s t a b  -> Colens b a t s
re :: Prism s t a b -> Coprism b a t s

type (+) = Either infixr 5 #

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

newtype Star (f :: Type -> Type) d c #

Lift a Functor into a Profunctor (forwards).

Constructors

Star 

Fields

Instances
Functor f => Representable (Star f) 
Instance details

Defined in Data.Profunctor.Rep

Associated Types

type Rep (Star f) :: Type -> Type #

Methods

tabulate :: (d -> Rep (Star f) c) -> Star f d c #

Applicative f => Choice (Star f) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: 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) #

Traversable f => Cochoice (Star f) 
Instance details

Defined in Data.Profunctor.Choice

Methods

unleft :: 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 #

Distributive f => Closed (Star f) 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Star f a b -> Star f (x -> a) (x -> b) #

Functor m => Strong (Star m) 
Instance details

Defined in Data.Profunctor.Strong

Methods

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

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

Functor f => Profunctor (Star f) 
Instance details

Defined in Data.Profunctor.Types

Methods

dimap :: (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 => q b c -> Star f a b -> Star f a c #

(.#) :: Coercible b a => Star f b c -> q a b -> Star f a c #

Functor f => Sieve (Star f) f 
Instance details

Defined in Data.Profunctor.Sieve

Methods

sieve :: Star f a b -> a -> f b #

Monad f => Category (Star f :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Types

Methods

id :: Star f a a #

(.) :: Star f b c -> Star f a b -> Star f a c #

Monad f => Monad (Star f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

(>>=) :: Star f a a0 -> (a0 -> Star f a b) -> Star f a b #

(>>) :: Star f a a0 -> Star f a b -> Star f a b #

return :: a0 -> Star f a a0 #

fail :: String -> Star f a a0 #

Functor f => Functor (Star f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

fmap :: (a0 -> b) -> Star f a a0 -> Star f a b #

(<$) :: a0 -> Star f a b -> Star f a a0 #

Applicative f => Applicative (Star f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

pure :: a0 -> Star f a a0 #

(<*>) :: Star f a (a0 -> b) -> Star f a a0 -> Star f a b #

liftA2 :: (a0 -> b -> c) -> Star f a a0 -> Star f a b -> Star f a c #

(*>) :: Star f a a0 -> Star f a b -> Star f a b #

(<*) :: Star f a a0 -> Star f a b -> Star f a a0 #

Distributive f => Distributive (Star f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

distribute :: Functor f0 => f0 (Star f a a0) -> Star f a (f0 a0) #

collect :: Functor f0 => (a0 -> Star f a b) -> f0 a0 -> Star f a (f0 b) #

distributeM :: Monad m => m (Star f a a0) -> Star f a (m a0) #

collectM :: Monad m => (a0 -> Star f a b) -> m a0 -> Star f a (m b) #

Contravariant f => Contravariant (Star f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

contramap :: (a0 -> b) -> Star f a b -> Star f a a0 #

(>$) :: b -> Star f a b -> Star f a a0 #

Alternative f => Alternative (Star f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

empty :: Star f a a0 #

(<|>) :: Star f a a0 -> Star f a a0 -> Star f a a0 #

some :: Star f a a0 -> Star f a [a0] #

many :: Star f a a0 -> Star f a [a0] #

MonadPlus f => MonadPlus (Star f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

mzero :: Star f a a0 #

mplus :: Star f a a0 -> Star f a a0 -> Star f a a0 #

Apply f => Apply (Star f a) Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

(<.>) :: Star f a (a0 -> b) -> Star f a a0 -> Star f a b #

(.>) :: Star f a a0 -> Star f a b -> Star f a b #

(<.) :: Star f a a0 -> Star f a b -> Star f a a0 #

liftF2 :: (a0 -> b -> c) -> Star f a a0 -> Star f a b -> Star f a c #

type Rep (Star f) 
Instance details

Defined in Data.Profunctor.Rep

type Rep (Star f) = f

newtype Costar (f :: Type -> Type) d c #

Lift a Functor into a Profunctor (backwards).

Constructors

Costar 

Fields

Instances
Contravariant f => Bifunctor (Costar f) Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

bimap :: (a -> b) -> (c -> d) -> Costar f a c -> Costar f b d #

first :: (a -> b) -> Costar f a c -> Costar f b c #

second :: (b -> c) -> Costar f a b -> Costar f a c #

Functor f => Corepresentable (Costar f) 
Instance details

Defined in Data.Profunctor.Rep

Associated Types

type Corep (Costar f) :: Type -> Type #

Methods

cotabulate :: (Corep (Costar f) d -> c) -> Costar f d c #

Coapplicative f => Choice (Costar f) Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

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

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

Applicative f => Cochoice (Costar f) 
Instance details

Defined in Data.Profunctor.Choice

Methods

unleft :: 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 #

Functor f => Closed (Costar f) 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Costar f a b -> Costar f (x -> a) (x -> b) #

Functor f => Costrong (Costar f) 
Instance details

Defined in Data.Profunctor.Strong

Methods

unfirst :: Costar f (a, d) (b, d) -> Costar f a b #

unsecond :: Costar f (d, a) (d, b) -> Costar f a b #

Functor f => Profunctor (Costar f) 
Instance details

Defined in Data.Profunctor.Types

Methods

dimap :: (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 => q b c -> Costar f a b -> Costar f a c #

(.#) :: Coercible b a => Costar f b c -> q a b -> Costar f a c #

Functor f => Cosieve (Costar f) f 
Instance details

Defined in Data.Profunctor.Sieve

Methods

cosieve :: Costar f a b -> f a -> b #

Monad (Costar f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

(>>=) :: Costar f a a0 -> (a0 -> Costar f a b) -> Costar f a b #

(>>) :: Costar f a a0 -> Costar f a b -> Costar f a b #

return :: a0 -> Costar f a a0 #

fail :: String -> Costar f a a0 #

Functor (Costar f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

fmap :: (a0 -> b) -> Costar f a a0 -> Costar f a b #

(<$) :: a0 -> Costar f a b -> Costar f a a0 #

Applicative (Costar f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

pure :: a0 -> Costar f a a0 #

(<*>) :: Costar f a (a0 -> b) -> Costar f a a0 -> Costar f a b #

liftA2 :: (a0 -> b -> c) -> Costar f a a0 -> Costar f a b -> Costar f a c #

(*>) :: Costar f a a0 -> Costar f a b -> Costar f a b #

(<*) :: Costar f a a0 -> Costar f a b -> Costar f a a0 #

Distributive (Costar f d) 
Instance details

Defined in Data.Profunctor.Types

Methods

distribute :: Functor f0 => f0 (Costar f d a) -> Costar f d (f0 a) #

collect :: Functor f0 => (a -> Costar f d b) -> f0 a -> Costar f d (f0 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) #

Apply (Costar f a) Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

(<.>) :: Costar f a (a0 -> b) -> Costar f a a0 -> Costar f a b #

(.>) :: Costar f a a0 -> Costar f a b -> Costar f a b #

(<.) :: Costar f a a0 -> Costar f a b -> Costar f a a0 #

liftF2 :: (a0 -> b -> c) -> Costar f a a0 -> Costar f a b -> Costar f a c #

type Corep (Costar f) 
Instance details

Defined in Data.Profunctor.Rep

type Corep (Costar f) = f

newtype WrappedArrow (p :: Type -> Type -> Type) a b #

Wrap an arrow for use as a Profunctor.

Constructors

WrapArrow 

Fields

Instances
Arrow p => Arrow (WrappedArrow p) 
Instance details

Defined in Data.Profunctor.Types

Methods

arr :: (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') #

ArrowZero p => ArrowZero (WrappedArrow p) 
Instance details

Defined in Data.Profunctor.Types

Methods

zeroArrow :: WrappedArrow p b c #

ArrowChoice p => ArrowChoice (WrappedArrow p) 
Instance details

Defined in Data.Profunctor.Types

Methods

left :: 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 #

ArrowApply p => ArrowApply (WrappedArrow p) 
Instance details

Defined in Data.Profunctor.Types

Methods

app :: WrappedArrow p (WrappedArrow p b c, b) c #

ArrowLoop p => ArrowLoop (WrappedArrow p) 
Instance details

Defined in Data.Profunctor.Types

Methods

loop :: WrappedArrow p (b, d) (c, d) -> WrappedArrow p b c #

ArrowChoice p => Choice (WrappedArrow p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: 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) #

Arrow p => Strong (WrappedArrow p)

Arrow is Strong Category

Instance details

Defined in Data.Profunctor.Strong

Methods

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

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

ArrowLoop p => Costrong (WrappedArrow p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

unfirst :: WrappedArrow p (a, d) (b, d) -> WrappedArrow p a b #

unsecond :: WrappedArrow p (d, a) (d, b) -> WrappedArrow p a b #

Arrow p => Profunctor (WrappedArrow p) 
Instance details

Defined in Data.Profunctor.Types

Methods

dimap :: (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 => q b c -> WrappedArrow p a b -> WrappedArrow p a c #

(.#) :: Coercible b a => WrappedArrow p b c -> q a b -> WrappedArrow p a c #

Category p => Category (WrappedArrow p :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Types

Methods

id :: WrappedArrow p a a #

(.) :: WrappedArrow p b c -> WrappedArrow p a b -> WrappedArrow p a c #

newtype Forget r a b #

Constructors

Forget 

Fields

Instances
Representable (Forget r) 
Instance details

Defined in Data.Profunctor.Rep

Associated Types

type Rep (Forget r) :: Type -> Type #

Methods

tabulate :: (d -> Rep (Forget r) c) -> Forget r d c #

Monoid r => Choice (Forget r) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: 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) #

Cochoice (Forget r) 
Instance details

Defined in Data.Profunctor.Choice

Methods

unleft :: Forget r (Either a d) (Either b d) -> Forget r a b #

unright :: Forget r (Either d a) (Either d b) -> Forget r a b #

Strong (Forget r) 
Instance details

Defined in Data.Profunctor.Strong

Methods

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

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

Profunctor (Forget r) 
Instance details

Defined in Data.Profunctor.Types

Methods

dimap :: (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 => q b c -> Forget r a b -> Forget r a c #

(.#) :: Coercible b a => Forget r b c -> q a b -> Forget r a c #

Sieve (Forget r) (Const r :: Type -> Type) 
Instance details

Defined in Data.Profunctor.Sieve

Methods

sieve :: Forget r a b -> a -> Const r b #

Functor (Forget r a) 
Instance details

Defined in Data.Profunctor.Types

Methods

fmap :: (a0 -> b) -> Forget r a a0 -> Forget r a b #

(<$) :: a0 -> Forget r a b -> Forget r a a0 #

Foldable (Forget r a) 
Instance details

Defined in Data.Profunctor.Types

Methods

fold :: Monoid m => Forget r a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Forget r a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Forget r a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Forget r a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Forget r a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Forget r a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Forget r a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Forget r a a0 -> a0 #

toList :: Forget r a a0 -> [a0] #

null :: Forget r a a0 -> Bool #

length :: Forget r a a0 -> Int #

elem :: Eq a0 => a0 -> Forget r a a0 -> Bool #

maximum :: Ord a0 => Forget r a a0 -> a0 #

minimum :: Ord a0 => Forget r a a0 -> a0 #

sum :: Num a0 => Forget r a a0 -> a0 #

product :: Num a0 => Forget r a a0 -> a0 #

Traversable (Forget r a) 
Instance details

Defined in Data.Profunctor.Types

Methods

traverse :: Applicative f => (a0 -> f b) -> Forget r a a0 -> f (Forget r a b) #

sequenceA :: Applicative f => Forget r a (f a0) -> f (Forget r a a0) #

mapM :: Monad m => (a0 -> m b) -> Forget r a a0 -> m (Forget r a b) #

sequence :: Monad m => Forget r a (m a0) -> m (Forget r a a0) #

Contravariant (Forget r a) 
Instance details

Defined in Data.Profunctor.Types

Methods

contramap :: (a0 -> b) -> Forget r a b -> Forget r a a0 #

(>$) :: b -> Forget r a b -> Forget r a a0 #

type Rep (Forget r) 
Instance details

Defined in Data.Profunctor.Rep

type Rep (Forget r) = (Const r :: Type -> Type)

class Profunctor (p :: Type -> Type -> Type) 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 idid

If you supply lmap and rmap, ensure:

lmap idid
rmap idid

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

dimap | lmap, rmap

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.

rmapdimap id
Instances
Monad m => Profunctor (Kleisli m) 
Instance details

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (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 => q b c -> Kleisli m a b -> Kleisli m a c #

(.#) :: Coercible b a => Kleisli m b c -> q a b -> Kleisli m a c #

Profunctor (Pastro p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

dimap :: (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 => q b c -> Pastro p a b -> Pastro p a c #

(.#) :: Coercible b a => Pastro p b c -> q a b -> Pastro p a c #

Profunctor (Environment p) 
Instance details

Defined in Data.Profunctor.Closed

Methods

dimap :: (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 => q b c -> Environment p a b -> Environment p a c #

(.#) :: Coercible b a => Environment p b c -> q a b -> Environment p a c #

Profunctor (PastroSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

dimap :: (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 => q b c -> PastroSum p a b -> PastroSum p a c #

(.#) :: Coercible b a => PastroSum p b c -> q a b -> PastroSum p a c #

Profunctor (Coyoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

dimap :: (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 => q b c -> Coyoneda p a b -> Coyoneda p a c #

(.#) :: Coercible b a => Coyoneda p b c -> q a b -> Coyoneda p a c #

Profunctor (Yoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

dimap :: (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 => q b c -> Yoneda p a b -> Yoneda p a c #

(.#) :: Coercible b a => Yoneda p b c -> q a b -> Yoneda p a c #

Profunctor p => Profunctor (TambaraSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

dimap :: (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 => q b c -> TambaraSum p a b -> TambaraSum p a c #

(.#) :: Coercible b a => TambaraSum p b c -> q a b -> TambaraSum p a c #

Profunctor (CotambaraSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

dimap :: (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 => q b c -> CotambaraSum p a b -> CotambaraSum p a c #

(.#) :: Coercible b a => CotambaraSum p b c -> q a b -> CotambaraSum p a c #

Profunctor (CopastroSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

dimap :: (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 => q b c -> CopastroSum p a b -> CopastroSum p a c #

(.#) :: Coercible b a => CopastroSum p b c -> q a b -> CopastroSum p a c #

Profunctor p => Profunctor (Closure p) 
Instance details

Defined in Data.Profunctor.Closed

Methods

dimap :: (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 => q b c -> Closure p a b -> Closure p a c #

(.#) :: Coercible b a => Closure p b c -> q a b -> Closure p a c #

Profunctor p => Profunctor (Tambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

dimap :: (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 => q b c -> Tambara p a b -> Tambara p a c #

(.#) :: Coercible b a => Tambara p b c -> q a b -> Tambara p a c #

Profunctor (Cotambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

dimap :: (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 => q b c -> Cotambara p a b -> Cotambara p a c #

(.#) :: Coercible b a => Cotambara p b c -> q a b -> Cotambara p a c #

Profunctor (Copastro p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

dimap :: (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 => q b c -> Copastro p a b -> Copastro p a c #

(.#) :: Coercible b a => Copastro p b c -> q a b -> Copastro p a c #

Functor f => Profunctor (Star f) 
Instance details

Defined in Data.Profunctor.Types

Methods

dimap :: (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 => q b c -> Star f a b -> Star f a c #

(.#) :: Coercible b a => Star f b c -> q a b -> Star f a c #

Functor f => Profunctor (Costar f) 
Instance details

Defined in Data.Profunctor.Types

Methods

dimap :: (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 => q b c -> Costar f a b -> Costar f a c #

(.#) :: Coercible b a => Costar f b c -> q a b -> Costar f a c #

Arrow p => Profunctor (WrappedArrow p) 
Instance details

Defined in Data.Profunctor.Types

Methods

dimap :: (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 => q b c -> WrappedArrow p a b -> WrappedArrow p a c #

(.#) :: Coercible b a => WrappedArrow p b c -> q a b -> WrappedArrow p a c #

Profunctor (Forget r) 
Instance details

Defined in Data.Profunctor.Types

Methods

dimap :: (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 => q b c -> Forget r a b -> Forget r a c #

(.#) :: Coercible b a => Forget r b c -> q a b -> Forget r a c #

Profunctor (Tagged :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (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 => q b c -> Tagged a b -> Tagged a c #

(.#) :: Coercible b a => Tagged b c -> q a b -> Tagged a c #

Profunctor (Conjoin j) Source # 
Instance details

Defined in Data.Profunctor.Optic.Index

Methods

dimap :: (a -> b) -> (c -> d) -> Conjoin j b c -> Conjoin j a d #

lmap :: (a -> b) -> Conjoin j b c -> Conjoin j a c #

rmap :: (b -> c) -> Conjoin j a b -> Conjoin j a c #

(#.) :: Coercible c b => q b c -> Conjoin j a b -> Conjoin j a c #

(.#) :: Coercible b a => Conjoin j b c -> q a b -> Conjoin j a c #

Profunctor (Index a) Source # 
Instance details

Defined in Data.Profunctor.Optic.Index

Methods

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

lmap :: (a0 -> b) -> Index a b c -> Index a a0 c #

rmap :: (b -> c) -> Index a a0 b -> Index a a0 c #

(#.) :: Coercible c b => q b c -> Index a a0 b -> Index a a0 c #

(.#) :: Coercible b a0 => Index a b c -> q a0 b -> Index a a0 c #

Profunctor (OptionRep r) Source # 
Instance details

Defined in Data.Profunctor.Optic.Carrier

Methods

dimap :: (a -> b) -> (c -> d) -> OptionRep r b c -> OptionRep r a d #

lmap :: (a -> b) -> OptionRep r b c -> OptionRep r a c #

rmap :: (b -> c) -> OptionRep r a b -> OptionRep r a c #

(#.) :: Coercible c b => q b c -> OptionRep r a b -> OptionRep r a c #

(.#) :: Coercible b a => OptionRep r b c -> q a b -> OptionRep r a c #

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

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (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 => q b c -> (a -> b) -> a -> c #

(.#) :: Coercible b a => (b -> c) -> q a b -> a -> c #

Functor w => Profunctor (Cokleisli w) 
Instance details

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (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 => q b c -> Cokleisli w a b -> Cokleisli w a c #

(.#) :: Coercible b a => Cokleisli w b c -> q a b -> Cokleisli w a c #

Profunctor (GrismRep a b) Source # 
Instance details

Defined in Data.Profunctor.Optic.Carrier

Methods

dimap :: (a0 -> b0) -> (c -> d) -> GrismRep a b b0 c -> GrismRep a b a0 d #

lmap :: (a0 -> b0) -> GrismRep a b b0 c -> GrismRep a b a0 c #

rmap :: (b0 -> c) -> GrismRep a b a0 b0 -> GrismRep a b a0 c #

(#.) :: Coercible c b0 => q b0 c -> GrismRep a b a0 b0 -> GrismRep a b a0 c #

(.#) :: Coercible b0 a0 => GrismRep a b b0 c -> q a0 b0 -> GrismRep a b a0 c #

Profunctor (AffineRep a b) Source # 
Instance details

Defined in Data.Profunctor.Optic.Carrier

Methods

dimap :: (a0 -> b0) -> (c -> d) -> AffineRep a b b0 c -> AffineRep a b a0 d #

lmap :: (a0 -> b0) -> AffineRep a b b0 c -> AffineRep a b a0 c #

rmap :: (b0 -> c) -> AffineRep a b a0 b0 -> AffineRep a b a0 c #

(#.) :: Coercible c b0 => q b0 c -> AffineRep a b a0 b0 -> AffineRep a b a0 c #

(.#) :: Coercible b0 a0 => AffineRep a b b0 c -> q a0 b0 -> AffineRep a b a0 c #

Profunctor (GrateRep a b) Source # 
Instance details

Defined in Data.Profunctor.Optic.Carrier

Methods

dimap :: (a0 -> b0) -> (c -> d) -> GrateRep a b b0 c -> GrateRep a b a0 d #

lmap :: (a0 -> b0) -> GrateRep a b b0 c -> GrateRep a b a0 c #

rmap :: (b0 -> c) -> GrateRep a b a0 b0 -> GrateRep a b a0 c #

(#.) :: Coercible c b0 => q b0 c -> GrateRep a b a0 b0 -> GrateRep a b a0 c #

(.#) :: Coercible b0 a0 => GrateRep a b b0 c -> q a0 b0 -> GrateRep a b a0 c #

Profunctor (LensRep a b) Source # 
Instance details

Defined in Data.Profunctor.Optic.Carrier

Methods

dimap :: (a0 -> b0) -> (c -> d) -> LensRep a b b0 c -> LensRep a b a0 d #

lmap :: (a0 -> b0) -> LensRep a b b0 c -> LensRep a b a0 c #

rmap :: (b0 -> c) -> LensRep a b a0 b0 -> LensRep a b a0 c #

(#.) :: Coercible c b0 => q b0 c -> LensRep a b a0 b0 -> LensRep a b a0 c #

(.#) :: Coercible b0 a0 => LensRep a b b0 c -> q a0 b0 -> LensRep a b a0 c #

Profunctor (PrismRep a b) Source # 
Instance details

Defined in Data.Profunctor.Optic.Carrier

Methods

dimap :: (a0 -> b0) -> (c -> d) -> PrismRep a b b0 c -> PrismRep a b a0 d #

lmap :: (a0 -> b0) -> PrismRep a b b0 c -> PrismRep a b a0 c #

rmap :: (b0 -> c) -> PrismRep a b a0 b0 -> PrismRep a b a0 c #

(#.) :: Coercible c b0 => q b0 c -> PrismRep a b a0 b0 -> PrismRep a b a0 c #

(.#) :: Coercible b0 a0 => PrismRep a b b0 c -> q a0 b0 -> PrismRep a b a0 c #

Profunctor (IsoRep a b) Source # 
Instance details

Defined in Data.Profunctor.Optic.Carrier

Methods

dimap :: (a0 -> b0) -> (c -> d) -> IsoRep a b b0 c -> IsoRep a b a0 d #

lmap :: (a0 -> b0) -> IsoRep a b b0 c -> IsoRep a b a0 c #

rmap :: (b0 -> c) -> IsoRep a b a0 b0 -> IsoRep a b a0 c #

(#.) :: Coercible c b0 => q b0 c -> IsoRep a b a0 b0 -> IsoRep a b a0 c #

(.#) :: Coercible b0 a0 => IsoRep a b b0 c -> q a0 b0 -> IsoRep a b a0 c #

Functor f => Profunctor (Joker f :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (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 => q b c -> Joker f a b -> Joker f a c #

(.#) :: Coercible b a => Joker f b c -> q a b -> Joker f a c #

Contravariant f => Profunctor (Clown f :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (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 => q b c -> Clown f a b -> Clown f a c #

(.#) :: Coercible b a => Clown f b c -> q a b -> Clown f a c #

Profunctor p => Profunctor (Re p s t) Source # 
Instance details

Defined in Data.Profunctor.Optic.Types

Methods

dimap :: (a -> b) -> (c -> d) -> Re p s t b c -> Re p s t a d #

lmap :: (a -> b) -> Re p s t b c -> Re p s t a c #

rmap :: (b -> c) -> Re p s t a b -> Re p s t a c #

(#.) :: Coercible c b => q b c -> Re p s t a b -> Re p s t a c #

(.#) :: Coercible b a => Re p s t b c -> q a b -> Re p s t a c #

Profunctor (IxlensRep i a b) Source # 
Instance details

Defined in Data.Profunctor.Optic.Carrier

Methods

dimap :: (a0 -> b0) -> (c -> d) -> IxlensRep i a b b0 c -> IxlensRep i a b a0 d #

lmap :: (a0 -> b0) -> IxlensRep i a b b0 c -> IxlensRep i a b a0 c #

rmap :: (b0 -> c) -> IxlensRep i a b a0 b0 -> IxlensRep i a b a0 c #

(#.) :: Coercible c b0 => q b0 c -> IxlensRep i a b a0 b0 -> IxlensRep i a b a0 c #

(.#) :: Coercible b0 a0 => IxlensRep i a b b0 c -> q a0 b0 -> IxlensRep i a b a0 c #

(Profunctor p, Profunctor q) => Profunctor (Sum p q) 
Instance details

Defined in Data.Profunctor.Unsafe

Methods

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

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

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

(#.) :: Coercible c b => q0 b c -> Sum p q a b -> Sum p q a c #

(.#) :: Coercible b a => Sum p q b c -> q0 a b -> Sum p q a c #

(Profunctor p, Profunctor q) => Profunctor (Product p q) 
Instance details

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (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 => q0 b c -> Product p q a b -> Product p q a c #

(.#) :: Coercible b a => Product p q b c -> q0 a b -> Product p q a c #

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

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (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 => q b c -> Tannen f p a b -> Tannen f p a c #

(.#) :: Coercible b a => Tannen f p b c -> q a b -> Tannen f p a c #

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

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (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 => q b c -> Biff p f g a b -> Biff p f g a c #

(.#) :: Coercible b a => Biff p f g b c -> q a b -> Biff p f g a c #

Orphan instances

Contravariant f => Bifunctor (Costar f) Source # 
Instance details

Methods

bimap :: (a -> b) -> (c -> d) -> Costar f a c -> Costar f b d #

first :: (a -> b) -> Costar f a c -> Costar f b c #

second :: (b -> c) -> Costar f a b -> Costar f a c #

Coapplicative f => Choice (Costar f) Source # 
Instance details

Methods

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

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

Apply f => Apply (Star f a) Source # 
Instance details

Methods

(<.>) :: Star f a (a0 -> b) -> Star f a a0 -> Star f a b #

(.>) :: Star f a a0 -> Star f a b -> Star f a b #

(<.) :: Star f a a0 -> Star f a b -> Star f a a0 #

liftF2 :: (a0 -> b -> c) -> Star f a a0 -> Star f a b -> Star f a c #

Apply (Costar f a) Source # 
Instance details

Methods

(<.>) :: Costar f a (a0 -> b) -> Costar f a a0 -> Costar f a b #

(.>) :: Costar f a a0 -> Costar f a b -> Costar f a b #

(<.) :: Costar f a a0 -> Costar f a b -> Costar f a a0 #

liftF2 :: (a0 -> b -> c) -> Costar f a a0 -> Costar f a b -> Costar f a c #