invariant-0.4: Haskell 98 invariant functors

Copyright(C) 2012-2016 Nicolas Frisby, (C) 2015-2016 Ryan Scott
LicenseBSD-style (see the file LICENSE)
MaintainerRyan Scott
PortabilityPortable
Safe HaskellNone
LanguageHaskell98

Data.Functor.Invariant

Contents

Description

Haskell98 invariant functors (also known as exponential functors).

For more information, see Edward Kmett's article "Rotten Bananas":

http://comonad.com/reader/2008/rotten-bananas/

Synopsis

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')

Methods

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

invmap :: (Generic1 f, Invariant (Rep1 f)) => (a -> b) -> (b -> a) -> f a -> f b Source #

Instances

Invariant [] Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> [a] -> [b] Source #

Invariant Maybe Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> Maybe a -> Maybe b Source #

Invariant IO Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> IO a -> IO b Source #

Invariant V1 Source #

from GHC.Generics

Methods

invmap :: (a -> b) -> (b -> a) -> V1 a -> V1 b Source #

Invariant U1 Source #

from GHC.Generics

Methods

invmap :: (a -> b) -> (b -> a) -> U1 a -> U1 b Source #

Invariant Par1 Source #

from GHC.Generics

Methods

invmap :: (a -> b) -> (b -> a) -> Par1 a -> Par1 b Source #

Invariant UAddr Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> UAddr a -> UAddr b Source #

Invariant UChar Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> UChar a -> UChar b Source #

Invariant UDouble Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> UDouble a -> UDouble b Source #

Invariant UFloat Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> UFloat a -> UFloat b Source #

Invariant UInt Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> UInt a -> UInt b Source #

Invariant UWord Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> UWord a -> UWord b Source #

Invariant StateVar Source #

from the StateVar package

Methods

invmap :: (a -> b) -> (b -> a) -> StateVar a -> StateVar b Source #

Invariant SettableStateVar Source #

from the StateVar package

Methods

invmap :: (a -> b) -> (b -> a) -> SettableStateVar a -> SettableStateVar b Source #

Invariant Identity Source #

from Data.Functor.Identity

Methods

invmap :: (a -> b) -> (b -> a) -> Identity a -> Identity b Source #

Invariant Min Source #

from Data.Semigroup

Methods

invmap :: (a -> b) -> (b -> a) -> Min a -> Min b Source #

Invariant Max Source #

from Data.Semigroup

Methods

invmap :: (a -> b) -> (b -> a) -> Max a -> Max b Source #

Invariant First Source #

from Data.Semigroup

Methods

invmap :: (a -> b) -> (b -> a) -> First a -> First b Source #

Invariant Last Source #

from Data.Semigroup

Methods

invmap :: (a -> b) -> (b -> a) -> Last a -> Last b Source #

Invariant Option Source #

from Data.Semigroup

Methods

invmap :: (a -> b) -> (b -> a) -> Option a -> Option b Source #

Invariant NonEmpty Source #

from Data.List.NonEmpty

Methods

invmap :: (a -> b) -> (b -> a) -> NonEmpty a -> NonEmpty b Source #

Invariant Complex Source #

from Data.Complex

Methods

invmap :: (a -> b) -> (b -> a) -> Complex a -> Complex b Source #

Invariant ArgOrder Source #

from System.Console.GetOpt

Methods

invmap :: (a -> b) -> (b -> a) -> ArgOrder a -> ArgOrder b Source #

Invariant OptDescr Source #

from System.Console.GetOpt

Methods

invmap :: (a -> b) -> (b -> a) -> OptDescr a -> OptDescr b Source #

Invariant ArgDescr Source #

from System.Console.GetOpt

Methods

invmap :: (a -> b) -> (b -> a) -> ArgDescr a -> ArgDescr b Source #

Invariant ZipList Source #

from Control.Applicative

Methods

invmap :: (a -> b) -> (b -> a) -> ZipList a -> ZipList b Source #

Invariant Handler Source #

from Control.Exception

Methods

invmap :: (a -> b) -> (b -> a) -> Handler a -> Handler b Source #

Invariant STM Source #

from the stm package

Methods

invmap :: (a -> b) -> (b -> a) -> STM a -> STM b Source #

Invariant Dual Source #

from Data.Monoid

Methods

invmap :: (a -> b) -> (b -> a) -> Dual a -> Dual b Source #

Invariant Endo Source #

from Data.Monoid

Methods

invmap :: (a -> b) -> (b -> a) -> Endo a -> Endo b Source #

Invariant Sum Source #

from Data.Monoid

Methods

invmap :: (a -> b) -> (b -> a) -> Sum a -> Sum b Source #

Invariant Product Source #

from Data.Monoid

Methods

invmap :: (a -> b) -> (b -> a) -> Product a -> Product b Source #

Invariant First Source #

from Data.Monoid

Methods

invmap :: (a -> b) -> (b -> a) -> First a -> First b Source #

Invariant Last Source #

from Data.Monoid

Methods

invmap :: (a -> b) -> (b -> a) -> Last a -> Last b Source #

