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 Source #

Any `* -> *` type parametric in the argument permits an instance of `Invariant`.

Instances should satisfy the following laws:

    invmap id id = id
    invmap f2 f2' . invmap f1 f1' = invmap (f2 . f1) (f1' . f2')

Minimal complete definition

Nothing

Methods

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

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

#### Instances

Instances details

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

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) Source # |
Instance details Defined in Data.Functor.Invariant Methods empty :: WrappedFunctor f a Source # (<|>) :: WrappedFunctor f a -> WrappedFunctor f a -> WrappedFunctor f a Source # some :: WrappedFunctor f a -> WrappedFunctor f [a] Source # many :: WrappedFunctor f a -> WrappedFunctor f [a] Source #
Applicative f => Applicative (WrappedFunctor f) Source # |

Instance details

Defined in Data.Functor.Invariant

Methods

pure :: a -> WrappedFunctor f a Source #

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

liftA2 :: (a -> b -> c) -> WrappedFunctor f a -> WrappedFunctor f b -> WrappedFunctor f c Source #

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

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

Functor f => Functor (WrappedFunctor f) Source # |
Instance details Defined in Data.Functor.Invariant Methods fmap :: (a -> b) -> WrappedFunctor f a -> WrappedFunctor f b Source # (<$) :: a -> WrappedFunctor f b -> WrappedFunctor f a Source #
Monad m => Monad (WrappedFunctor m) Source # |
Instance details Defined in Data.Functor.Invariant Methods (>>=) :: WrappedFunctor m a -> (a -> WrappedFunctor m b) -> WrappedFunctor m b Source # (>>) :: WrappedFunctor m a -> WrappedFunctor m b -> WrappedFunctor m b Source # return :: a -> WrappedFunctor m a Source #
MonadPlus m => MonadPlus (WrappedFunctor m) Source # |
Instance details Defined in Data.Functor.Invariant Methods mzero :: WrappedFunctor m a Source # mplus :: WrappedFunctor m a -> WrappedFunctor m a -> WrappedFunctor m a Source #
Foldable f => Foldable (WrappedFunctor f) Source # |

Instance details

Defined in Data.Functor.Invariant

Methods

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

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

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

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

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

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

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

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

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

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

null :: WrappedFunctor f a -> Bool Source #

length :: WrappedFunctor f a -> Int Source #

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

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

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

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

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

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

Instance details

Defined in Data.Functor.Invariant

Methods

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

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

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

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

Functor f => Invariant (WrappedFunctor f) Source # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> WrappedFunctor f a -> WrappedFunctor f b Source #
Read (f a) => Read (WrappedFunctor f a) Source # |
Instance details Defined in Data.Functor.Invariant Methods readsPrec :: Int -> ReadS (WrappedFunctor f a) Source # readList :: ReadS [WrappedFunctor f a] Source # readPrec :: ReadPrec (WrappedFunctor f a) Source # readListPrec :: ReadPrec [WrappedFunctor f a] Source #
Show (f a) => Show (WrappedFunctor f a) Source # |
Instance details Defined in Data.Functor.Invariant Methods showsPrec :: Int -> WrappedFunctor f a -> ShowS Source # show :: WrappedFunctor f a -> String Source # showList :: [WrappedFunctor f a] -> ShowS Source #
Eq (f a) => Eq (WrappedFunctor f a) Source # |
Instance details Defined in Data.Functor.Invariant Methods (==) :: WrappedFunctor f a -> WrappedFunctor f a -> Bool Source # (/=) :: WrappedFunctor f a -> WrappedFunctor f a -> Bool Source #
Ord (f a) => Ord (WrappedFunctor f a) Source # |

Instance details

Defined in Data.Functor.Invariant

Methods

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

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

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

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

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

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

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

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

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

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

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

invmapArrow :: Arrow arr => (a -> b) -> (b -> a) -> arr a a -> arr b b Source #

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

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

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

Instance details

Defined in Data.Functor.Invariant

Methods

compare :: WrappedContravariant f a -> WrappedContravariant f a -> Ordering Source #

(<) :: WrappedContravariant f a -> WrappedContravariant f a -> Bool Source #

(<=) :: WrappedContravariant f a -> WrappedContravariant f a -> Bool Source #

(>) :: WrappedContravariant f a -> WrappedContravariant f a -> Bool Source #

