Copyright | (C) 2012-2017 Nicolas Frisby (C) 2015-2017 Ryan Scott |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Ryan Scott |
Portability | Portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Data.Functor.Invariant
Contents
Description
Haskell98 invariant functors (also known as exponential functors).
For more information, see Edward Kmett's article "Rotten Bananas":
Synopsis
- class Invariant f where
- invmap :: (a -> b) -> (b -> a) -> f a -> f b
- invmapFunctor :: Functor f => (a -> b) -> (b -> a) -> f a -> f b
- genericInvmap :: (Generic1 f, Invariant (Rep1 f)) => (a -> b) -> (b -> a) -> f a -> f b
- newtype WrappedFunctor f a = WrapFunctor {
- unwrapFunctor :: f a
- invmapContravariant :: Contravariant f => (a -> b) -> (b -> a) -> f a -> f b
- invmapProfunctor :: Profunctor p => (a -> b) -> (b -> a) -> p a a -> p b b
- invmapArrow :: Arrow arr => (a -> b) -> (b -> a) -> arr a a -> arr b b
- newtype WrappedContravariant f a = WrapContravariant {
- unwrapContravariant :: f a
- newtype InvariantProfunctor p a = InvariantProfunctor (p a a)
- newtype InvariantArrow c a = InvariantArrow (c a a)
- class Invariant2 f where
- invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> f a b -> f c d
- invmap2Bifunctor :: Bifunctor f => (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> f a b -> f c d
- newtype WrappedBifunctor (p :: k -> k1 -> Type) (a :: k) (b :: k1) = WrapBifunctor {
- unwrapBifunctor :: p a b
- invmap2Profunctor :: Profunctor f => (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> f a b -> f c d
- newtype WrappedProfunctor p a b = WrapProfunctor {
- unwrapProfunctor :: p a b
Invariant
class Invariant f where Source #
Any * -> *
type parametric in the argument permits an instance of
Invariant
.
Instances should satisfy the following laws:
invmap id id = id invmap f2 f2' . invmap f1 f1' = invmap (f2 . f1) (f1' . f2')
Minimal complete definition
Nothing
Methods
Instances
invmapFunctor :: Functor f => (a -> b) -> (b -> a) -> f a -> f b Source #
Every Functor
is also an Invariant
functor.
GHC.Generics
With GHC 7.2 or later, Invariant
instances can be defined easily using GHC
generics like so:
{-# LANGUAGE DeriveGeneric, FlexibleContexts #-}
import Data.Functor.Invariant
import GHC.Generics
data T f a = T (f a) deriving Generic1
instance Invariant f => Invariant
(T f)
Be aware that generic Invariant
instances cannot be derived for data types
that have function arguments in which the last type parameter appears in a
position other than the result type (e.g., data Fun a = Fun (a -> a)
). For
these, you can derive them using the Data.Functor.Invariant.TH module.
genericInvmap :: (Generic1 f, Invariant (Rep1 f)) => (a -> b) -> (b -> a) -> f a -> f b Source #
A generic implementation of invmap
.
newtype WrappedFunctor f a Source #
Wrap a Functor
to be used as a member of Invariant
.
Constructors
WrapFunctor | |
Fields
|
Instances
invmapContravariant :: Contravariant f => (a -> b) -> (b -> a) -> f a -> f b Source #
Every Contravariant
functor is also an Invariant
functor.
invmapProfunctor :: Profunctor p => (a -> b) -> (b -> a) -> p a a -> p b b Source #
A Profunctor
with the same input and output types can be seen as an Invariant
functor.
invmapArrow :: Arrow arr => (a -> b) -> (b -> a) -> arr a a -> arr b b Source #
An Arrow
with the same input and output types can be seen as an Invariant
functor.
newtype WrappedContravariant f a Source #
Wrap a Contravariant
functor to be used as a member of Invariant
.
Constructors
WrapContravariant | |
Fields
|
Instances
newtype InvariantProfunctor p a Source #
A Profunctor
with the same input and output types can be seen as an Invariant
functor.
Constructors
InvariantProfunctor (p a a) |
Instances
Profunctor p => Invariant (InvariantProfunctor p) Source # | |
Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> InvariantProfunctor p a -> InvariantProfunctor p b Source # |
newtype InvariantArrow c a Source #
An Arrow
with the same input and output types can be seen as an Invariant
functor.
Constructors
InvariantArrow (c a a) |
Instances
Arrow c => Invariant (InvariantArrow c) Source # | |
Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> InvariantArrow c a -> InvariantArrow c b Source # |
Invariant2
class Invariant2 f where Source #
Any * -> * -> *
type parametric in both arguments permits an instance of
Invariant2
.
Instances should satisfy the following laws:
invmap2 id id id id = id invmap2 f2 f2' g2 g2' . invmap2 f1 f1' g1 g1' = invmap2 (f2 . f1) (f1' . f2') (g2 . g1) (g1' . g2')
Instances
Invariant2 Either Source # | |
Defined in Data.Functor.Invariant | |
Invariant2 Op Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 Arg Source # | from Data.Semigroup |
Defined in Data.Functor.Invariant | |
Invariant2 (,) Source # | |
Defined in Data.Functor.Invariant | |
Arrow arr => Invariant2 (WrappedArrow arr) Source # | from Control.Applicative |
Defined in Data.Functor.Invariant | |
Invariant m => Invariant2 (Kleisli m) Source # | from Control.Arrow |
Defined in Data.Functor.Invariant | |
Invariant2 (Const :: Type -> Type -> Type) Source # | from Control.Applicative |
Defined in Data.Functor.Invariant | |
Invariant2 (CopastroSum p) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 (CotambaraSum p) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 (PastroSum p) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 p => Invariant2 (TambaraSum p) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 p => Invariant2 (Closure p) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 (Environment p) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 p => Invariant2 (CofreeMapping p) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 (FreeMapping p) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 (Copastro p) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 (Cotambara p) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 (Pastro p) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 p => Invariant2 (Tambara p) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 p => Invariant2 (CofreeTraversing p) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 (FreeTraversing p) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 (Coyoneda p) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 (Yoneda p) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 (Tagged :: Type -> Type -> Type) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 (Constant :: Type -> Type -> Type) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 ((,,) a) Source # | |
Defined in Data.Functor.Invariant | |
Invariant2 (K1 i :: Type -> Type -> Type) Source # | from GHC.Generics |
Defined in Data.Functor.Invariant | |
Invariant w => Invariant2 (Cokleisli w) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant f => Invariant2 (Costar f) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 (Forget r :: Type -> Type -> Type) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant f => Invariant2 (Star f) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 ((,,,) a b) Source # | |
Defined in Data.Functor.Invariant | |
Invariant2 (->) Source # | |
Defined in Data.Functor.Invariant | |
Invariant f => Invariant2 (Clown f :: Type -> Type -> Type) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 p => Invariant2 (Flip p) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant g => Invariant2 (Joker g :: Type -> Type -> Type) Source # | from the |
Defined in Data.Functor.Invariant | |
Bifunctor p => Invariant2 (WrappedBifunctor p) Source # | from the |
Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedBifunctor p a b -> WrappedBifunctor p c d Source # | |
Profunctor p => Invariant2 (WrappedProfunctor p) Source # | |
Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedProfunctor p a b -> WrappedProfunctor p c d Source # | |
Invariant2 p => Invariant2 (Codensity p) Source # | from the |
Defined in Data.Functor.Invariant | |
Arrow arr => Invariant2 (WrappedArrow arr) Source # | from the |
Defined in Data.Functor.Invariant | |
Invariant2 ((,,,,) a b c) Source # | |
Defined in Data.Functor.Invariant | |
(Invariant2 f, Invariant2 g) => Invariant2 (Product f g) Source # | from the |
Defined in Data.Functor.Invariant | |
(Invariant2 p, Invariant2 q) => Invariant2 (Sum p q) Source # | from the |
Defined in Data.Functor.Invariant | |
(Invariant f, Invariant2 p) => Invariant2 (Tannen f p) Source # | from the |
Defined in Data.Functor.Invariant | |
(Invariant f, Invariant2 p) => Invariant2 (Cayley f p) Source # | from the |
Defined in Data.Functor.Invariant | |
(Invariant2 p, Invariant2 q) => Invariant2 (Procompose p q) Source # | from the |
Defined in Data.Functor.Invariant | |
(Invariant2 p, Invariant2 q) => Invariant2 (Rift p q) Source # | from the |
Defined in Data.Functor.Invariant | |
(Invariant2 p, Invariant2 q) => Invariant2 (Ran p q) Source # | from the |
Defined in Data.Functor.Invariant | |
(Invariant2 p, Invariant f, Invariant g) => Invariant2 (Biff p f g) Source # | from the |
Defined in Data.Functor.Invariant |
invmap2Bifunctor :: Bifunctor f => (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> f a b -> f c d Source #
Every Bifunctor
is also an Invariant2
functor.
newtype WrappedBifunctor (p :: k -> k1 -> Type) (a :: k) (b :: k1) #
Constructors
WrapBifunctor | |
Fields
|
Instances
Generic1 (WrappedBifunctor p a :: k1 -> Type) | |
Defined in Data.Bifunctor.Wrapped Associated Types type Rep1 (WrappedBifunctor p a) :: k -> Type Methods from1 :: forall (a0 :: k). WrappedBifunctor p a a0 -> Rep1 (WrappedBifunctor p a) a0 to1 :: forall (a0 :: k). Rep1 (WrappedBifunctor p a) a0 -> WrappedBifunctor p a a0 | |
Bifoldable p => Bifoldable (WrappedBifunctor p) | |
Defined in Data.Bifunctor.Wrapped Methods bifold :: Monoid m => WrappedBifunctor p m m -> m bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> WrappedBifunctor p a b -> m bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> WrappedBifunctor p a b -> c bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> WrappedBifunctor p a b -> c | |
Bifunctor p => Bifunctor (WrappedBifunctor p) | |
Defined in Data.Bifunctor.Wrapped Methods bimap :: (a -> b) -> (c -> d) -> WrappedBifunctor p a c -> WrappedBifunctor p b d first :: (a -> b) -> WrappedBifunctor p a c -> WrappedBifunctor p b c second :: (b -> c) -> WrappedBifunctor p a b -> WrappedBifunctor p a c | |
Bitraversable p => Bitraversable (WrappedBifunctor p) | |
Defined in Data.Bifunctor.Wrapped Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> WrappedBifunctor p a b -> f (WrappedBifunctor p c d) | |
Eq2 p => Eq2 (WrappedBifunctor p) | |
Defined in Data.Bifunctor.Wrapped Methods liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> WrappedBifunctor p a c -> WrappedBifunctor p b d -> Bool | |
Ord2 p => Ord2 (WrappedBifunctor p) | |
Defined in Data.Bifunctor.Wrapped Methods liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> WrappedBifunctor p a c -> WrappedBifunctor p b d -> Ordering | |
Read2 p => Read2 (WrappedBifunctor p) | |
Defined in Data.Bifunctor.Wrapped Methods liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (WrappedBifunctor p a b) liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [WrappedBifunctor p a b] liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (WrappedBifunctor p a b) liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [WrappedBifunctor p a b] | |
Show2 p => Show2 (WrappedBifunctor p) | |
Defined in Data.Bifunctor.Wrapped Methods liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> WrappedBifunctor p a b -> ShowS liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [WrappedBifunctor p a b] -> ShowS | |
Biapplicative p => Biapplicative (WrappedBifunctor p) | |
Defined in Data.Bifunctor.Wrapped Methods bipure :: a -> b -> WrappedBifunctor p a b (<<*>>) :: WrappedBifunctor p (a -> b) (c -> d) -> WrappedBifunctor p a c -> WrappedBifunctor p b d biliftA2 :: (a -> b -> c) -> (d -> e -> f) -> WrappedBifunctor p a d -> WrappedBifunctor p b e -> WrappedBifunctor p c f (*>>) :: WrappedBifunctor p a b -> WrappedBifunctor p c d -> WrappedBifunctor p c d (<<*) :: WrappedBifunctor p a b -> WrappedBifunctor p c d -> WrappedBifunctor p a b | |
Bifunctor p => Invariant2 (WrappedBifunctor p) Source # | from the |
Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedBifunctor p a b -> WrappedBifunctor p c d Source # | |
Bifoldable p => Foldable (WrappedBifunctor p a) | |
Defined in Data.Bifunctor.Wrapped Methods fold :: Monoid m => WrappedBifunctor p a m -> m foldMap :: Monoid m => (a0 -> m) -> WrappedBifunctor p a a0 -> m foldMap' :: Monoid m => (a0 -> m) -> WrappedBifunctor p a a0 -> m foldr :: (a0 -> b -> b) -> b -> WrappedBifunctor p a a0 -> b foldr' :: (a0 -> b -> b) -> b -> WrappedBifunctor p a a0 -> b foldl :: (b -> a0 -> b) -> b -> WrappedBifunctor p a a0 -> b foldl' :: (b -> a0 -> b) -> b -> WrappedBifunctor p a a0 -> b foldr1 :: (a0 -> a0 -> a0) -> WrappedBifunctor p a a0 -> a0 foldl1 :: (a0 -> a0 -> a0) -> WrappedBifunctor p a a0 -> a0 toList :: WrappedBifunctor p a a0 -> [a0] null :: WrappedBifunctor p a a0 -> Bool length :: WrappedBifunctor p a a0 -> Int elem :: Eq a0 => a0 -> WrappedBifunctor p a a0 -> Bool maximum :: Ord a0 => WrappedBifunctor p a a0 -> a0 minimum :: Ord a0 => WrappedBifunctor p a a0 -> a0 sum :: Num a0 => WrappedBifunctor p a a0 -> a0 product :: Num a0 => WrappedBifunctor p a a0 -> a0 | |
(Eq2 p, Eq a) => Eq1 (WrappedBifunctor p a) | |
Defined in Data.Bifunctor.Wrapped Methods liftEq :: (a0 -> b -> Bool) -> WrappedBifunctor p a a0 -> WrappedBifunctor p a b -> Bool | |
(Ord2 p, Ord a) => Ord1 (WrappedBifunctor p a) | |
Defined in Data.Bifunctor.Wrapped Methods liftCompare :: (a0 -> b -> Ordering) -> WrappedBifunctor p a a0 -> WrappedBifunctor p a b -> Ordering | |
(Read2 p, Read a) => Read1 (WrappedBifunctor p a) | |
Defined in Data.Bifunctor.Wrapped Methods liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (WrappedBifunctor p a a0) liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [WrappedBifunctor p a a0] liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (WrappedBifunctor p a a0) liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [WrappedBifunctor p a a0] | |
(Show2 p, Show a) => Show1 (WrappedBifunctor p a) | |
Defined in Data.Bifunctor.Wrapped Methods liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> WrappedBifunctor p a a0 -> ShowS liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [WrappedBifunctor p a a0] -> ShowS | |
Bitraversable p => Traversable (WrappedBifunctor p a) | |
Defined in Data.Bifunctor.Wrapped Methods traverse :: Applicative f => (a0 -> f b) -> WrappedBifunctor p a a0 -> f (WrappedBifunctor p a b) sequenceA :: Applicative f => WrappedBifunctor p a (f a0) -> f (WrappedBifunctor p a a0) mapM :: Monad m => (a0 -> m b) -> WrappedBifunctor p a a0 -> m (WrappedBifunctor p a b) sequence :: Monad m => WrappedBifunctor p a (m a0) -> m (WrappedBifunctor p a a0) | |
Bifunctor p => Functor (WrappedBifunctor p a) | |
Defined in Data.Bifunctor.Wrapped Methods fmap :: (a0 -> b) -> WrappedBifunctor p a a0 -> WrappedBifunctor p a b (<$) :: a0 -> WrappedBifunctor p a b -> WrappedBifunctor p a a0 | |
Bifunctor p => Invariant (WrappedBifunctor p a) Source # | from the |
Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> WrappedBifunctor p a a0 -> WrappedBifunctor p a b Source # | |
Generic (WrappedBifunctor p a b) | |
Defined in Data.Bifunctor.Wrapped Associated Types type Rep (WrappedBifunctor p a b) :: Type -> Type Methods from :: WrappedBifunctor p a b -> Rep (WrappedBifunctor p a b) x to :: Rep (WrappedBifunctor p a b) x -> WrappedBifunctor p a b | |
Read (p a b) => Read (WrappedBifunctor p a b) | |
Defined in Data.Bifunctor.Wrapped Methods readsPrec :: Int -> ReadS (WrappedBifunctor p a b) readList :: ReadS [WrappedBifunctor p a b] readPrec :: ReadPrec (WrappedBifunctor p a b) readListPrec :: ReadPrec [WrappedBifunctor p a b] | |
Show (p a b) => Show (WrappedBifunctor p a b) | |
Defined in Data.Bifunctor.Wrapped Methods showsPrec :: Int -> WrappedBifunctor p a b -> ShowS show :: WrappedBifunctor p a b -> String showList :: [WrappedBifunctor p a b] -> ShowS | |
Eq (p a b) => Eq (WrappedBifunctor p a b) | |
Defined in Data.Bifunctor.Wrapped Methods (==) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool (/=) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool | |
Ord (p a b) => Ord (WrappedBifunctor p a b) | |
Defined in Data.Bifunctor.Wrapped Methods compare :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Ordering (<) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool (<=) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool (>) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool (>=) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool max :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> WrappedBifunctor p a b min :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> WrappedBifunctor p a b | |
type Rep1 (WrappedBifunctor p a :: k1 -> Type) | |
Defined in Data.Bifunctor.Wrapped type Rep1 (WrappedBifunctor p a :: k1 -> Type) = D1 ('MetaData "WrappedBifunctor" "Data.Bifunctor.Wrapped" "bifunctors-5.5.15-DgMPHW6v5U19lZ1qBcHdO7" 'True) (C1 ('MetaCons "WrapBifunctor" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapBifunctor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 (p a)))) | |
type Rep (WrappedBifunctor p a b) | |
Defined in Data.Bifunctor.Wrapped type Rep (WrappedBifunctor p a b) = D1 ('MetaData "WrappedBifunctor" "Data.Bifunctor.Wrapped" "bifunctors-5.5.15-DgMPHW6v5U19lZ1qBcHdO7" 'True) (C1 ('MetaCons "WrapBifunctor" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapBifunctor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (p a b)))) |
invmap2Profunctor :: Profunctor f => (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> f a b -> f c d Source #
Every Profunctor
is also an Invariant2
functor.
newtype WrappedProfunctor p a b Source #
Wrap a Profunctor
to be used as a member of Invariant2
.
Constructors
WrapProfunctor | |
Fields
|
Instances
ProfunctorFunctor (WrappedProfunctor :: (Type -> Type -> Type) -> Type -> Type -> Type) Source # | |
Defined in Data.Functor.Invariant Methods promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> WrappedProfunctor p :-> WrappedProfunctor q | |
Category p => Category (WrappedProfunctor p :: k -> k -> Type) Source # | |
Defined in Data.Functor.Invariant Methods id :: forall (a :: k0). WrappedProfunctor p a a (.) :: forall (b :: k0) (c :: k0) (a :: k0). WrappedProfunctor p b c -> WrappedProfunctor p a b -> WrappedProfunctor p a c | |
ProfunctorComonad (WrappedProfunctor :: (Type -> Type -> Type) -> Type -> Type -> Type) Source # | |
Defined in Data.Functor.Invariant Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => WrappedProfunctor p :-> p produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => WrappedProfunctor p :-> WrappedProfunctor (WrappedProfunctor p) | |
ProfunctorMonad (WrappedProfunctor :: (Type -> Type -> Type) -> Type -> Type -> Type) Source # | |
Defined in Data.Functor.Invariant Methods proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> WrappedProfunctor p projoin :: forall (p :: Type -> Type -> Type). Profunctor p => WrappedProfunctor (WrappedProfunctor p) :-> WrappedProfunctor p | |
Arrow p => Arrow (WrappedProfunctor p) Source # | |
Defined in Data.Functor.Invariant Methods arr :: (b -> c) -> WrappedProfunctor p b c first :: WrappedProfunctor p b c -> WrappedProfunctor p (b, d) (c, d) second :: WrappedProfunctor p b c -> WrappedProfunctor p (d, b) (d, c) (***) :: WrappedProfunctor p b c -> WrappedProfunctor p b' c' -> WrappedProfunctor p (b, b') (c, c') (&&&) :: WrappedProfunctor p b c -> WrappedProfunctor p b c' -> WrappedProfunctor p b (c, c') | |
ArrowChoice p => ArrowChoice (WrappedProfunctor p) Source # | |
Defined in Data.Functor.Invariant Methods left :: WrappedProfunctor p b c -> WrappedProfunctor p (Either b d) (Either c d) right :: WrappedProfunctor p b c -> WrappedProfunctor p (Either d b) (Either d c) (+++) :: WrappedProfunctor p b c -> WrappedProfunctor p b' c' -> WrappedProfunctor p (Either b b') (Either c c') (|||) :: WrappedProfunctor p b d -> WrappedProfunctor p c d -> WrappedProfunctor p (Either b c) d | |
ArrowLoop p => ArrowLoop (WrappedProfunctor p) Source # | |
Defined in Data.Functor.Invariant Methods loop :: WrappedProfunctor p (b, d) (c, d) -> WrappedProfunctor p b c | |
ArrowPlus p => ArrowPlus (WrappedProfunctor p) Source # | |
Defined in Data.Functor.Invariant Methods (<+>) :: WrappedProfunctor p b c -> WrappedProfunctor p b c -> WrappedProfunctor p b c | |
ArrowZero p => ArrowZero (WrappedProfunctor p) Source # | |
Defined in Data.Functor.Invariant Methods zeroArrow :: WrappedProfunctor p b c | |
Profunctor p => Invariant2 (WrappedProfunctor p) Source # | |
Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedProfunctor p a b -> WrappedProfunctor p c d Source # | |
Choice p => Choice (WrappedProfunctor p) Source # | |
Defined in Data.Functor.Invariant Methods left' :: WrappedProfunctor p a b -> WrappedProfunctor p (Either a c) (Either b c) right' :: WrappedProfunctor p a b -> WrappedProfunctor p (Either c a) (Either c b) | |
Cochoice p => Cochoice (WrappedProfunctor p) Source # | |
Defined in Data.Functor.Invariant Methods unleft :: WrappedProfunctor p (Either a d) (Either b d) -> WrappedProfunctor p a b unright :: WrappedProfunctor p (Either d a) (Either d b) -> WrappedProfunctor p a b | |
Closed p => Closed (WrappedProfunctor p) Source # | |
Defined in Data.Functor.Invariant Methods closed :: WrappedProfunctor p a b -> WrappedProfunctor p (x -> a) (x -> b) | |
Mapping p => Mapping (WrappedProfunctor p) Source # | |
Defined in Data.Functor.Invariant Methods map' :: Functor f => WrappedProfunctor p a b -> WrappedProfunctor p (f a) (f b) roam :: ((a -> b) -> s -> t) -> WrappedProfunctor p a b -> WrappedProfunctor p s t | |
Costrong p => Costrong (WrappedProfunctor p) Source # | |
Defined in Data.Functor.Invariant Methods unfirst :: WrappedProfunctor p (a, d) (b, d) -> WrappedProfunctor p a b unsecond :: WrappedProfunctor p (d, a) (d, b) -> WrappedProfunctor p a b | |
Strong p => Strong (WrappedProfunctor p) Source # | |
Defined in Data.Functor.Invariant Methods first' :: WrappedProfunctor p a b -> WrappedProfunctor p (a, c) (b, c) second' :: WrappedProfunctor p a b -> WrappedProfunctor p (c, a) (c, b) | |
Traversing p => Traversing (WrappedProfunctor p) Source # | |
Defined in Data.Functor.Invariant Methods traverse' :: Traversable f => WrappedProfunctor p a b -> WrappedProfunctor p (f a) (f b) wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> WrappedProfunctor p a b -> WrappedProfunctor p s t | |
Profunctor p => Profunctor (WrappedProfunctor p) Source # | |
Defined in Data.Functor.Invariant Methods dimap :: (a -> b) -> (c -> d) -> WrappedProfunctor p b c -> WrappedProfunctor p a d lmap :: (a -> b) -> WrappedProfunctor p b c -> WrappedProfunctor p a c rmap :: (b -> c) -> WrappedProfunctor p a b -> WrappedProfunctor p a c (#.) :: forall a b c q. Coercible c b => q b c -> WrappedProfunctor p a b -> WrappedProfunctor p a c (.#) :: forall a b c q. Coercible b a => WrappedProfunctor p b c -> q a b -> WrappedProfunctor p a c | |
Profunctor p => Invariant (WrappedProfunctor p a) Source # | |
Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> WrappedProfunctor p a a0 -> WrappedProfunctor p a b Source # | |
Read (p a b) => Read (WrappedProfunctor p a b) Source # | |
Defined in Data.Functor.Invariant Methods readsPrec :: Int -> ReadS (WrappedProfunctor p a b) readList :: ReadS [WrappedProfunctor p a b] readPrec :: ReadPrec (WrappedProfunctor p a b) readListPrec :: ReadPrec [WrappedProfunctor p a b] | |
Show (p a b) => Show (WrappedProfunctor p a b) Source # | |
Defined in Data.Functor.Invariant Methods showsPrec :: Int -> WrappedProfunctor p a b -> ShowS show :: WrappedProfunctor p a b -> String showList :: [WrappedProfunctor p a b] -> ShowS | |
Eq (p a b) => Eq (WrappedProfunctor p a b) Source # | |
Defined in Data.Functor.Invariant Methods (==) :: WrappedProfunctor p a b -> WrappedProfunctor p a b -> Bool (/=) :: WrappedProfunctor p a b -> WrappedProfunctor p a b -> Bool | |
Ord (p a b) => Ord (WrappedProfunctor p a b) Source # | |
Defined in Data.Functor.Invariant Methods compare :: WrappedProfunctor p a b -> WrappedProfunctor p a b -> Ordering (<) :: WrappedProfunctor p a b -> WrappedProfunctor p a b -> Bool (<=) :: WrappedProfunctor p a b -> WrappedProfunctor p a b -> Bool (>) :: WrappedProfunctor p a b -> WrappedProfunctor p a b -> Bool (>=) :: WrappedProfunctor p a b -> WrappedProfunctor p a b -> Bool max :: WrappedProfunctor p a b -> WrappedProfunctor p a b -> WrappedProfunctor p a b min :: WrappedProfunctor p a b -> WrappedProfunctor p a b -> WrappedProfunctor p a b |