Invariant ReadPrec Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> ReadPrec a -> ReadPrec b Source #

Invariant ReadP Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> ReadP a -> ReadP b Source #

Invariant Tree Source #

from the containers package

Methods

invmap :: (a -> b) -> (b -> a) -> Tree a -> Tree b Source #

Invariant Seq Source #

from the containers package

Methods

invmap :: (a -> b) -> (b -> a) -> Seq a -> Seq b Source #

Invariant ViewL Source #

from the containers package

Methods

invmap :: (a -> b) -> (b -> a) -> ViewL a -> ViewL b Source #

Invariant ViewR Source #

from the containers package

Methods

invmap :: (a -> b) -> (b -> a) -> ViewR a -> ViewR b Source #

Invariant IntMap Source #

from the containers package

Methods

invmap :: (a -> b) -> (b -> a) -> IntMap a -> IntMap b Source #

Invariant Predicate Source #

from the contravariant package

Methods

invmap :: (a -> b) -> (b -> a) -> Predicate a -> Predicate b Source #

Invariant Comparison Source #

from the contravariant package

Methods

invmap :: (a -> b) -> (b -> a) -> Comparison a -> Comparison b Source #

Invariant Equivalence Source #

from the contravariant package

Methods

invmap :: (a -> b) -> (b -> a) -> Equivalence a -> Equivalence b Source #

Invariant ((->) a) Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> (a -> a) -> a -> b Source #

Invariant (Either a) Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> Either a a -> Either a b Source #

Invariant f => Invariant (Rec1 f) Source #

from GHC.Generics

Methods

invmap :: (a -> b) -> (b -> a) -> Rec1 f a -> Rec1 f b Source #

Invariant ((,) a) Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> (a, a) -> (a, b) Source #

Invariant (ST s) Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> ST s a -> ST s b Source #

Invariant (Array i) Source #

from the array package

Methods

invmap :: (a -> b) -> (b -> a) -> Array i a -> Array i b Source #

Invariant (Arg a) Source #

from Data.Semigroup

Methods

invmap :: (a -> b) -> (b -> a) -> Arg a a -> Arg a b Source #

Invariant (ST s) Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> ST s a -> ST s b Source #

Monad m => Invariant (WrappedMonad m) Source #

from Control.Applicative

Methods

invmap :: (a -> b) -> (b -> a) -> WrappedMonad m a -> WrappedMonad m b Source #

Arrow a => Invariant (ArrowMonad a) Source #

from Control.Arrow

Methods

invmap :: (a -> b) -> (b -> a) -> ArrowMonad a a -> ArrowMonad a b Source #

Invariant (Proxy *) Source #

from Data.Proxy

Methods

invmap :: (a -> b) -> (b -> a) -> Proxy * a -> Proxy * b Source #

Invariant (Map k) Source #

from the containers package

Methods

invmap :: (a -> b) -> (b -> a) -> Map k a -> Map k b Source #

Invariant (Op a) Source #

from the contravariant package

Methods

invmap :: (a -> b) -> (b -> a) -> Op a a -> Op a b Source #

Invariant2 p => Invariant (Prep p) Source #

from the profunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> Prep p a -> Prep p b Source #

Invariant2 p => Invariant (Coprep p) Source #

from the profunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> Coprep p a -> Coprep p b Source #

Invariant f => Invariant (Lift f) Source #

from the transformers package

Methods

invmap :: (a -> b) -> (b -> a) -> Lift f a -> Lift f b Source #

Invariant m => Invariant (MaybeT m) Source #

from the transformers package

Methods

invmap :: (a -> b) -> (b -> a) -> MaybeT m a -> MaybeT m b Source #

Invariant m => Invariant (ListT m) Source #

from the transformers package

Methods

invmap :: (a -> b) -> (b -> a) -> ListT m a -> ListT m b Source #

Invariant (HashMap k) Source #

from the unordered-containers package

Methods

invmap :: (a -> b) -> (b -> a) -> HashMap k a -> HashMap k b Source #

Invariant (K1 i c) Source #

from GHC.Generics

Methods

invmap :: (a -> b) -> (b -> a) -> K1 i c a -> K1 i c b Source #

(Invariant l, Invariant r) => Invariant ((:+:) l r) Source #

from GHC.Generics

Methods

invmap :: (a -> b) -> (b -> a) -> (l :+: r) a -> (l :+: r) b Source #

(Invariant l, Invariant r) => Invariant ((:*:) l r) Source #

from GHC.Generics

Methods

invmap :: (a -> b) -> (b -> a) -> (l :*: r) a -> (l :*: r) b Source #

(Invariant f, Invariant g) => Invariant ((:.:) f g) Source #

from GHC.Generics

Methods

invmap :: (a -> b) -> (b -> a) -> (f :.: g) a -> (f :.: g) b Source #

Invariant ((,,) a b) Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> (a, b, a) -> (a, b, b) Source #

Arrow arr => Invariant (WrappedArrow arr a) Source #

from Control.Applicative

Methods