(>=) :: WrappedContravariant f a -> WrappedContravariant f a -> Bool Source #

max :: WrappedContravariant f a -> WrappedContravariant f a -> WrappedContravariant f a Source #

min :: WrappedContravariant f a -> WrappedContravariant f a -> WrappedContravariant f a Source #

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

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) Source # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> InvariantProfunctor p a -> InvariantProfunctor p b Source #

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

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) Source # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a -> b) -> (b -> a) -> InvariantArrow c a -> InvariantArrow c b Source #

# `Invariant2`

class Invariant2 (f :: Type -> Type -> Type) 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')

Methods

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

#### Instances

Instances details

Invariant2 Op Source # | 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 Source #
Invariant2 Arg Source # | 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 Source #
Invariant2 Either Source # |
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Either a b -> Either c d Source #
Invariant2 (,) Source # |
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> (a, b) -> (c, d) Source #
Arrow arr => Invariant2 (WrappedArrow arr) Source # | 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 Source #
Invariant m => Invariant2 (Kleisli m) Source # | 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 Source #
Invariant2 (Const :: Type -> Type -> Type) Source # | 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 Source #
Invariant2 (CopastroSum p) Source # | 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 Source #
Invariant2 (CotambaraSum p) Source # | 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 Source #
Invariant2 (PastroSum p) Source # | 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 Source #
Invariant2 p => Invariant2 (TambaraSum p) Source # | 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 Source #
Invariant2 p => Invariant2 (Closure p) Source # | 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 Source #
Invariant2 (Environment p) Source # | 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 Source #
Invariant2 p => Invariant2 (CofreeMapping p) Source # | 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 Source #
Invariant2 (FreeMapping p) Source # | 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 Source #
Invariant2 (Copastro p) Source # | 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 Source #
Invariant2 (Cotambara p) Source # | 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 Source #
Invariant2 (Pastro p) Source # | 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 Source #
Invariant2 p => Invariant2 (Tambara p) Source # | 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 Source #
Invariant2 p => Invariant2 (CofreeTraversing p) Source # | 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 Source #
Invariant2 (FreeTraversing p) Source # | 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 Source #
Invariant2 (Coyoneda p) Source # | 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 Source #
Invariant2 (Yoneda p) Source # | 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 Source #
Invariant2 (Tagged :: Type -> Type -> Type) Source # | 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 Source #
Invariant2 (Constant :: Type -> Type -> Type) Source # | 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 Source #
Invariant2 ((,,) a) Source # |
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a0 -> c) -> (c -> a0) -> (b -> d) -> (d -> b) -> (a, a0, b) -> (a, c, d) Source #
Invariant w => Invariant2 (Cokleisli w) Source # | 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 Source #
Invariant2 (K1 i :: Type -> Type -> Type) Source # | 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 Source #
Invariant f => Invariant2 (Costar f) Source # | 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 Source #
Invariant2 (Forget r :: Type -> Type -> Type) Source # | 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 Source #
Invariant f => Invariant2 (Star f) Source # | 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 Source #
Invariant2 ((,,,) a b) Source # |
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) Source #
Invariant2 (->) Source # |
Instance details Defined in Data.Functor.Invariant Methods invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> (a -> b) -> c -> d Source #
Invariant f => Invariant2 (Clown f :: Type -> Type -> Type) Source # | 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 Source #
Invariant2 p => Invariant2 (Flip p) Source # | 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 Source #
Invariant g => Invariant2 (Joker g :: Type -> Type -> Type) Source # | 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 Source #
Bifunctor p => Invariant2 (WrappedBifunctor p) Source # | 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 Source #
Profunctor p => Invariant2 (WrappedProfunctor p) Source # |
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 Source #
Invariant2 p => Invariant2 (Codensity p) Source # | 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 Source #
Arrow arr => Invariant2 (WrappedArrow arr) Source # | 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 Source #
Invariant2 ((,,,,) a b c) Source # |
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) Source #
(Invariant2 f, Invariant2 g) => Invariant2 (Product f g) Source # | 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 Source #
(Invariant2 p, Invariant2 q) => Invariant2 (Sum p q) Source # | 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 Source #
(Invariant f, Invariant2 p) => Invariant2 (Tannen f p) Source # | 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 Source #
(Invariant f, Invariant2 p) => Invariant2 (Cayley f p) Source # | 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 Source #
(Invariant2 p, Invariant2 q) => Invariant2 (Procompose p q) Source # | 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 Source #
(Invariant2 p, Invariant2 q) => Invariant2 (Rift p q) Source # | 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 Source #
(Invariant2 p, Invariant2 q) => Invariant2 (Ran p q) Source # | 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 Source #
(Invariant2 p, Invariant f, Invariant g) => Invariant2 (Biff p f g) Source # | 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 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 (p :: k -> k1 -> Type) (a :: k) (b :: k1) Source #

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-4kXyA9Yl2Ys9aGae1sUdxu" '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 Source #

