Data.Functor.Invariant

invariant-0.6.4: Haskell98 invariant functors

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

- `Invariant`
  - `GHC.Generics`
- `Invariant2`

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

- class Invariant (f :: Type -> Type) 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 :: k -> Type) (a :: k) = 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 :: k -> Type) (a :: k) = WrapContravariant {
  - unwrapContravariant :: f a
  }
- newtype InvariantProfunctor (p :: k -> k -> Type) (a :: k) = InvariantProfunctor (p a a)
- newtype InvariantArrow (c :: k -> k -> Type) (a :: k) = InvariantArrow (c a a)
- class Invariant2 (f :: Type -> Type -> Type) 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 :: k -> k1 -> Type) (a :: k) (b :: k1) = WrapProfunctor {
  - unwrapProfunctor :: p a b
  }

# `Invariant`

class Invariant (f :: Type -> Type) where #

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

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

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

#### Instances

Instances details

Invariant SettableStateVar # | from the `StateVar` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> SettableStateVar a -> SettableStateVar b #
Invariant StateVar # | from the `StateVar` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> StateVar a -> StateVar b #
Invariant Complex # | from Data.Complex
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Complex a -> Complex b #
Invariant Comparison # | from the `contravariant` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Comparison a -> Comparison b #
Invariant Equivalence # | from the `contravariant` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Equivalence a -> Equivalence b #
Invariant Predicate # | from the `contravariant` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Predicate a -> Predicate b #
Invariant First # | from Data.Semigroup
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> First a -> First b #
Invariant Last # | from Data.Semigroup
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Last a -> Last b #
Invariant Max # | from Data.Semigroup
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Max a -> Max b #
Invariant Min # | from Data.Semigroup
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Min a -> Min b #
Invariant ArgDescr # | from System.Console.GetOpt
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> ArgDescr a -> ArgDescr b #
Invariant ArgOrder # | from System.Console.GetOpt
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> ArgOrder a -> ArgOrder b #
Invariant OptDescr # | from System.Console.GetOpt
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> OptDescr a -> OptDescr b #
Invariant IntMap # | from the `containers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> IntMap a -> IntMap b #
Invariant Seq # | from the `containers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Seq a -> Seq b #
Invariant ViewL # | from the `containers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> ViewL a -> ViewL b #
Invariant ViewR # | from the `containers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> ViewR a -> ViewR b #
Invariant Tree # | from the `containers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Tree a -> Tree b #
Invariant NonEmpty # | from Data.List.NonEmpty
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> NonEmpty a -> NonEmpty b #
Invariant STM # | from the `stm` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> STM a -> STM b #
Invariant Handler # | from Control.Exception
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Handler a -> Handler b #
Invariant Identity # | from Data.Functor.Identity
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Identity a -> Identity b #
Invariant First # | from Data.Monoid
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> First a -> First b #
Invariant Last # | from Data.Monoid
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Last a -> Last b #
Invariant Dual # | from Data.Monoid
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Dual a -> Dual b #
Invariant Endo # | from Data.Monoid
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Endo a -> Endo b #
Invariant Product # | from Data.Monoid
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Product a -> Product b #
Invariant Sum # | from Data.Monoid
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Sum a -> Sum b #
Invariant ZipList # | from Control.Applicative
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> ZipList a -> ZipList b #
Invariant Par1 # | from GHC.Generics
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Par1 a -> Par1 b #
Invariant ReadP # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> ReadP a -> ReadP b #
Invariant ReadPrec # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> ReadPrec a -> ReadPrec b #
Invariant IO # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> IO a -> IO b #
Invariant Maybe # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Maybe a -> Maybe b #
Invariant [] # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> [a] -> [b] #
Monad m => Invariant (WrappedMonad m) # | from Control.Applicative
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> WrappedMonad m a -> WrappedMonad m b #
Invariant (Op a) # | from the `contravariant` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Op a a0 -> Op a b #
Invariant (Arg a) # | from Data.Semigroup
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Arg a a0 -> Arg a b #
Invariant (Map k) # | from the `containers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Map k a -> Map k b #
Invariant (Array i) # | from the `array` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Array i a -> Array i b #
Arrow a => Invariant (ArrowMonad a) # | from Control.Arrow
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> ArrowMonad a a0 -> ArrowMonad a b #
Invariant (ST s) # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> ST s a -> ST s b #
Invariant (Either a) # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Either a a0 -> Either a b #
Invariant (Proxy :: Type -> Type) # | from Data.Proxy
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Proxy a -> Proxy b #
Invariant (U1 :: Type -> Type) # | from GHC.Generics
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> U1 a -> U1 b #
Invariant (UAddr :: Type -> Type) # | from GHC.Generics
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> UAddr a -> UAddr b #
Invariant (UChar :: Type -> Type) # | from GHC.Generics
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> UChar a -> UChar b #
Invariant (UDouble :: Type -> Type) # | from GHC.Generics
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> UDouble a -> UDouble b #
Invariant (UFloat :: Type -> Type) # | from GHC.Generics
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> UFloat a -> UFloat b #
Invariant (UInt :: Type -> Type) # | from GHC.Generics
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> UInt a -> UInt b #
Invariant (UWord :: Type -> Type) # | from GHC.Generics
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> UWord a -> UWord b #
Invariant (V1 :: Type -> Type) # | from GHC.Generics
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> V1 a -> V1 b #
Invariant (ST s) # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> ST s a -> ST s b #
Invariant f => Invariant (Lift f) # | from the `transformers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Lift f a -> Lift f b #
Invariant m => Invariant (MaybeT m) # | from the `transformers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> MaybeT m a -> MaybeT m b #
Invariant (HashMap k) # | from the `unordered-containers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> HashMap k a -> HashMap k b #
Invariant ((,) a) # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> (a, a0) -> (a, b) #
Arrow arr => Invariant (WrappedArrow arr a) # | from Control.Applicative
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> WrappedArrow arr a a0 -> WrappedArrow arr a b #
Invariant2 p => Invariant (Fix p) # | from the `bifunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Fix p a -> Fix p b #
Invariant2 p => Invariant (Join p) # | from the `bifunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Join p a -> Join p b #
(Invariant f, Invariant g) => Invariant (Compose f g) # | from the `contravariant` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Compose f g a -> Compose f g b #
(Invariant f, Invariant g) => Invariant (ComposeCF f g) # | from the `contravariant` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> ComposeCF f g a -> ComposeCF f g b #
(Invariant f, Invariant g) => Invariant (ComposeFC f g) # | from the `contravariant` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> ComposeFC f g a -> ComposeFC f g b #
Invariant m => Invariant (Kleisli m a) # | from Control.Arrow
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Kleisli m a a0 -> Kleisli m a b #
Invariant (Const a :: Type -> Type) # | from Control.Applicative
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Const a a0 -> Const a b #
Invariant f => Invariant (Alt f) # | from Data.Monoid
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Alt f a -> Alt f b #
Invariant f => Invariant (Rec1 f) # | from GHC.Generics
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Rec1 f a -> Rec1 f b #
Arrow c => Invariant (InvariantArrow c) # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> InvariantArrow c a -> InvariantArrow c b #
Profunctor p => Invariant (InvariantProfunctor p) # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> InvariantProfunctor p a -> InvariantProfunctor p b #
Contravariant f => Invariant (WrappedContravariant f) # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> WrappedContravariant f a -> WrappedContravariant f b #
Functor f => Invariant (WrappedFunctor f) # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> WrappedFunctor f a -> WrappedFunctor f b #
Invariant (CopastroSum p a) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> CopastroSum p a a0 -> CopastroSum p a b #
Invariant (CotambaraSum p a) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> CotambaraSum p a a0 -> CotambaraSum p a b #
Invariant (PastroSum p a) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> PastroSum p a a0 -> PastroSum p a b #
Invariant2 p => Invariant (TambaraSum p a) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> TambaraSum p a a0 -> TambaraSum p a b #
Invariant2 p => Invariant (Closure p a) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Closure p a a0 -> Closure p a b #
Invariant (Environment p a) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Environment p a a0 -> Environment p a b #
Invariant (FreeMapping p a) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> FreeMapping p a a0 -> FreeMapping p a b #
Invariant2 p => Invariant (Coprep p) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Coprep p a -> Coprep p b #
Invariant2 p => Invariant (Prep p) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Prep p a -> Prep p b #
Invariant (Copastro p a) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Copastro p a a0 -> Copastro p a b #
Invariant (Cotambara p a) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Cotambara p a a0 -> Cotambara p a b #
Invariant (Pastro p a) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Pastro p a a0 -> Pastro p a b #
Invariant2 p => Invariant (Tambara p a) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Tambara p a a0 -> Tambara p a b #
Invariant (FreeTraversing p a) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> FreeTraversing p a a0 -> FreeTraversing p a b #
Invariant (Coyoneda p a) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Coyoneda p a a0 -> Coyoneda p a b #
Invariant (Yoneda p a) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Yoneda p a a0 -> Yoneda p a b #
Invariant (Tagged s) # | from the `tagged` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Tagged s a -> Tagged s b #
Invariant f => Invariant (Backwards f) # | from the `transformers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Backwards f a -> Backwards f b #
Invariant m => Invariant (ExceptT e m) # | from the `transformers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> ExceptT e m a -> ExceptT e m b #
Invariant m => Invariant (IdentityT m) # | from the `transformers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> IdentityT m a -> IdentityT m b #
Invariant m => Invariant (ReaderT r m) # | from the `transformers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> ReaderT r m a -> ReaderT r m b #
Invariant m => Invariant (StateT s m) # | from the `transformers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> StateT s m a -> StateT s m b #
Invariant m => Invariant (StateT s m) # | from the `transformers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> StateT s m a -> StateT s m b #
Invariant m => Invariant (WriterT w m) # | from the `transformers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> WriterT w m a -> WriterT w m b #
Invariant m => Invariant (WriterT w m) # | from the `transformers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> WriterT w m a -> WriterT w m b #
Invariant (Constant a :: Type -> Type) # | from the `transformers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Constant a a0 -> Constant a b #
Invariant f => Invariant (Reverse f) # | from the `transformers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Reverse f a -> Reverse f b #
Invariant ((,,) a b) # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b0) -> (b0 -> a0) -> (a, b, a0) -> (a, b, b0) #
(Invariant f, Invariant g) => Invariant (Product f g) # | from Data.Functor.Product
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Product f g a -> Product f g b #
(Invariant f, Invariant g) => Invariant (Sum f g) # | from Data.Functor.Sum
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Sum f g a -> Sum f g b #
Invariant (Cokleisli w a) # | from the `comonad` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Cokleisli w a a0 -> Cokleisli w a b #
(Invariant l, Invariant r) => Invariant (l :*: r) # | from GHC.Generics
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> (l :*: r) a -> (l :*: r) b #
(Invariant l, Invariant r) => Invariant (l :+: r) # | from GHC.Generics
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> (l :+: r) a -> (l :+: r) b #
Invariant (K1 i c :: Type -> Type) # | from GHC.Generics
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> K1 i c a -> K1 i c b #
Invariant (Costar f a) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Costar f a a0 -> Costar f a b #
Invariant (Forget r a :: Type -> Type) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Forget r a a0 -> Forget r a b #
Invariant f => Invariant (Star f a) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Star f a a0 -> Star f a b #
Invariant (ContT r m) # | from the `transformers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> ContT r m a -> ContT r m b #
Invariant ((,,,) a b c) # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b0) -> (b0 -> a0) -> (a, b, c, a0) -> (a, b, c, b0) #
Invariant ((->) a) # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> (a -> a0) -> a -> b #
(Invariant f, Invariant g) => Invariant (Compose f g) # | from Data.Functor.Compose
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> Compose f g a -> Compose f g b #
Invariant (Clown f a :: Type -> Type) # | from the `bifunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Clown f a a0 -> Clown f a b #
Invariant2 p => Invariant (Flip p a) # | from the `bifunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Flip p a a0 -> Flip p a b #
Invariant g => Invariant (Joker g a) # | from the `bifunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Joker g a a0 -> Joker g a b #
Bifunctor p => Invariant (WrappedBifunctor p a) # | from the `bifunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> WrappedBifunctor p a a0 -> WrappedBifunctor p a b #
(Invariant f, Invariant g) => Invariant (f :.: g) # | from GHC.Generics
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> (f :.: g) a -> (f :.: g) b #
Invariant f => Invariant (M1 i t f) # | from GHC.Generics
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> M1 i t f a -> M1 i t f b #
Profunctor p => Invariant (WrappedProfunctor p a) # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> WrappedProfunctor p a a0 -> WrappedProfunctor p a b #
Invariant2 p => Invariant (Codensity p a) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Codensity p a a0 -> Codensity p a b #
Arrow arr => Invariant (WrappedArrow arr a) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> WrappedArrow arr a a0 -> WrappedArrow arr a b #
Invariant m => Invariant (RWST r w s m) # | from the `transformers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> RWST r w s m a -> RWST r w s m b #
Invariant m => Invariant (RWST r w s m) # | from the `transformers` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> RWST r w s m a -> RWST r w s m b #
Invariant ((,,,,) a b c d) # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b0) -> (b0 -> a0) -> (a, b, c, d, a0) -> (a, b, c, d, b0) #
(Invariant f, Invariant2 p) => Invariant (Tannen f p a) # | from the `bifunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Tannen f p a a0 -> Tannen f p a b #
Invariant2 p => Invariant (Procompose p q a) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Procompose p q a a0 -> Procompose p q a b #
Invariant2 p => Invariant (Rift p q a) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Rift p q a a0 -> Rift p q a b #
Invariant2 q => Invariant (Ran p q a) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Ran p q a a0 -> Ran p q a b #
(Invariant2 p, Invariant g) => Invariant (Biff p f g a) # | from the `bifunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> Biff p f g a a0 -> Biff p f g a b #