invmap :: (a -> b) -> (b -> a) -> WrappedArrow arr a a -> WrappedArrow arr a b Source #

Monad m => Invariant (Kleisli m a) Source #

from Control.Arrow

Methods

invmap :: (a -> b) -> (b -> a) -> Kleisli m a a -> Kleisli m a b Source #

Invariant (Const * a) Source #

from Control.Applicative

Methods

invmap :: (a -> b) -> (b -> a) -> Const * a a -> Const * a b Source #

Invariant f => Invariant (Alt * f) Source #

from Data.Monoid

Methods

invmap :: (a -> b) -> (b -> a) -> Alt * f a -> Alt * f b Source #

Invariant2 p => Invariant (Join * p) Source #

from the bifunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> Join * p a -> Join * p b Source #

Invariant2 p => Invariant (Fix * p) Source #

from the bifunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> Fix * p a -> Fix * p b Source #

Invariant (Cokleisli w a) Source #

from the comonad package

Methods

invmap :: (a -> b) -> (b -> a) -> Cokleisli w a a -> Cokleisli w a b Source #

Invariant m => Invariant (IdentityT * m) Source #

from the transformers package

Methods

invmap :: (a -> b) -> (b -> a) -> IdentityT * m a -> IdentityT * m b Source #

(Invariant f, Invariant g) => Invariant (Compose f g) Source #

from the contravariant package

Methods

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

(Invariant f, Invariant g) => Invariant (ComposeFC f g) Source #

from the contravariant package

Methods

invmap :: (a -> b) -> (b -> a) -> ComposeFC f g a -> ComposeFC f g b Source #

(Invariant f, Invariant g) => Invariant (ComposeCF f g) Source #

from the contravariant package

Methods

invmap :: (a -> b) -> (b -> a) -> ComposeCF f g a -> ComposeCF f g b Source #

Invariant2 p => Invariant (Codensity p a) Source #

from the profunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> Codensity p a a -> Codensity p a b Source #

Invariant2 p => Invariant (TambaraSum p a) Source #

from the profunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> TambaraSum p a a -> TambaraSum p a b Source #

Invariant (CotambaraSum p a) Source #

from the profunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> CotambaraSum p a a -> CotambaraSum p a b Source #

Invariant2 p => Invariant (Closure p a) Source #

from the profunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> Closure p a a -> Closure p a b Source #

Invariant2 p => Invariant (Tambara p a) Source #

from the profunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> Tambara p a a -> Tambara p a b Source #

Invariant (Cotambara p a) Source #

from the profunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> Cotambara p a a -> Cotambara p a b Source #

Invariant f => Invariant (Star f a) Source #

from the profunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> Star f a a -> Star f a b Source #

Invariant (Costar f a) Source #

from the profunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> Costar f a a -> Costar f a b Source #

Arrow arr => Invariant (WrappedArrow arr a) Source #

from the profunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> WrappedArrow arr a a -> WrappedArrow arr a b Source #

Invariant (Forget r a) Source #

from the profunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> Forget r a a -> Forget r a b Source #

Invariant (Tagged k s) Source #

from the tagged package

Methods

invmap :: (a -> b) -> (b -> a) -> Tagged k s a -> Tagged k s b Source #

Invariant f => Invariant (Reverse * f) Source #

from the transformers package

Methods

invmap :: (a -> b) -> (b -> a) -> Reverse * f a -> Reverse * f b Source #

Invariant f => Invariant (Backwards * f) Source #

from the transformers package

Methods

invmap :: (a -> b) -> (b -> a) -> Backwards * f a -> Backwards * f b Source #

Invariant m => Invariant (WriterT w m) Source #

from the transformers package

Methods

invmap :: (a -> b) -> (b -> a) -> WriterT w m a -> WriterT w m b Source #

Invariant m => Invariant (WriterT w m) Source #

from the transformers package

Methods

invmap :: (a -> b) -> (b -> a) -> WriterT w m a -> WriterT w m b Source #

Invariant m => Invariant (StateT s m) Source #

from the transformers package

Methods

invmap :: (a -> b) -> (b -> a) -> StateT s m a -> StateT s m b Source #

Invariant m => Invariant (StateT s m) Source #

from the transformers package

Methods

invmap :: (a -> b) -> (b -> a) -> StateT s m a -> StateT s m b Source #

Invariant m => Invariant (ErrorT e m) Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> ErrorT e m a -> ErrorT e m b Source #

Invariant m => Invariant (ExceptT e m) Source #

from the transformers package

Methods

invmap :: (a -> b) -> (b -> a) -> ExceptT e m a -> ExceptT e m b Source #

Invariant (Constant * a) Source #

from the transformers package

Methods

invmap :: (a -> b) -> (b -> a) -> Constant * a a -> Constant * a b Source #

Contravariant f => Invariant (WrappedContravariant * f) Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> WrappedContravariant * f a -> WrappedContravariant * f b Source #

Functor f => Invariant (WrappedFunctor * f) Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> WrappedFunctor * f a -> WrappedFunctor * f b Source #

Invariant f => Invariant (M1 i t f) Source #