to1 :: forall (a0 :: k1). Rep1 (WrappedBifunctor p a) a0 -> WrappedBifunctor p a a0 Source #

Bifoldable p => Bifoldable (WrappedBifunctor p) |
Instance details Defined in Data.Bifunctor.Wrapped Methods bifold :: Monoid m => WrappedBifunctor p m m -> m Source # bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> WrappedBifunctor p a b -> m Source # bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> WrappedBifunctor p a b -> c Source # bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> WrappedBifunctor p a b -> c Source #
Bifoldable1 p => Bifoldable1 (WrappedBifunctor p) |
Instance details Defined in Data.Bifunctor.Wrapped Methods bifold1 :: Semigroup m => WrappedBifunctor p m m -> m Source # bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> WrappedBifunctor p a b -> m Source #
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 Source # first :: (a -> b) -> WrappedBifunctor p a c -> WrappedBifunctor p b c Source # second :: (b -> c) -> WrappedBifunctor p a b -> WrappedBifunctor p a c Source #
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) Source #
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 Source #
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 Source #
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) Source #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [WrappedBifunctor p a b] Source #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (WrappedBifunctor p a b) Source #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [WrappedBifunctor p a b] Source #

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 Source # liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [WrappedBifunctor p a b] -> ShowS Source #
Biapplicative p => Biapplicative (WrappedBifunctor p) |

Instance details

Defined in Data.Bifunctor.Wrapped

Methods

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

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

biliftA2 :: (a -> b -> c) -> (d -> e -> f) -> WrappedBifunctor p a d -> WrappedBifunctor p b e -> WrappedBifunctor p c f Source #

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

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

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

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [WrappedBifunctor p a a0] Source #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (WrappedBifunctor p a a0) Source #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [WrappedBifunctor p a a0] Source #

(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 Source # liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [WrappedBifunctor p a a0] -> ShowS Source #
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 Source # (<$) :: a0 -> WrappedBifunctor p a b -> WrappedBifunctor p a a0 Source #
Bifoldable p => Foldable (WrappedBifunctor p a) |

Instance details

Defined in Data.Bifunctor.Wrapped

Methods

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

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

foldMap' :: Monoid m => (a0 -> m) -> WrappedBifunctor p a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> WrappedBifunctor p a a0 -> b Source #

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

foldl :: (b -> a0 -> b) -> b -> WrappedBifunctor p a a0 -> b Source #

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

foldr1 :: (a0 -> a0 -> a0) -> WrappedBifunctor p a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> WrappedBifunctor p a a0 -> a0 Source #

toList :: WrappedBifunctor p a a0 -> [a0] Source #

null :: WrappedBifunctor p a a0 -> Bool Source #

length :: WrappedBifunctor p a a0 -> Int Source #

elem :: Eq a0 => a0 -> WrappedBifunctor p a a0 -> Bool Source #

maximum :: Ord a0 => WrappedBifunctor p a a0 -> a0 Source #

minimum :: Ord a0 => WrappedBifunctor p a a0 -> a0 Source #

sum :: Num a0 => WrappedBifunctor p a a0 -> a0 Source #

product :: Num a0 => WrappedBifunctor p a a0 -> a0 Source #

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

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

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

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

Bifunctor p => Invariant (WrappedBifunctor p a) Source # | 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 Source #
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-4kXyA9Yl2Ys9aGae1sUdxu" '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 Source #

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

Read (p a b) => Read (WrappedBifunctor p a b) |
Instance details Defined in Data.Bifunctor.Wrapped Methods readsPrec :: Int -> ReadS (WrappedBifunctor p a b) Source # readList :: ReadS [WrappedBifunctor p a b] Source # readPrec :: ReadPrec (WrappedBifunctor p a b) Source # readListPrec :: ReadPrec [WrappedBifunctor p a b] Source #
Show (p a b) => Show (WrappedBifunctor p a b) |
Instance details Defined in Data.Bifunctor.Wrapped Methods showsPrec :: Int -> WrappedBifunctor p a b -> ShowS Source # show :: WrappedBifunctor p a b -> String Source # showList :: [WrappedBifunctor p a b] -> ShowS Source #
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 Source # (/=) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool Source #
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 Source #

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

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

(>) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool Source #

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

max :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> WrappedBifunctor p a b Source #

min :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> WrappedBifunctor p a b Source #

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-4kXyA9Yl2Ys9aGae1sUdxu" '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-4kXyA9Yl2Ys9aGae1sUdxu" 'True) (C1 ('MetaCons "WrapBifunctor" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapBifunctor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (p a b))))