invmapFunctor :: Functor f => (a -> b) -> (b -> a) -> f a -> f b #

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 #

A generic implementation of `invmap`.

newtype WrappedFunctor (f :: k -> Type) (a :: k) #

Wrap a `Functor` to be used as a member of `Invariant`.

Constructors

WrapFunctor |
Fields unwrapFunctor :: f a

#### Instances

Instances details

Alternative f => Alternative (WrappedFunctor f) # |
Instance details Defined in Data.Functor.Invariant Methods empty :: WrappedFunctor f a # (<|>) :: WrappedFunctor f a -> WrappedFunctor f a -> WrappedFunctor f a # some :: WrappedFunctor f a -> WrappedFunctor f [a] # many :: WrappedFunctor f a -> WrappedFunctor f [a] #
Applicative f => Applicative (WrappedFunctor f) # |
Instance details Defined in Data.Functor.Invariant Methods pure :: a -> WrappedFunctor f a # (<*>) :: WrappedFunctor f (a -> b) -> WrappedFunctor f a -> WrappedFunctor f b # liftA2 :: (a -> b -> c) -> WrappedFunctor f a -> WrappedFunctor f b -> WrappedFunctor f c # (*>) :: WrappedFunctor f a -> WrappedFunctor f b -> WrappedFunctor f b # (<*) :: WrappedFunctor f a -> WrappedFunctor f b -> WrappedFunctor f a #
Functor f => Functor (WrappedFunctor f) # |
Instance details Defined in Data.Functor.Invariant Methods fmap :: (a -> b) -> WrappedFunctor f a -> WrappedFunctor f b # (<$) :: a -> WrappedFunctor f b -> WrappedFunctor f a #
Monad m => Monad (WrappedFunctor m) # |
Instance details Defined in Data.Functor.Invariant Methods (>>=) :: WrappedFunctor m a -> (a -> WrappedFunctor m b) -> WrappedFunctor m b # (>>) :: WrappedFunctor m a -> WrappedFunctor m b -> WrappedFunctor m b # return :: a -> WrappedFunctor m a #
MonadPlus m => MonadPlus (WrappedFunctor m) # |
Instance details Defined in Data.Functor.Invariant Methods mzero :: WrappedFunctor m a # mplus :: WrappedFunctor m a -> WrappedFunctor m a -> WrappedFunctor m a #
Foldable f => Foldable (WrappedFunctor f) # |
Instance details Defined in Data.Functor.Invariant Methods fold :: Monoid m => WrappedFunctor f m -> m # foldMap :: Monoid m => (a -> m) -> WrappedFunctor f a -> 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) # |
Instance details Defined in Data.Functor.Invariant Methods traverse :: Applicative f0 => (a -> f0 b) -> WrappedFunctor f a -> f0 (WrappedFunctor f b) # sequenceA :: Applicative f0 => WrappedFunctor f (f0 a) -> f0 (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) #
Functor f => Invariant (WrappedFunctor f) # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> WrappedFunctor f a -> WrappedFunctor f b #
Read (f a) => Read (WrappedFunctor f a) # |
Instance details Defined in Data.Functor.Invariant Methods readsPrec :: Int -> ReadS (WrappedFunctor f a) # readList :: ReadS [WrappedFunctor f a] # readPrec :: ReadPrec (WrappedFunctor f a) # readListPrec :: ReadPrec [WrappedFunctor f a] #
Show (f a) => Show (WrappedFunctor f a) # |
Instance details Defined in Data.Functor.Invariant Methods showsPrec :: Int -> WrappedFunctor f a -> ShowS # show :: WrappedFunctor f a -> String # showList :: [WrappedFunctor f a] -> ShowS #
Eq (f a) => Eq (WrappedFunctor f a) # |
Instance details Defined in Data.Functor.Invariant Methods (==) :: WrappedFunctor f a -> WrappedFunctor f a -> Bool # (/=) :: WrappedFunctor f a -> WrappedFunctor f a -> Bool #
Ord (f a) => Ord (WrappedFunctor f a) # |
Instance details Defined in Data.Functor.Invariant Methods compare :: WrappedFunctor f a -> WrappedFunctor f a -> Ordering # (<) :: WrappedFunctor f a -> WrappedFunctor f a -> Bool # (<=) :: WrappedFunctor f a -> WrappedFunctor f a -> Bool # (>) :: WrappedFunctor f a -> WrappedFunctor f a -> Bool # (>=) :: WrappedFunctor f a -> WrappedFunctor f a -> Bool # max :: WrappedFunctor f a -> WrappedFunctor f a -> WrappedFunctor f a # min :: WrappedFunctor f a -> WrappedFunctor f a -> WrappedFunctor f a #

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