from GHC.Generics

Methods

invmap :: (a -> b) -> (b -> a) -> M1 i t f a -> M1 i t f b Source #

Invariant ((,,,) a b c) Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> (a, b, c, a) -> (a, b, c, b) Source #

(Invariant f, Invariant g) => Invariant (Sum * f g) Source #

from Data.Functor.Sum

Methods

invmap :: (a -> b) -> (b -> a) -> Sum * f g a -> Sum * f g b Source #

(Invariant f, Invariant g) => Invariant (Product * f g) Source #

from Data.Functor.Product

Methods

invmap :: (a -> b) -> (b -> a) -> Product * f g a -> Product * f g b Source #

Invariant2 q => Invariant (Ran p q a) Source #

from the profunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> Ran p q a a -> Ran p q a b Source #

Invariant2 p => Invariant (Procompose p q a) Source #

from the profunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> Procompose p q a a -> Procompose p q a b Source #

Invariant2 p => Invariant (Rift p q a) Source #

from the profunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> Rift p q a a -> Rift p q a b Source #

Invariant m => Invariant (ReaderT * r m) Source #

from the transformers package

Methods

invmap :: (a -> b) -> (b -> a) -> ReaderT * r m a -> ReaderT * r m b Source #

Invariant (ContT k r m) Source #

from the transformers package

Methods

invmap :: (a -> b) -> (b -> a) -> ContT k r m a -> ContT k r m b Source #

Invariant ((,,,,) a b c d) Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> (a, b, c, d, a) -> (a, b, c, d, b) Source #

(Invariant f, Invariant g) => Invariant (Compose * * f g) Source #

from Data.Functor.Compose

Methods

invmap :: (a -> b) -> (b -> a) -> Compose * * f g a -> Compose * * f g b Source #

Bifunctor p => Invariant (WrappedBifunctor * * p a) Source #

from the bifunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> WrappedBifunctor * * p a a -> WrappedBifunctor * * p a b Source #

Invariant g => Invariant (Joker k * g a) Source #

from the bifunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> Joker k * g a a -> Joker k * g a b Source #

Invariant2 p => Invariant (Flip * * p a) Source #

from the bifunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> Flip * * p a a -> Flip * * p a b Source #

Invariant (Clown * k1 f a) Source #

from the bifunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> Clown * k1 f a a -> Clown * k1 f a b Source #

Invariant m => Invariant (RWST r w s m) Source #

from the transformers package

Methods

invmap :: (a -> b) -> (b -> a) -> RWST r w s m a -> RWST r w s m b Source #

Invariant m => Invariant (RWST r w s m) Source #

from the transformers package

Methods

invmap :: (a -> b) -> (b -> a) -> RWST r w s m a -> RWST r w s m b Source #

Profunctor p => Invariant (WrappedProfunctor * * p a) Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> WrappedProfunctor * * p a a -> WrappedProfunctor * * p a b Source #

(Invariant f, Invariant2 p) => Invariant (Tannen * * * f p a) Source #

from the bifunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> Tannen * * * f p a a -> Tannen * * * f p a b Source #

(Invariant2 p, Invariant g) => Invariant (Biff * k1 * * p f g a) Source #

from the bifunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> Biff * k1 * * p f g a a -> Biff * k1 * * p f g a b Source #

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

Monad m => Monad (WrappedFunctor * m) Source # 
Functor f => Functor (WrappedFunctor * f) Source # 

Methods

fmap :: (a -> b) -> WrappedFunctor * f a -> WrappedFunctor * f b #

(<$) :: a -> WrappedFunctor * f b -> WrappedFunctor * f a #

Applicative f => Applicative (WrappedFunctor * f) Source # 
Foldable f => Foldable (WrappedFunctor * f) Source # 

Methods

fold :: Monoid m => WrappedFunctor * f m -> m #

foldMap :: Monoid m => (a -> m) -> WrappedFunctor * f a -> m #

foldr :: (a -> b -> b) -> b -> WrappedFunctor * f a -> b #

foldr' :: (a -> b -> b) -> b -> WrappedFunctor * f a -> b #

foldl :: (b -> a -> b) -> b -> WrappedFunctor * f a -> b #

foldl' :: (b -> a -> b) -> b -> WrappedFunctor * f a -> b #

foldr1 :: (a -> a -> a) -> WrappedFunctor * f a -> a #

foldl1 :: (a -> a -> a) -> WrappedFunctor * f a -> a #

toList :: WrappedFunctor * f a -> [a] #

null :: WrappedFunctor * f a -> Bool #

length :: WrappedFunctor * f a -> Int #

elem :: Eq a => a -> WrappedFunctor * f a -> Bool #

maximum :: Ord a => WrappedFunctor * f a -> a #

minimum :: Ord a => WrappedFunctor * f a -> a #

sum :: Num a => WrappedFunctor * f a -> a #

product :: Num a => WrappedFunctor * f a -> a #

Traversable f => Traversable (WrappedFunctor * f) Source # 

Methods

traverse :: Applicative f => (a -> f b) -> WrappedFunctor * f a -> f (WrappedFunctor * f b) #