invmap2Profunctor :: Profunctor f => (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> f a b -> f c d Source #

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

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

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) Source # |
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 Source #
Category p => Category (WrappedProfunctor p :: k -> k -> Type) Source # |
Instance details Defined in Data.Functor.Invariant Methods id :: forall (a :: k). WrappedProfunctor p a a Source # (.) :: forall (b :: k) (c :: k) (a :: k). WrappedProfunctor p b c -> WrappedProfunctor p a b -> WrappedProfunctor p a c Source #
ProfunctorComonad (WrappedProfunctor :: (Type -> Type -> Type) -> Type -> Type -> Type) Source # |
Instance details Defined in Data.Functor.Invariant Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => WrappedProfunctor p :-> p Source # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => WrappedProfunctor p :-> WrappedProfunctor (WrappedProfunctor p) Source #
ProfunctorMonad (WrappedProfunctor :: (Type -> Type -> Type) -> Type -> Type -> Type) Source # |
Instance details Defined in Data.Functor.Invariant Methods proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> WrappedProfunctor p Source # projoin :: forall (p :: Type -> Type -> Type). Profunctor p => WrappedProfunctor (WrappedProfunctor p) :-> WrappedProfunctor p Source #
Arrow p => Arrow (WrappedProfunctor p) Source # |

Instance details

Defined in Data.Functor.Invariant

Methods

arr :: (b -> c) -> WrappedProfunctor p b c Source #

first :: WrappedProfunctor p b c -> WrappedProfunctor p (b, d) (c, d) Source #

second :: WrappedProfunctor p b c -> WrappedProfunctor p (d, b) (d, c) Source #

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

(&&&) :: WrappedProfunctor p b c -> WrappedProfunctor p b c' -> WrappedProfunctor p b (c, c') Source #

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

Instance details

Defined in Data.Functor.Invariant

Methods

left :: WrappedProfunctor p b c -> WrappedProfunctor p (Either b d) (Either c d) Source #

right :: WrappedProfunctor p b c -> WrappedProfunctor p (Either d b) (Either d c) Source #

(+++) :: WrappedProfunctor p b c -> WrappedProfunctor p b' c' -> WrappedProfunctor p (Either b b') (Either c c') Source #

(|||) :: WrappedProfunctor p b d -> WrappedProfunctor p c d -> WrappedProfunctor p (Either b c) d Source #