Every `Contravariant` functor is also an `Invariant` functor.

invmapProfunctor :: Profunctor p => (a -> b) -> (b -> a) -> p a a -> p b b #

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 #

An `Arrow` with the same input and output types can be seen as an `Invariant` functor.

newtype WrappedContravariant (f :: k -> Type) (a :: k) #

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

Constructors

WrapContravariant |
Fields unwrapContravariant :: f a

#### Instances

Instances details

Contravariant f => Contravariant (WrappedContravariant f) # |
Instance details Defined in Data.Functor.Invariant Methods contramap :: (a' -> a) -> WrappedContravariant f a -> WrappedContravariant f a' # (>$) :: b -> WrappedContravariant f b -> WrappedContravariant f a #
Decidable f => Decidable (WrappedContravariant f) # |
Instance details Defined in Data.Functor.Invariant Methods lose :: (a -> Void) -> WrappedContravariant f a # choose :: (a -> Either b c) -> WrappedContravariant f b -> WrappedContravariant f c -> WrappedContravariant f a #
Divisible f => Divisible (WrappedContravariant f) # |
Instance details Defined in Data.Functor.Invariant Methods divide :: (a -> (b, c)) -> WrappedContravariant f b -> WrappedContravariant f c -> WrappedContravariant f a # conquer :: WrappedContravariant f a #
Contravariant f => Invariant (WrappedContravariant f) # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> WrappedContravariant f a -> WrappedContravariant f b #
Read (f a) => Read (WrappedContravariant f a) # |
Instance details Defined in Data.Functor.Invariant Methods readsPrec :: Int -> ReadS (WrappedContravariant f a) # readList :: ReadS [WrappedContravariant f a] # readPrec :: ReadPrec (WrappedContravariant f a) # readListPrec :: ReadPrec [WrappedContravariant f a] #
Show (f a) => Show (WrappedContravariant f a) # |
Instance details Defined in Data.Functor.Invariant Methods showsPrec :: Int -> WrappedContravariant f a -> ShowS # show :: WrappedContravariant f a -> String # showList :: [WrappedContravariant f a] -> ShowS #
Eq (f a) => Eq (WrappedContravariant f a) # |
Instance details Defined in Data.Functor.Invariant Methods (==) :: WrappedContravariant f a -> WrappedContravariant f a -> Bool # (/=) :: WrappedContravariant f a -> WrappedContravariant f a -> Bool #
Ord (f a) => Ord (WrappedContravariant f a) # |
Instance details Defined in Data.Functor.Invariant Methods compare :: WrappedContravariant f a -> WrappedContravariant f a -> Ordering # (<) :: WrappedContravariant f a -> WrappedContravariant f a -> Bool # (<=) :: WrappedContravariant f a -> WrappedContravariant f a -> Bool # (>) :: WrappedContravariant f a -> WrappedContravariant f a -> Bool # (>=) :: WrappedContravariant f a -> WrappedContravariant f a -> Bool # max :: WrappedContravariant f a -> WrappedContravariant f a -> WrappedContravariant f a # min :: WrappedContravariant f a -> WrappedContravariant f a -> WrappedContravariant f a #

newtype InvariantProfunctor (p :: k -> k -> Type) (a :: k) #

A `Profunctor` with the same input and output types can be seen as an `Invariant` functor.

Constructors

InvariantProfunctor (p a a) |

#### Instances

Instances details

Profunctor p => Invariant (InvariantProfunctor p) # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> InvariantProfunctor p a -> InvariantProfunctor p b #

newtype InvariantArrow (c :: k -> k -> Type) (a :: k) #

An `Arrow` with the same input and output types can be seen as an `Invariant` functor.

Constructors

InvariantArrow (c a a) |

#### Instances

Instances details

Arrow c => Invariant (InvariantArrow c) # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> InvariantArrow c a -> InvariantArrow c b #

# `Invariant2`

class Invariant2 (f :: Type -> Type -> Type) where #

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

Methods

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

#### Instances

Instances details

Invariant2 Op # | from the `contravariant` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Op a b -> Op c d #
Invariant2 Arg # | from Data.Semigroup
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Arg a b -> Arg c d #
Invariant2 Either # |
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Either a b -> Either c d #
Invariant2 (,) # |
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> (a, b) -> (c, d) #
Arrow arr => Invariant2 (WrappedArrow arr) # | from Control.Applicative
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedArrow arr a b -> WrappedArrow arr c d #
Invariant m => Invariant2 (Kleisli m) # | from Control.Arrow
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Kleisli m a b -> Kleisli m c d #
Invariant2 (Const :: Type -> Type -> Type) # | from Control.Applicative
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Const a b -> Const c d #
Invariant2 (CopastroSum p) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> CopastroSum p a b -> CopastroSum p c d #
Invariant2 (CotambaraSum p) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> CotambaraSum p a b -> CotambaraSum p c d #
Invariant2 (PastroSum p) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> PastroSum p a b -> PastroSum p c d #
Invariant2 p => Invariant2 (TambaraSum p) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> TambaraSum p a b -> TambaraSum p c d #
Invariant2 p => Invariant2 (Closure p) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Closure p a b -> Closure p c d #
Invariant2 (Environment p) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Environment p a b -> Environment p c d #
Invariant2 p => Invariant2 (CofreeMapping p) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> CofreeMapping p a b -> CofreeMapping p c d #
Invariant2 (FreeMapping p) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> FreeMapping p a b -> FreeMapping p c d #
Invariant2 (Copastro p) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Copastro p a b -> Copastro p c d #
Invariant2 (Cotambara p) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Cotambara p a b -> Cotambara p c d #
Invariant2 (Pastro p) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Pastro p a b -> Pastro p c d #
Invariant2 p => Invariant2 (Tambara p) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Tambara p a b -> Tambara p c d #
Invariant2 p => Invariant2 (CofreeTraversing p) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> CofreeTraversing p a b -> CofreeTraversing p c d #
Invariant2 (FreeTraversing p) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> FreeTraversing p a b -> FreeTraversing p c d #
Invariant2 (Coyoneda p) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Coyoneda p a b -> Coyoneda p c d #
Invariant2 (Yoneda p) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Yoneda p a b -> Yoneda p c d #
Invariant2 (Tagged :: Type -> Type -> Type) # | from the `tagged` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Tagged a b -> Tagged c d #
Invariant2 (Constant :: Type -> Type -> Type) # | from the `transformers` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Constant a b -> Constant c d #
Invariant2 ((,,) a) # |
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a0 -> c) -> (c -> a0) -> (b -> d) -> (d -> b) -> (a, a0, b) -> (a, c, d) #
Invariant w => Invariant2 (Cokleisli w) # | from the `comonad` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Cokleisli w a b -> Cokleisli w c d #
Invariant2 (K1 i :: Type -> Type -> Type) # | from GHC.Generics
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> K1 i a b -> K1 i c d #
Invariant f => Invariant2 (Costar f) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Costar f a b -> Costar f c d #
Invariant2 (Forget r :: Type -> Type -> Type) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Forget r a b -> Forget r c d #
Invariant f => Invariant2 (Star f) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Star f a b -> Star f c d #
Invariant2 ((,,,) a b) # |
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a0 -> c) -> (c -> a0) -> (b0 -> d) -> (d -> b0) -> (a, b, a0, b0) -> (a, b, c, d) #
Invariant2 (->) # |
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> (a -> b) -> c -> d #
Invariant f => Invariant2 (Clown f :: Type -> Type -> Type) # | from the `bifunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Clown f a b -> Clown f c d #
Invariant2 p => Invariant2 (Flip p) # | from the `bifunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Flip p a b -> Flip p c d #
Invariant g => Invariant2 (Joker g :: Type -> Type -> Type) # | from the `bifunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Joker g a b -> Joker g c d #
Bifunctor p => Invariant2 (WrappedBifunctor p) # | from the `bifunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedBifunctor p a b -> WrappedBifunctor p c d #
Profunctor p => Invariant2 (WrappedProfunctor p) # |
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedProfunctor p a b -> WrappedProfunctor p c d #
Invariant2 p => Invariant2 (Codensity p) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Codensity p a b -> Codensity p c d #
Arrow arr => Invariant2 (WrappedArrow arr) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedArrow arr a b -> WrappedArrow arr c d #
Invariant2 ((,,,,) a b c) # |
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a0 -> c0) -> (c0 -> a0) -> (b0 -> d) -> (d -> b0) -> (a, b, c, a0, b0) -> (a, b, c, c0, d) #
(Invariant2 f, Invariant2 g) => Invariant2 (Product f g) # | from the `bifunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Product f g a b -> Product f g c d #
(Invariant2 p, Invariant2 q) => Invariant2 (Sum p q) # | from the `bifunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Sum p q a b -> Sum p q c d #
(Invariant f, Invariant2 p) => Invariant2 (Tannen f p) # | from the `bifunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Tannen f p a b -> Tannen f p c d #
(Invariant f, Invariant2 p) => Invariant2 (Cayley f p) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Cayley f p a b -> Cayley f p c d #
(Invariant2 p, Invariant2 q) => Invariant2 (Procompose p q) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Procompose p q a b -> Procompose p q c d #
(Invariant2 p, Invariant2 q) => Invariant2 (Rift p q) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Rift p q a b -> Rift p q c d #
(Invariant2 p, Invariant2 q) => Invariant2 (Ran p q) # | from the `profunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Ran p q a b -> Ran p q c d #
(Invariant2 p, Invariant f, Invariant g) => Invariant2 (Biff p f g) # | from the `bifunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Biff p f g a b -> Biff p f g c d #