sequenceA :: Applicative f => WrappedFunctor * f (f a) -> f (WrappedFunctor * f a) #

mapM :: Monad m => (a -> m b) -> WrappedFunctor * f a -> m (WrappedFunctor * f b) #

sequence :: Monad m => WrappedFunctor * f (m a) -> m (WrappedFunctor * f a) #

Alternative f => Alternative (WrappedFunctor * f) Source # 
MonadPlus m => MonadPlus (WrappedFunctor * m) Source # 
Functor f => Invariant (WrappedFunctor * f) Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> WrappedFunctor * f a -> WrappedFunctor * f b Source #

Eq (f a) => Eq (WrappedFunctor k f a) Source # 

Methods

(==) :: WrappedFunctor k f a -> WrappedFunctor k f a -> Bool #

(/=) :: WrappedFunctor k f a -> WrappedFunctor k f a -> Bool #

Ord (f a) => Ord (WrappedFunctor k f a) Source # 

Methods

compare :: WrappedFunctor k f a -> WrappedFunctor k f a -> Ordering #

(<) :: WrappedFunctor k f a -> WrappedFunctor k f a -> Bool #

(<=) :: WrappedFunctor k f a -> WrappedFunctor k f a -> Bool #

(>) :: WrappedFunctor k f a -> WrappedFunctor k f a -> Bool #

(>=) :: WrappedFunctor k f a -> WrappedFunctor k f a -> Bool #

max :: WrappedFunctor k f a -> WrappedFunctor k f a -> WrappedFunctor k f a #

min :: WrappedFunctor k f a -> WrappedFunctor k f a -> WrappedFunctor k f a #

Read (f a) => Read (WrappedFunctor k f a) Source # 
Show (f a) => Show (WrappedFunctor k f a) Source # 

Methods

showsPrec :: Int -> WrappedFunctor k f a -> ShowS #

show :: WrappedFunctor k f a -> String #

showList :: [WrappedFunctor k f a] -> ShowS #

invmapContravariant :: Contravariant f => (a -> b) -> (b -> a) -> f a -> f b Source #

Every Contravariant functor is also an Invariant functor.

newtype WrappedContravariant f a Source #

Wrap a Contravariant functor to be used as a member of Invariant.

Constructors

WrapContravariant 

Fields

Instances

Divisible f => Divisible (WrappedContravariant * f) Source # 
Decidable f => Decidable (WrappedContravariant * f) Source # 

Methods

lose :: (a -> Void) -> WrappedContravariant * f a #

choose :: (a -> Either b c) -> WrappedContravariant * f b -> WrappedContravariant * f c -> WrappedContravariant * f a #

Contravariant f => Contravariant (WrappedContravariant * f) Source # 
Contravariant f => Invariant (WrappedContravariant * f) Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> WrappedContravariant * f a -> WrappedContravariant * f b Source #

Eq (f a) => Eq (WrappedContravariant k f a) Source # 
Ord (f a) => Ord (WrappedContravariant k f a) Source # 
Read (f a) => Read (WrappedContravariant k f a) Source # 
Show (f a) => Show (WrappedContravariant k f a) 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')

Minimal complete definition

invmap2

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> f a b -> f c d Source #

Instances

Invariant2 (->) Source # 

Methods

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

Invariant2 Either Source # 

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Either a b -> Either c d Source #

Invariant2 (,) Source # 

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> (a, b) -> (c, d) Source #

Invariant2 Arg Source #

from Data.Semigroup

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Arg a b -> Arg c d Source #

Invariant2 Op Source #

from the contravariant package

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Op a b -> Op c d Source #

Invariant2 (K1 i) Source #

from GHC.Generics

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> K1 i a b -> K1 i c d Source #

Invariant2 ((,,) a) Source # 

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> (a, a, b) -> (a, c, d) Source #

Arrow arr => Invariant2 (WrappedArrow arr) Source #

from Control.Applicative

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedArrow arr a b -> WrappedArrow arr c d Source #

Monad m => Invariant2 (Kleisli m) Source #

from Control.Arrow

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Kleisli m a b -> Kleisli m c d Source #

Invariant2 (Const *) Source #

from Control.Applicative

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Const * a b -> Const * c d Source #

Comonad w => Invariant2 (Cokleisli w) Source #

from the comonad package

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Cokleisli w a b -> Cokleisli w c d Source #

Invariant2 p => Invariant2 (Codensity p) Source #

from the profunctors package

Methods

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

Invariant2 p => Invariant2 (CofreeMapping p) Source #

from the profunctors package

Methods

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

Invariant2 (FreeMapping p) Source #

from the profunctors package

Methods

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

Invariant2 p => Invariant2 (CofreeTraversing p) Source #

from the profunctors package

Methods

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

Invariant2 (FreeTraversing p) Source #

from the profunctors package

Methods

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

Invariant2 p => Invariant2 (TambaraSum p) Source #

from the profunctors package

Methods

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

Invariant2 (PastroSum p) Source #

from the profunctors package