ArrowLoop p => ArrowLoop (WrappedProfunctor p) Source # |
Instance details Defined in Data.Functor.Invariant Methods loop :: WrappedProfunctor p (b, d) (c, d) -> WrappedProfunctor p b c Source #
ArrowPlus p => ArrowPlus (WrappedProfunctor p) Source # |
Instance details Defined in Data.Functor.Invariant Methods (<+>) :: WrappedProfunctor p b c -> WrappedProfunctor p b c -> WrappedProfunctor p b c Source #
ArrowZero p => ArrowZero (WrappedProfunctor p) Source # |
Instance details Defined in Data.Functor.Invariant Methods zeroArrow :: WrappedProfunctor p b c Source #
Profunctor p => Invariant2 (WrappedProfunctor p) Source # |
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 Source #
Choice p => Choice (WrappedProfunctor p) Source # |
Instance details Defined in Data.Functor.Invariant Methods left' :: WrappedProfunctor p a b -> WrappedProfunctor p (Either a c) (Either b c) Source # right' :: WrappedProfunctor p a b -> WrappedProfunctor p (Either c a) (Either c b) Source #
Cochoice p => Cochoice (WrappedProfunctor p) Source # |
Instance details Defined in Data.Functor.Invariant Methods unleft :: WrappedProfunctor p (Either a d) (Either b d) -> WrappedProfunctor p a b Source # unright :: WrappedProfunctor p (Either d a) (Either d b) -> WrappedProfunctor p a b Source #
Closed p => Closed (WrappedProfunctor p) Source # |
Instance details Defined in Data.Functor.Invariant Methods closed :: WrappedProfunctor p a b -> WrappedProfunctor p (x -> a) (x -> b) Source #
Mapping p => Mapping (WrappedProfunctor p) Source # |
Instance details Defined in Data.Functor.Invariant Methods map' :: Functor f => WrappedProfunctor p a b -> WrappedProfunctor p (f a) (f b) Source # roam :: ((a -> b) -> s -> t) -> WrappedProfunctor p a b -> WrappedProfunctor p s t Source #
Costrong p => Costrong (WrappedProfunctor p) Source # |
Instance details Defined in Data.Functor.Invariant Methods unfirst :: WrappedProfunctor p (a, d) (b, d) -> WrappedProfunctor p a b Source # unsecond :: WrappedProfunctor p (d, a) (d, b) -> WrappedProfunctor p a b Source #
Strong p => Strong (WrappedProfunctor p) Source # |
Instance details Defined in Data.Functor.Invariant Methods first' :: WrappedProfunctor p a b -> WrappedProfunctor p (a, c) (b, c) Source # second' :: WrappedProfunctor p a b -> WrappedProfunctor p (c, a) (c, b) Source #
Traversing p => Traversing (WrappedProfunctor p) Source # |
Instance details Defined in Data.Functor.Invariant Methods traverse' :: Traversable f => WrappedProfunctor p a b -> WrappedProfunctor p (f a) (f b) Source # wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> WrappedProfunctor p a b -> WrappedProfunctor p s t Source #
Profunctor p => Profunctor (WrappedProfunctor p) Source # |

Instance details

Defined in Data.Functor.Invariant

Methods

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

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

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

(#.) :: forall a b c q. Coercible c b => q b c -> WrappedProfunctor p a b -> WrappedProfunctor p a c Source #

(.#) :: forall a b c q. Coercible b a => WrappedProfunctor p b c -> q a b -> WrappedProfunctor p a c Source #

Profunctor p => Invariant (WrappedProfunctor p a) Source # |
Instance details Defined in Data.Functor.Invariant Methods invmap :: (a0 -> b) -> (b -> a0) -> WrappedProfunctor p a a0 -> WrappedProfunctor p a b Source #
Read (p a b) => Read (WrappedProfunctor p a b) Source # |
Instance details Defined in Data.Functor.Invariant Methods readsPrec :: Int -> ReadS (WrappedProfunctor p a b) Source # readList :: ReadS [WrappedProfunctor p a b] Source # readPrec :: ReadPrec (WrappedProfunctor p a b) Source # readListPrec :: ReadPrec [WrappedProfunctor p a b] Source #
Show (p a b) => Show (WrappedProfunctor p a b) Source # |
Instance details Defined in Data.Functor.Invariant Methods showsPrec :: Int -> WrappedProfunctor p a b -> ShowS Source # show :: WrappedProfunctor p a b -> String Source # showList :: [WrappedProfunctor p a b] -> ShowS Source #
Eq (p a b) => Eq (WrappedProfunctor p a b) Source # |
Instance details Defined in Data.Functor.Invariant Methods (==) :: WrappedProfunctor p a b -> WrappedProfunctor p a b -> Bool Source # (/=) :: WrappedProfunctor p a b -> WrappedProfunctor p a b -> Bool Source #
Ord (p a b) => Ord (WrappedProfunctor p a b) Source # |

Instance details

Defined in Data.Functor.Invariant

Methods

compare :: WrappedProfunctor p a b -> WrappedProfunctor p a b -> Ordering Source #

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

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

(>) :: WrappedProfunctor p a b -> WrappedProfunctor p a b -> Bool Source #

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

max :: WrappedProfunctor p a b -> WrappedProfunctor p a b -> WrappedProfunctor p a b Source #

min :: WrappedProfunctor p a b -> WrappedProfunctor p a b -> WrappedProfunctor p a b Source #