invmap2Bifunctor :: Bifunctor f => (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> f a b -> f c d #

Every `Bifunctor` is also an `Invariant2` functor.

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

Make a `Functor` over the second argument of a `Bifunctor`.

Constructors

WrapBifunctor |
Fields unwrapBifunctor :: p a b

#### Instances

Instances details

Generic1 (WrappedBifunctor p a :: k1 -> Type) |
Instance details Defined in Data.Bifunctor.Wrapped Associated Types
type Rep1 (WrappedBifunctor p a :: k1 -> Type) |
Instance details Defined in Data.Bifunctor.Wrapped type Rep1 (WrappedBifunctor p a :: k1 -> Type) = D1 ('MetaData "WrappedBifunctor" "Data.Bifunctor.Wrapped" "bifunctors-5.6.2-OFrj7iAEE2GFzeo61y3eE" 'True) (C1 ('MetaCons "WrapBifunctor" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapBifunctor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 (p a))))
Methods from1 :: forall (a0 :: k1). WrappedBifunctor p a a0 -> Rep1 (WrappedBifunctor p a) a0 # to1 :: forall (a0 :: k1). Rep1 (WrappedBifunctor p a) a0 -> WrappedBifunctor p a a0 #
Bifoldable p => Bifoldable (WrappedBifunctor p) |
Instance details 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 #
Bifoldable1 p => Bifoldable1 (WrappedBifunctor p) |
Instance details Defined in Data.Bifunctor.Wrapped Methods bifold1 :: Semigroup m => WrappedBifunctor p m m -> m # bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> WrappedBifunctor p a b -> m #
Bifunctor p => Bifunctor (WrappedBifunctor p) |
Instance details 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) |
Instance details 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) |
Instance details 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) |
Instance details 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) |
Instance details 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) |
Instance details 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) |
Instance details 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) # | from the `bifunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedBifunctor p a b -> WrappedBifunctor p c d #
(Eq2 p, Eq a) => Eq1 (WrappedBifunctor p a) |
Instance details 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) |
Instance details 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) |
Instance details 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) |
Instance details 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 #
Bifunctor p => Functor (WrappedBifunctor p a) |
Instance details 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 #
Bifoldable p => Foldable (WrappedBifunctor p a) |
Instance details 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 #
Bitraversable p => Traversable (WrappedBifunctor p a) |
Instance details 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 => Invariant (WrappedBifunctor p a) # | from the `bifunctors` package
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> WrappedBifunctor p a a0 -> WrappedBifunctor p a b #
Generic (WrappedBifunctor p a b) |
Instance details Defined in Data.Bifunctor.Wrapped Associated Types
type Rep (WrappedBifunctor p a b) |
Instance details Defined in Data.Bifunctor.Wrapped type Rep (WrappedBifunctor p a b) = D1 ('MetaData "WrappedBifunctor" "Data.Bifunctor.Wrapped" "bifunctors-5.6.2-OFrj7iAEE2GFzeo61y3eE" 'True) (C1 ('MetaCons "WrapBifunctor" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapBifunctor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (p a b))))
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) |
Instance details 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) |
Instance details 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) |
Instance details 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) |
Instance details 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) |
Instance details Defined in Data.Bifunctor.Wrapped type Rep1 (WrappedBifunctor p a :: k1 -> Type) = D1 ('MetaData "WrappedBifunctor" "Data.Bifunctor.Wrapped" "bifunctors-5.6.2-OFrj7iAEE2GFzeo61y3eE" 'True) (C1 ('MetaCons "WrapBifunctor" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapBifunctor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 (p a))))
type Rep (WrappedBifunctor p a b) |
Instance details Defined in Data.Bifunctor.Wrapped type Rep (WrappedBifunctor p a b) = D1 ('MetaData "WrappedBifunctor" "Data.Bifunctor.Wrapped" "bifunctors-5.6.2-OFrj7iAEE2GFzeo61y3eE" '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 #

Every `Profunctor` is also an `Invariant2` functor.

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

Wrap a `Profunctor` to be used as a member of `Invariant2`.

Constructors

WrapProfunctor |
Fields unwrapProfunctor :: p a b

#### Instances

Instances details

ProfunctorFunctor (WrappedProfunctor :: (Type -> Type -> Type) -> Type -> Type -> Type) # |
Instance details 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) # |
Instance details Defined in Data.Functor.Invariant Methods id :: forall (a :: k). WrappedProfunctor p a a # (.) :: forall (b :: k) (c :: k) (a :: k). WrappedProfunctor p b c -> WrappedProfunctor p a b -> WrappedProfunctor p a c #
ProfunctorComonad (WrappedProfunctor :: (Type -> Type -> Type) -> Type -> Type -> Type) # |
Instance details 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) # |
Instance details 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) # |
Instance details 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) # |
Instance details 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) # |
Instance details Defined in Data.Functor.Invariant Methods loop :: WrappedProfunctor p (b, d) (c, d) -> WrappedProfunctor p b c #
ArrowPlus p => ArrowPlus (WrappedProfunctor p) # |
Instance details Defined in Data.Functor.Invariant Methods (<+>) :: WrappedProfunctor p b c -> WrappedProfunctor p b c -> WrappedProfunctor p b c #
ArrowZero p => ArrowZero (WrappedProfunctor p) # |
Instance details Defined in Data.Functor.Invariant Methods zeroArrow :: WrappedProfunctor p b c #
Profunctor p => Invariant2 (WrappedProfunctor p) # |
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedProfunctor p a b -> WrappedProfunctor p c d #
Choice p => Choice (WrappedProfunctor p) # |
Instance details 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) # |
Instance details 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) # |
Instance details Defined in Data.Functor.Invariant Methods closed :: WrappedProfunctor p a b -> WrappedProfunctor p (x -> a) (x -> b) #
Mapping p => Mapping (WrappedProfunctor p) # |
Instance details 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) # |
Instance details 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) # |
Instance details 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) # |
Instance details 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) # |
Instance details 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) # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> WrappedProfunctor p a a0 -> WrappedProfunctor p a b #
Read (p a b) => Read (WrappedProfunctor p a b) # |
Instance details 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) # |
Instance details 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) # |
Instance details 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) # |
Instance details 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 #