Methods

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

Invariant2 (CotambaraSum p) Source #

from the profunctors package

Methods

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

Invariant2 (CopastroSum p) Source #

from the profunctors package

Methods

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

Invariant2 p => Invariant2 (Closure p) Source #

from the profunctors package

Methods

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

Invariant2 (Environment p) Source #

from the profunctors package

Methods

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

Invariant2 p => Invariant2 (Tambara p) Source #

from the profunctors package

Methods

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

Invariant2 (Pastro p) Source #

from the profunctors package

Methods

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

Invariant2 (Cotambara p) Source #

from the profunctors package

Methods

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

Invariant f => Invariant2 (Star f) Source #

from the profunctors package

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Star f a b -> Star f c d Source #

Invariant f => Invariant2 (Costar f) Source #

from the profunctors package

Methods

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

Arrow arr => Invariant2 (WrappedArrow arr) Source #

from the profunctors package

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedArrow arr a b -> WrappedArrow arr c d Source #

Invariant2 (Forget r) Source #

from the profunctors package

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Forget r a b -> Forget r c d Source #

Invariant2 (Tagged *) Source #

from the tagged package

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Tagged * a b -> Tagged * c d Source #

Invariant2 (Constant *) Source #

from the transformers package

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Constant * a b -> Constant * c d Source #

Invariant2 ((,,,) a b) Source # 

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> (a, b, a, b) -> (a, b, c, d) Source #

(Invariant2 p, Invariant2 q) => Invariant2 (Ran p q) Source #

from the profunctors package

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Ran p q a b -> Ran p q c d Source #

(Invariant2 p, Invariant2 q) => Invariant2 (Procompose p q) Source #

from the profunctors package

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Procompose p q a b -> Procompose p q c d Source #

(Invariant2 p, Invariant2 q) => Invariant2 (Rift p q) Source #

from the profunctors package

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Rift p q a b -> Rift p q c d Source #

(Invariant f, Invariant2 p) => Invariant2 (Cayley f p) Source #

from the profunctors package

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Cayley f p a b -> Cayley f p c d Source #

Invariant2 ((,,,,) a b c) Source # 

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> (a, b, c, a, b) -> (a, b, c, c, d) Source #

Bifunctor p => Invariant2 (WrappedBifunctor * * p) Source #

from the bifunctors package

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedBifunctor * * p a b -> WrappedBifunctor * * p c d Source #

Invariant g => Invariant2 (Joker * * g) Source #

from the bifunctors package

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Joker * * g a b -> Joker * * g c d Source #

Invariant2 p => Invariant2 (Flip * * p) Source #

from the bifunctors package

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Flip * * p a b -> Flip * * p c d Source #

Invariant f => Invariant2 (Clown * * f) Source #

from the bifunctors package

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Clown * * f a b -> Clown * * f c d Source #

Profunctor p => Invariant2 (WrappedProfunctor * * p) Source # 

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedProfunctor * * p a b -> WrappedProfunctor * * p c d Source #

(Invariant2 f, Invariant2 g) => Invariant2 (Product * * f g) Source #

from the bifunctors package

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Product * * f g a b -> Product * * f g c d Source #

(Invariant2 p, Invariant2 q) => Invariant2 (Sum * * p q) Source #

from the bifunctors package

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Sum * * p q a b -> Sum * * p q c d Source #

(Invariant f, Invariant2 p) => Invariant2 (Tannen * * * f p) Source #

from the bifunctors package

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Tannen * * * f p a b -> Tannen * * * f p c d Source #

(Invariant2 p, Invariant f, Invariant g) => Invariant2 (Biff * * * * p f g) Source #

from the bifunctors package

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Biff * * * * p f g a b -> Biff * * * * p f g c d Source #

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 k k1 p a b :: forall k k1. (k -> k1 -> *) -> k -> k1 -> * #

Make a Functor over the second argument of a Bifunctor.

Constructors

WrapBifunctor 

Fields

Instances

Bifunctor p => Bifunctor (WrappedBifunctor * * p) 

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 #

Biapplicative p => Biapplicative (WrappedBifunctor * * p) 

Methods

bipure :: a -> b -> WrappedBifunctor * * p a b #

(<<*>>) :: WrappedBifunctor * * p (a -> b) (c -> d) -> WrappedBifunctor * * p a c -> WrappedBifunctor * * p b d #

(*>>) :: WrappedBifunctor * * p a b -> WrappedBifunctor * * p c d -> WrappedBifunctor * * p c d #

(<<*) :: WrappedBifunctor * * p a b -> WrappedBifunctor * * p c d -> WrappedBifunctor * * p a b #

Bitraversable p => Bitraversable (WrappedBifunctor * * p) 

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> WrappedBifunctor * * p a b -> f (WrappedBifunctor * * p c d) #

Bifoldable p => Bifoldable (WrappedBifunctor * * p) 

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 => Invariant2 (WrappedBifunctor * * p) Source #

from the bifunctors package

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedBifunctor * * p a b -> WrappedBifunctor * * p c d Source #

Bifunctor p => Functor (WrappedBifunctor * * p a) 

Methods

fmap :: (a -> b) -> WrappedBifunctor * * p a a -> WrappedBifunctor * * p a b #

(<$) :: a -> WrappedBifunctor * * p a b -> WrappedBifunctor * * p a a #

Bifoldable p => Foldable (WrappedBifunctor * * p a) 

Methods

fold :: Monoid m => WrappedBifunctor * * p a m -> m #

foldMap :: Monoid m => (a -> m) -> WrappedBifunctor * * p a a -> m #

foldr :: (a -> b -> b) -> b -> WrappedBifunctor * * p a a -> b #

foldr' :: (a -> b -> b) -> b -> WrappedBifunctor * * p a a -> b #

foldl :: (b -> a -> b) -> b -> WrappedBifunctor * * p a a -> b #

foldl' :: (b -> a -> b) -> b -> WrappedBifunctor * * p a a -> b #

foldr1 :: (a -> a -> a) -> WrappedBifunctor * * p a a -> a #

foldl1 :: (a -> a -> a) -> WrappedBifunctor * * p a a -> a #

toList :: WrappedBifunctor * * p a a -> [a] #

null :: WrappedBifunctor * * p a a -> Bool #

length :: WrappedBifunctor * * p a a -> Int #

elem :: Eq a => a -> WrappedBifunctor * * p a a -> Bool #

maximum :: Ord a => WrappedBifunctor * * p a a -> a #

minimum :: Ord a => WrappedBifunctor * * p a a -> a #

sum :: Num a => WrappedBifunctor * * p a a -> a #

product :: Num a => WrappedBifunctor * * p a a -> a #

Bitraversable p => Traversable (WrappedBifunctor * * p a) 

Methods

traverse :: Applicative f => (a -> f b) -> WrappedBifunctor * * p a a -> f (WrappedBifunctor * * p a b) #

sequenceA :: Applicative f => WrappedBifunctor * * p a (f a) -> f (WrappedBifunctor * * p a a) #

mapM :: Monad m => (a -> m b) -> WrappedBifunctor * * p a a -> m (WrappedBifunctor * * p a b) #

sequence :: Monad m => WrappedBifunctor * * p a (m a) -> m (WrappedBifunctor * * p a a) #

Generic1 (WrappedBifunctor k * p a) 

Associated Types

type Rep1 (WrappedBifunctor k * p a :: * -> *) :: * -> * #

Methods

from1 :: WrappedBifunctor k * p a a -> Rep1 (WrappedBifunctor k * p a) a #

to1 :: Rep1 (WrappedBifunctor k * p a) a -> WrappedBifunctor k * p a a #

Bifunctor p => Invariant (WrappedBifunctor * * p a) Source #

from the bifunctors package

Methods

invmap :: (a -> b) -> (b -> a) -> WrappedBifunctor * * p a a -> WrappedBifunctor * * p a b Source #

Eq (p a b) => Eq (WrappedBifunctor k k1 p a b) 

Methods

(==) :: WrappedBifunctor k k1 p a b -> WrappedBifunctor k k1 p a b -> Bool #

(/=) :: WrappedBifunctor k k1 p a b -> WrappedBifunctor k k1 p a b -> Bool #

Ord (p a b) => Ord (WrappedBifunctor k k1 p a b) 

Methods

compare :: WrappedBifunctor k k1 p a b -> WrappedBifunctor k k1 p a b -> Ordering #

(<) :: WrappedBifunctor k k1 p a b -> WrappedBifunctor k k1 p a b -> Bool #

(<=) :: WrappedBifunctor k k1 p a b -> WrappedBifunctor k k1 p a b -> Bool #

(>) :: WrappedBifunctor k k1 p a b -> WrappedBifunctor k k1 p a b -> Bool #

(>=) :: WrappedBifunctor k k1 p a b -> WrappedBifunctor k k1 p a b -> Bool #

max :: WrappedBifunctor k k1 p a b -> WrappedBifunctor k k1 p a b -> WrappedBifunctor k k1 p a b #

min :: WrappedBifunctor k k1 p a b -> WrappedBifunctor k k1 p a b -> WrappedBifunctor k k1 p a b #

Read (p a b) => Read (WrappedBifunctor k k1 p a b) 
Show (p a b) => Show (WrappedBifunctor k k1 p a b) 

Methods

showsPrec :: Int -> WrappedBifunctor k k1 p a b -> ShowS #

show :: WrappedBifunctor k k1 p a b -> String #

showList :: [WrappedBifunctor k k1 p a b] -> ShowS #

Generic (WrappedBifunctor k k1 p a b) 

Associated Types

type Rep (WrappedBifunctor k k1 p a b) :: * -> * #

Methods

from :: WrappedBifunctor k k1 p a b -> Rep (WrappedBifunctor k k1 p a b) x #

to :: Rep (WrappedBifunctor k k1 p a b) x -> WrappedBifunctor k k1 p a b #

type Rep1 (WrappedBifunctor k * p a) 
type Rep1 (WrappedBifunctor k * p a) = D1 (MetaData "WrappedBifunctor" "Data.Bifunctor.Wrapped" "bifunctors-5.4-21nQkpnOsL4LQMbVs5dXHA" True) (C1 (MetaCons "WrapBifunctor" PrefixI True) (S1 (MetaSel (Just Symbol "unwrapBifunctor") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 (p a))))
type Rep (WrappedBifunctor k k1 p a b) 
type Rep (WrappedBifunctor k k1 p a b) = D1 (MetaData "WrappedBifunctor" "Data.Bifunctor.Wrapped" "bifunctors-5.4-21nQkpnOsL4LQMbVs5dXHA" True) (C1 (MetaCons "WrapBifunctor" PrefixI True) (S1 (MetaSel (Just Symbol "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

Category k p => Category k (WrappedProfunctor k k p) Source # 

Methods

id :: cat a a #

(.) :: cat b c -> cat a b -> cat a c #

ProfunctorFunctor (WrappedProfunctor * *) Source # 
ProfunctorMonad (WrappedProfunctor * *) Source # 
ProfunctorComonad (WrappedProfunctor * *) Source # 
Arrow p => Arrow (WrappedProfunctor * * p) Source # 

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

ArrowZero p => ArrowZero (WrappedProfunctor * * p) Source # 

Methods

zeroArrow :: WrappedProfunctor * * p b c #

ArrowPlus p => ArrowPlus (WrappedProfunctor * * p) Source # 

Methods

(<+>) :: WrappedProfunctor * * p b c -> WrappedProfunctor * * p b c -> WrappedProfunctor * * p b c #

ArrowChoice p => ArrowChoice (WrappedProfunctor * * p) Source # 

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 # 

Methods

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

Mapping p => Mapping (WrappedProfunctor * * p) Source # 

Methods

map' :: Functor f => WrappedProfunctor * * p a b -> WrappedProfunctor * * p (f a) (f b) #

Traversing p => Traversing (WrappedProfunctor * * p) Source # 

Methods

traverse' :: Traversable f => WrappedProfunctor * * p a b -> WrappedProfunctor * * p (f a) (f b) #

wander :: (forall f. Applicative f => (a -> f b) -> s -> f t) -> WrappedProfunctor * * p a b -> WrappedProfunctor * * p s t #

Choice p => Choice (WrappedProfunctor * * p) Source # 

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 # 

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 # 

Methods

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

Strong p => Strong (WrappedProfunctor * * p) Source # 

Methods

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

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

Costrong p => Costrong (WrappedProfunctor * * p) Source # 

Methods

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

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

Profunctor p => Profunctor (WrappedProfunctor * * p) Source # 

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 #

(#.) :: Coercible * c b => (b -> c) -> WrappedProfunctor * * p a b -> WrappedProfunctor * * p a c #

(.#) :: Coercible * b a => WrappedProfunctor * * p b c -> (a -> b) -> WrappedProfunctor * * p a c #

Profunctor p => Invariant2 (WrappedProfunctor * * p) Source # 

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedProfunctor * * p a b -> WrappedProfunctor * * p c d Source #

Profunctor p => Invariant (WrappedProfunctor * * p a) Source # 

Methods

invmap :: (a -> b) -> (b -> a) -> WrappedProfunctor * * p a a -> WrappedProfunctor * * p a b Source #

Eq (p a b) => Eq (WrappedProfunctor k k1 p a b) Source # 

Methods

(==) :: WrappedProfunctor k k1 p a b -> WrappedProfunctor k k1 p a b -> Bool #

(/=) :: WrappedProfunctor k k1 p a b -> WrappedProfunctor k k1 p a b -> Bool #

Ord (p a b) => Ord (WrappedProfunctor k k1 p a b) Source # 

Methods

compare :: WrappedProfunctor k k1 p a b -> WrappedProfunctor k k1 p a b -> Ordering #

(<) :: WrappedProfunctor k k1 p a b -> WrappedProfunctor k k1 p a b -> Bool #

(<=) :: WrappedProfunctor k k1 p a b -> WrappedProfunctor k k1 p a b -> Bool #

(>) :: WrappedProfunctor k k1 p a b -> WrappedProfunctor k k1 p a b -> Bool #

(>=) :: WrappedProfunctor k k1 p a b -> WrappedProfunctor k k1 p a b -> Bool #

max :: WrappedProfunctor k k1 p a b -> WrappedProfunctor k k1 p a b -> WrappedProfunctor k k1 p a b #

min :: WrappedProfunctor k k1 p a b -> WrappedProfunctor k k1 p a b -> WrappedProfunctor k k1 p a b #

Read (p a b) => Read (WrappedProfunctor k k1 p a b) Source # 
Show (p a b) => Show (WrappedProfunctor k k1 p a b) Source # 

Methods

showsPrec :: Int -> WrappedProfunctor k k1 p a b -> ShowS #

show :: WrappedProfunctor k k1 p a b -> String #

showList :: [WrappedProfunctor k k1 p a b] -> ShowS #