-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Haskell98 invariant functors
--   
--   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/
@package invariant
@version 0.6.4

-- | 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/
module Data.Functor.Invariant

-- | 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')
--   
class Invariant (f :: Type -> Type)
invmap :: Invariant f => (a -> b) -> (b -> a) -> f a -> f b
($dminvmap) :: (Invariant f, Generic1 f, Invariant (Rep1 f)) => (a -> b) -> (b -> a) -> f a -> f b

-- | Every Functor is also an Invariant functor.
invmapFunctor :: Functor f => (a -> b) -> (b -> a) -> f a -> f b

-- | A generic implementation of invmap.
genericInvmap :: (Generic1 f, Invariant (Rep1 f)) => (a -> b) -> (b -> a) -> f a -> f b

-- | Wrap a Functor to be used as a member of Invariant.
newtype WrappedFunctor (f :: k -> Type) (a :: k)
WrapFunctor :: f a -> WrappedFunctor (f :: k -> Type) (a :: k)
[unwrapFunctor] :: WrappedFunctor (f :: k -> Type) (a :: k) -> f a

-- | Every Contravariant functor is also an Invariant
--   functor.
invmapContravariant :: Contravariant f => (a -> b) -> (b -> a) -> f a -> f b

-- | A Profunctor with the same input and output types can be seen
--   as an Invariant functor.
invmapProfunctor :: Profunctor p => (a -> b) -> (b -> a) -> p a a -> p b b

-- | An Arrow 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

-- | Wrap a Contravariant functor to be used as a member of
--   Invariant.
newtype WrappedContravariant (f :: k -> Type) (a :: k)
WrapContravariant :: f a -> WrappedContravariant (f :: k -> Type) (a :: k)
[unwrapContravariant] :: WrappedContravariant (f :: k -> Type) (a :: k) -> f a

-- | A Profunctor with the same input and output types can be seen
--   as an Invariant functor.
newtype InvariantProfunctor (p :: k -> k -> Type) (a :: k)
InvariantProfunctor :: p a a -> InvariantProfunctor (p :: k -> k -> Type) (a :: k)

-- | An Arrow with the same input and output types can be seen as an
--   Invariant functor.
newtype InvariantArrow (c :: k -> k -> Type) (a :: k)
InvariantArrow :: c a a -> InvariantArrow (c :: k -> k -> Type) (a :: k)

-- | 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')
--   
class Invariant2 (f :: Type -> Type -> Type)
invmap2 :: Invariant2 f => (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> f a b -> f c d

-- | Every Bifunctor is also an Invariant2 functor.
invmap2Bifunctor :: Bifunctor f => (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> f a b -> f c d

-- | Make a Functor over the second argument of a Bifunctor.
newtype WrappedBifunctor (p :: k -> k1 -> Type) (a :: k) (b :: k1)
WrapBifunctor :: p a b -> WrappedBifunctor (p :: k -> k1 -> Type) (a :: k) (b :: k1)
[unwrapBifunctor] :: WrappedBifunctor (p :: k -> k1 -> Type) (a :: k) (b :: k1) -> p a b

-- | Every Profunctor is also an Invariant2 functor.
invmap2Profunctor :: Profunctor f => (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> f a b -> f c d

-- | Wrap a Profunctor to be used as a member of Invariant2.
newtype WrappedProfunctor (p :: k -> k1 -> Type) (a :: k) (b :: k1)
WrapProfunctor :: p a b -> WrappedProfunctor (p :: k -> k1 -> Type) (a :: k) (b :: k1)
[unwrapProfunctor] :: WrappedProfunctor (p :: k -> k1 -> Type) (a :: k) (b :: k1) -> p a b
instance GHC.Internal.Base.Alternative f => GHC.Internal.Base.Alternative (Data.Functor.Invariant.WrappedFunctor f)
instance GHC.Internal.Base.Applicative f => GHC.Internal.Base.Applicative (Data.Functor.Invariant.WrappedFunctor f)
instance GHC.Internal.Control.Arrow.ArrowChoice p => GHC.Internal.Control.Arrow.ArrowChoice (Data.Functor.Invariant.WrappedProfunctor p)
instance GHC.Internal.Control.Arrow.ArrowLoop p => GHC.Internal.Control.Arrow.ArrowLoop (Data.Functor.Invariant.WrappedProfunctor p)
instance GHC.Internal.Control.Arrow.ArrowPlus p => GHC.Internal.Control.Arrow.ArrowPlus (Data.Functor.Invariant.WrappedProfunctor p)
instance GHC.Internal.Control.Arrow.Arrow p => GHC.Internal.Control.Arrow.Arrow (Data.Functor.Invariant.WrappedProfunctor p)
instance GHC.Internal.Control.Arrow.ArrowZero p => GHC.Internal.Control.Arrow.ArrowZero (Data.Functor.Invariant.WrappedProfunctor p)
instance forall k (p :: k -> k -> *). GHC.Internal.Control.Category.Category p => GHC.Internal.Control.Category.Category (Data.Functor.Invariant.WrappedProfunctor p)
instance Data.Profunctor.Choice.Choice p => Data.Profunctor.Choice.Choice (Data.Functor.Invariant.WrappedProfunctor p)
instance Data.Profunctor.Closed.Closed p => Data.Profunctor.Closed.Closed (Data.Functor.Invariant.WrappedProfunctor p)
instance Data.Profunctor.Choice.Cochoice p => Data.Profunctor.Choice.Cochoice (Data.Functor.Invariant.WrappedProfunctor p)
instance Data.Functor.Contravariant.Contravariant f => Data.Functor.Contravariant.Contravariant (Data.Functor.Invariant.WrappedContravariant f)
instance Data.Profunctor.Strong.Costrong p => Data.Profunctor.Strong.Costrong (Data.Functor.Invariant.WrappedProfunctor p)
instance Data.Functor.Contravariant.Divisible.Decidable f => Data.Functor.Contravariant.Divisible.Decidable (Data.Functor.Invariant.WrappedContravariant f)
instance Data.Functor.Contravariant.Divisible.Divisible f => Data.Functor.Contravariant.Divisible.Divisible (Data.Functor.Invariant.WrappedContravariant f)
instance forall k (f :: k -> *) (a :: k). GHC.Classes.Eq (f a) => GHC.Classes.Eq (Data.Functor.Invariant.WrappedContravariant f a)
instance forall k (f :: k -> *) (a :: k). GHC.Classes.Eq (f a) => GHC.Classes.Eq (Data.Functor.Invariant.WrappedFunctor f a)
instance forall k1 k2 (p :: k1 -> k2 -> *) (a :: k1) (b :: k2). GHC.Classes.Eq (p a b) => GHC.Classes.Eq (Data.Functor.Invariant.WrappedProfunctor p a b)
instance GHC.Internal.Data.Foldable.Foldable f => GHC.Internal.Data.Foldable.Foldable (Data.Functor.Invariant.WrappedFunctor f)
instance GHC.Internal.Base.Functor f => GHC.Internal.Base.Functor (Data.Functor.Invariant.WrappedFunctor f)
instance Data.Functor.Invariant.Invariant2 Data.Semigroup.Arg
instance (Data.Functor.Invariant.Invariant2 p, Data.Functor.Invariant.Invariant f, Data.Functor.Invariant.Invariant g) => Data.Functor.Invariant.Invariant2 (Data.Bifunctor.Biff.Biff p f g)
instance (Data.Functor.Invariant.Invariant f, Data.Functor.Invariant.Invariant2 p) => Data.Functor.Invariant.Invariant2 (Data.Profunctor.Cayley.Cayley f p)
instance Data.Functor.Invariant.Invariant2 p => Data.Functor.Invariant.Invariant2 (Data.Profunctor.Closed.Closure p)
instance Data.Functor.Invariant.Invariant f => Data.Functor.Invariant.Invariant2 (Data.Bifunctor.Clown.Clown f)
instance Data.Functor.Invariant.Invariant2 p => Data.Functor.Invariant.Invariant2 (Data.Profunctor.Ran.Codensity p)
instance Data.Functor.Invariant.Invariant2 p => Data.Functor.Invariant.Invariant2 (Data.Profunctor.Mapping.CofreeMapping p)
instance Data.Functor.Invariant.Invariant2 p => Data.Functor.Invariant.Invariant2 (Data.Profunctor.Traversing.CofreeTraversing p)
instance Data.Functor.Invariant.Invariant w => Data.Functor.Invariant.Invariant2 (Control.Comonad.Cokleisli w)
instance Data.Functor.Invariant.Invariant2 GHC.Internal.Data.Functor.Const.Const
instance Data.Functor.Invariant.Invariant2 Data.Functor.Constant.Constant
instance Data.Functor.Invariant.Invariant2 (Data.Profunctor.Strong.Copastro p)
instance Data.Functor.Invariant.Invariant2 (Data.Profunctor.Choice.CopastroSum p)
instance Data.Functor.Invariant.Invariant f => Data.Functor.Invariant.Invariant2 (Data.Profunctor.Types.Costar f)
instance Data.Functor.Invariant.Invariant2 (Data.Profunctor.Strong.Cotambara p)
instance Data.Functor.Invariant.Invariant2 (Data.Profunctor.Choice.CotambaraSum p)
instance Data.Functor.Invariant.Invariant2 (Data.Profunctor.Yoneda.Coyoneda p)
instance Data.Functor.Invariant.Invariant2 GHC.Internal.Data.Either.Either
instance Data.Functor.Invariant.Invariant2 (Data.Profunctor.Closed.Environment p)
instance Data.Functor.Invariant.Invariant2 (->)
instance Data.Functor.Invariant.Invariant2 p => Data.Functor.Invariant.Invariant2 (Data.Bifunctor.Flip.Flip p)
instance Data.Functor.Invariant.Invariant2 (Data.Profunctor.Types.Forget r)
instance Data.Functor.Invariant.Invariant2 (Data.Profunctor.Mapping.FreeMapping p)
instance Data.Functor.Invariant.Invariant2 (Data.Profunctor.Traversing.FreeTraversing p)
instance Data.Functor.Invariant.Invariant g => Data.Functor.Invariant.Invariant2 (Data.Bifunctor.Joker.Joker g)
instance Data.Functor.Invariant.Invariant2 (GHC.Internal.Generics.K1 i)
instance Data.Functor.Invariant.Invariant m => Data.Functor.Invariant.Invariant2 (GHC.Internal.Control.Arrow.Kleisli m)
instance Data.Functor.Invariant.Invariant2 Data.Functor.Contravariant.Op
instance Data.Functor.Invariant.Invariant2 (Data.Profunctor.Strong.Pastro p)
instance Data.Functor.Invariant.Invariant2 (Data.Profunctor.Choice.PastroSum p)
instance (Data.Functor.Invariant.Invariant2 p, Data.Functor.Invariant.Invariant2 q) => Data.Functor.Invariant.Invariant2 (Data.Profunctor.Composition.Procompose p q)
instance (Data.Functor.Invariant.Invariant2 f, Data.Functor.Invariant.Invariant2 g) => Data.Functor.Invariant.Invariant2 (Data.Bifunctor.Product.Product f g)
instance (Data.Functor.Invariant.Invariant2 p, Data.Functor.Invariant.Invariant2 q) => Data.Functor.Invariant.Invariant2 (Data.Profunctor.Ran.Ran p q)
instance (Data.Functor.Invariant.Invariant2 p, Data.Functor.Invariant.Invariant2 q) => Data.Functor.Invariant.Invariant2 (Data.Profunctor.Composition.Rift p q)
instance Data.Functor.Invariant.Invariant f => Data.Functor.Invariant.Invariant2 (Data.Profunctor.Types.Star f)
instance (Data.Functor.Invariant.Invariant2 p, Data.Functor.Invariant.Invariant2 q) => Data.Functor.Invariant.Invariant2 (Data.Bifunctor.Sum.Sum p q)
instance Data.Functor.Invariant.Invariant2 Data.Tagged.Tagged
instance Data.Functor.Invariant.Invariant2 p => Data.Functor.Invariant.Invariant2 (Data.Profunctor.Strong.Tambara p)
instance Data.Functor.Invariant.Invariant2 p => Data.Functor.Invariant.Invariant2 (Data.Profunctor.Choice.TambaraSum p)
instance (Data.Functor.Invariant.Invariant f, Data.Functor.Invariant.Invariant2 p) => Data.Functor.Invariant.Invariant2 (Data.Bifunctor.Tannen.Tannen f p)
instance Data.Functor.Invariant.Invariant2 (,)
instance Data.Functor.Invariant.Invariant2 ((,,) a)
instance Data.Functor.Invariant.Invariant2 ((,,,) a b)
instance Data.Functor.Invariant.Invariant2 ((,,,,) a b c)
instance GHC.Internal.Control.Arrow.Arrow arr => Data.Functor.Invariant.Invariant2 (Data.Profunctor.Types.WrappedArrow arr)
instance GHC.Internal.Control.Arrow.Arrow arr => Data.Functor.Invariant.Invariant2 (Control.Applicative.WrappedArrow arr)
instance Data.Bifunctor.Bifunctor p => Data.Functor.Invariant.Invariant2 (Data.Bifunctor.Wrapped.WrappedBifunctor p)
instance Data.Profunctor.Unsafe.Profunctor p => Data.Functor.Invariant.Invariant2 (Data.Functor.Invariant.WrappedProfunctor p)
instance Data.Functor.Invariant.Invariant2 (Data.Profunctor.Yoneda.Yoneda p)
instance (Data.Functor.Invariant.Invariant l, Data.Functor.Invariant.Invariant r) => Data.Functor.Invariant.Invariant (l GHC.Internal.Generics.:*: r)
instance (Data.Functor.Invariant.Invariant l, Data.Functor.Invariant.Invariant r) => Data.Functor.Invariant.Invariant (l GHC.Internal.Generics.:+: r)
instance (Data.Functor.Invariant.Invariant f, Data.Functor.Invariant.Invariant g) => Data.Functor.Invariant.Invariant (f GHC.Internal.Generics.:.: g)
instance Data.Functor.Invariant.Invariant f => Data.Functor.Invariant.Invariant (GHC.Internal.Data.Semigroup.Internal.Alt f)
instance Data.Functor.Invariant.Invariant (Data.Semigroup.Arg a)
instance Data.Functor.Invariant.Invariant System.Console.GetOpt.ArgDescr
instance Data.Functor.Invariant.Invariant System.Console.GetOpt.ArgOrder
instance Data.Functor.Invariant.Invariant (GHC.Internal.Arr.Array i)
instance GHC.Internal.Control.Arrow.Arrow a => Data.Functor.Invariant.Invariant (GHC.Internal.Control.Arrow.ArrowMonad a)
instance Data.Functor.Invariant.Invariant f => Data.Functor.Invariant.Invariant (Control.Applicative.Backwards.Backwards f)
instance forall k2 (p :: * -> * -> *) (g :: * -> *) (f :: k2 -> *) (a :: k2). (Data.Functor.Invariant.Invariant2 p, Data.Functor.Invariant.Invariant g) => Data.Functor.Invariant.Invariant (Data.Bifunctor.Biff.Biff p f g a)
instance Data.Functor.Invariant.Invariant2 p => Data.Functor.Invariant.Invariant (Data.Profunctor.Closed.Closure p a)
instance forall k (f :: k -> *) (a :: k). Data.Functor.Invariant.Invariant (Data.Bifunctor.Clown.Clown f a)
instance Data.Functor.Invariant.Invariant2 p => Data.Functor.Invariant.Invariant (Data.Profunctor.Ran.Codensity p a)
instance forall k (w :: k -> *) (a :: k). Data.Functor.Invariant.Invariant (Control.Comonad.Cokleisli w a)
instance Data.Functor.Invariant.Invariant Data.Functor.Contravariant.Comparison
instance Data.Functor.Invariant.Invariant Data.Complex.Complex
instance (Data.Functor.Invariant.Invariant f, Data.Functor.Invariant.Invariant g) => Data.Functor.Invariant.Invariant (Data.Functor.Contravariant.Compose.Compose f g)
instance (Data.Functor.Invariant.Invariant f, Data.Functor.Invariant.Invariant g) => Data.Functor.Invariant.Invariant (Data.Functor.Compose.Compose f g)
instance (Data.Functor.Invariant.Invariant f, Data.Functor.Invariant.Invariant g) => Data.Functor.Invariant.Invariant (Data.Functor.Contravariant.Compose.ComposeCF f g)
instance (Data.Functor.Invariant.Invariant f, Data.Functor.Invariant.Invariant g) => Data.Functor.Invariant.Invariant (Data.Functor.Contravariant.Compose.ComposeFC f g)
instance Data.Functor.Invariant.Invariant (GHC.Internal.Data.Functor.Const.Const a)
instance Data.Functor.Invariant.Invariant (Data.Functor.Constant.Constant a)
instance forall k (r :: k) (m :: k -> *). Data.Functor.Invariant.Invariant (Control.Monad.Trans.Cont.ContT r m)
instance Data.Functor.Invariant.Invariant (Data.Profunctor.Strong.Copastro p a)
instance Data.Functor.Invariant.Invariant (Data.Profunctor.Choice.CopastroSum p a)
instance Data.Functor.Invariant.Invariant2 p => Data.Functor.Invariant.Invariant (Data.Profunctor.Rep.Coprep p)
instance forall k (f :: k -> *) (a :: k). Data.Functor.Invariant.Invariant (Data.Profunctor.Types.Costar f a)
instance Data.Functor.Invariant.Invariant (Data.Profunctor.Strong.Cotambara p a)
instance Data.Functor.Invariant.Invariant (Data.Profunctor.Choice.CotambaraSum p a)
instance Data.Functor.Invariant.Invariant (Data.Profunctor.Yoneda.Coyoneda p a)
instance Data.Functor.Invariant.Invariant GHC.Internal.Data.Semigroup.Internal.Dual
instance Data.Functor.Invariant.Invariant (GHC.Internal.Data.Either.Either a)
instance Data.Functor.Invariant.Invariant GHC.Internal.Data.Semigroup.Internal.Endo
instance Data.Functor.Invariant.Invariant (Data.Profunctor.Closed.Environment p a)
instance Data.Functor.Invariant.Invariant Data.Functor.Contravariant.Equivalence
instance Data.Functor.Invariant.Invariant m => Data.Functor.Invariant.Invariant (Control.Monad.Trans.Except.ExceptT e m)
instance Data.Functor.Invariant.Invariant ((->) a)
instance Data.Functor.Invariant.Invariant Data.Semigroup.First
instance Data.Functor.Invariant.Invariant GHC.Internal.Data.Monoid.First
instance Data.Functor.Invariant.Invariant2 p => Data.Functor.Invariant.Invariant (Data.Bifunctor.Fix.Fix p)
instance Data.Functor.Invariant.Invariant2 p => Data.Functor.Invariant.Invariant (Data.Bifunctor.Flip.Flip p a)
instance Data.Functor.Invariant.Invariant (Data.Profunctor.Types.Forget r a)
instance Data.Functor.Invariant.Invariant (Data.Profunctor.Mapping.FreeMapping p a)
instance Data.Functor.Invariant.Invariant (Data.Profunctor.Traversing.FreeTraversing p a)
instance Data.Functor.Invariant.Invariant GHC.Internal.Control.Exception.Handler
instance Data.Functor.Invariant.Invariant (Data.HashMap.Internal.HashMap k)
instance Data.Functor.Invariant.Invariant GHC.Types.IO
instance Data.Functor.Invariant.Invariant GHC.Internal.Data.Functor.Identity.Identity
instance Data.Functor.Invariant.Invariant m => Data.Functor.Invariant.Invariant (Control.Monad.Trans.Identity.IdentityT m)
instance Data.Functor.Invariant.Invariant Data.IntMap.Internal.IntMap
instance GHC.Internal.Control.Arrow.Arrow c => Data.Functor.Invariant.Invariant (Data.Functor.Invariant.InvariantArrow c)
instance Data.Profunctor.Unsafe.Profunctor p => Data.Functor.Invariant.Invariant (Data.Functor.Invariant.InvariantProfunctor p)
instance Data.Functor.Invariant.Invariant2 p => Data.Functor.Invariant.Invariant (Data.Bifunctor.Join.Join p)
instance forall k1 (g :: * -> *) (a :: k1). Data.Functor.Invariant.Invariant g => Data.Functor.Invariant.Invariant (Data.Bifunctor.Joker.Joker g a)
instance Data.Functor.Invariant.Invariant (GHC.Internal.Generics.K1 i c)
instance Data.Functor.Invariant.Invariant m => Data.Functor.Invariant.Invariant (GHC.Internal.Control.Arrow.Kleisli m a)
instance Data.Functor.Invariant.Invariant Data.Semigroup.Last
instance Data.Functor.Invariant.Invariant GHC.Internal.Data.Monoid.Last
instance Data.Functor.Invariant.Invariant f => Data.Functor.Invariant.Invariant (Control.Applicative.Lift.Lift f)
instance Data.Functor.Invariant.Invariant []
instance Data.Functor.Invariant.Invariant f => Data.Functor.Invariant.Invariant (GHC.Internal.Generics.M1 i t f)
instance Data.Functor.Invariant.Invariant (Data.Map.Internal.Map k)
instance Data.Functor.Invariant.Invariant Data.Semigroup.Max
instance Data.Functor.Invariant.Invariant GHC.Internal.Maybe.Maybe
instance Data.Functor.Invariant.Invariant m => Data.Functor.Invariant.Invariant (Control.Monad.Trans.Maybe.MaybeT m)
instance Data.Functor.Invariant.Invariant Data.Semigroup.Min
instance Data.Functor.Invariant.Invariant GHC.Internal.Base.NonEmpty
instance Data.Functor.Invariant.Invariant (Data.Functor.Contravariant.Op a)
instance Data.Functor.Invariant.Invariant System.Console.GetOpt.OptDescr
instance Data.Functor.Invariant.Invariant GHC.Internal.Generics.Par1
instance Data.Functor.Invariant.Invariant (Data.Profunctor.Strong.Pastro p a)
instance Data.Functor.Invariant.Invariant (Data.Profunctor.Choice.PastroSum p a)
instance Data.Functor.Invariant.Invariant Data.Functor.Contravariant.Predicate
instance Data.Functor.Invariant.Invariant2 p => Data.Functor.Invariant.Invariant (Data.Profunctor.Rep.Prep p)
instance forall k2 (p :: * -> * -> *) (q :: k2 -> * -> *) (a :: k2). Data.Functor.Invariant.Invariant2 p => Data.Functor.Invariant.Invariant (Data.Profunctor.Composition.Procompose p q a)
instance Data.Functor.Invariant.Invariant GHC.Internal.Data.Semigroup.Internal.Product
instance (Data.Functor.Invariant.Invariant f, Data.Functor.Invariant.Invariant g) => Data.Functor.Invariant.Invariant (Data.Functor.Product.Product f g)
instance Data.Functor.Invariant.Invariant GHC.Internal.Data.Proxy.Proxy
instance Data.Functor.Invariant.Invariant m => Data.Functor.Invariant.Invariant (Control.Monad.Trans.RWS.Strict.RWST r w s m)
instance Data.Functor.Invariant.Invariant m => Data.Functor.Invariant.Invariant (Control.Monad.Trans.RWS.Lazy.RWST r w s m)
instance forall k1 (q :: * -> * -> *) (p :: * -> k1 -> *) (a :: k1). Data.Functor.Invariant.Invariant2 q => Data.Functor.Invariant.Invariant (Data.Profunctor.Ran.Ran p q a)
instance Data.Functor.Invariant.Invariant GHC.Internal.Text.ParserCombinators.ReadP.ReadP
instance Data.Functor.Invariant.Invariant GHC.Internal.Text.ParserCombinators.ReadPrec.ReadPrec
instance Data.Functor.Invariant.Invariant m => Data.Functor.Invariant.Invariant (Control.Monad.Trans.Reader.ReaderT r m)
instance Data.Functor.Invariant.Invariant f => Data.Functor.Invariant.Invariant (GHC.Internal.Generics.Rec1 f)
instance Data.Functor.Invariant.Invariant f => Data.Functor.Invariant.Invariant (Data.Functor.Reverse.Reverse f)
instance forall k2 (p :: * -> * -> *) (q :: k2 -> * -> *) (a :: k2). Data.Functor.Invariant.Invariant2 p => Data.Functor.Invariant.Invariant (Data.Profunctor.Composition.Rift p q a)
instance Data.Functor.Invariant.Invariant (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s)
instance Data.Functor.Invariant.Invariant (GHC.Internal.ST.ST s)
instance Data.Functor.Invariant.Invariant GHC.Internal.Conc.Sync.STM
instance Data.Functor.Invariant.Invariant Data.Sequence.Internal.Seq
instance Data.Functor.Invariant.Invariant Data.StateVar.SettableStateVar
instance Data.Functor.Invariant.Invariant f => Data.Functor.Invariant.Invariant (Data.Profunctor.Types.Star f a)
instance Data.Functor.Invariant.Invariant m => Data.Functor.Invariant.Invariant (Control.Monad.Trans.State.Strict.StateT s m)
instance Data.Functor.Invariant.Invariant m => Data.Functor.Invariant.Invariant (Control.Monad.Trans.State.Lazy.StateT s m)
instance Data.Functor.Invariant.Invariant Data.StateVar.StateVar
instance Data.Functor.Invariant.Invariant GHC.Internal.Data.Semigroup.Internal.Sum
instance (Data.Functor.Invariant.Invariant f, Data.Functor.Invariant.Invariant g) => Data.Functor.Invariant.Invariant (Data.Functor.Sum.Sum f g)
instance forall k (s :: k). Data.Functor.Invariant.Invariant (Data.Tagged.Tagged s)
instance Data.Functor.Invariant.Invariant2 p => Data.Functor.Invariant.Invariant (Data.Profunctor.Strong.Tambara p a)
instance Data.Functor.Invariant.Invariant2 p => Data.Functor.Invariant.Invariant (Data.Profunctor.Choice.TambaraSum p a)
instance (Data.Functor.Invariant.Invariant f, Data.Functor.Invariant.Invariant2 p) => Data.Functor.Invariant.Invariant (Data.Bifunctor.Tannen.Tannen f p a)
instance Data.Functor.Invariant.Invariant Data.Tree.Tree
instance Data.Functor.Invariant.Invariant ((,) a)
instance Data.Functor.Invariant.Invariant ((,,) a b)
instance Data.Functor.Invariant.Invariant ((,,,) a b c)
instance Data.Functor.Invariant.Invariant ((,,,,) a b c d)
instance Data.Functor.Invariant.Invariant GHC.Internal.Generics.U1
instance Data.Functor.Invariant.Invariant GHC.Internal.Generics.UAddr
instance Data.Functor.Invariant.Invariant GHC.Internal.Generics.UChar
instance Data.Functor.Invariant.Invariant GHC.Internal.Generics.UDouble
instance Data.Functor.Invariant.Invariant GHC.Internal.Generics.UFloat
instance Data.Functor.Invariant.Invariant GHC.Internal.Generics.UInt
instance Data.Functor.Invariant.Invariant GHC.Internal.Generics.UWord
instance Data.Functor.Invariant.Invariant GHC.Internal.Generics.V1
instance Data.Functor.Invariant.Invariant Data.Sequence.Internal.ViewL
instance Data.Functor.Invariant.Invariant Data.Sequence.Internal.ViewR
instance GHC.Internal.Control.Arrow.Arrow arr => Data.Functor.Invariant.Invariant (Data.Profunctor.Types.WrappedArrow arr a)
instance GHC.Internal.Control.Arrow.Arrow arr => Data.Functor.Invariant.Invariant (Control.Applicative.WrappedArrow arr a)
instance Data.Bifunctor.Bifunctor p => Data.Functor.Invariant.Invariant (Data.Bifunctor.Wrapped.WrappedBifunctor p a)
instance Data.Functor.Contravariant.Contravariant f => Data.Functor.Invariant.Invariant (Data.Functor.Invariant.WrappedContravariant f)
instance GHC.Internal.Base.Functor f => Data.Functor.Invariant.Invariant (Data.Functor.Invariant.WrappedFunctor f)
instance GHC.Internal.Base.Monad m => Data.Functor.Invariant.Invariant (Control.Applicative.WrappedMonad m)
instance Data.Profunctor.Unsafe.Profunctor p => Data.Functor.Invariant.Invariant (Data.Functor.Invariant.WrappedProfunctor p a)
instance Data.Functor.Invariant.Invariant m => Data.Functor.Invariant.Invariant (Control.Monad.Trans.Writer.Strict.WriterT w m)
instance Data.Functor.Invariant.Invariant m => Data.Functor.Invariant.Invariant (Control.Monad.Trans.Writer.Lazy.WriterT w m)
instance Data.Functor.Invariant.Invariant (Data.Profunctor.Yoneda.Yoneda p a)
instance Data.Functor.Invariant.Invariant GHC.Internal.Functor.ZipList.ZipList
instance Data.Profunctor.Mapping.Mapping p => Data.Profunctor.Mapping.Mapping (Data.Functor.Invariant.WrappedProfunctor p)
instance GHC.Internal.Base.MonadPlus m => GHC.Internal.Base.MonadPlus (Data.Functor.Invariant.WrappedFunctor m)
instance GHC.Internal.Base.Monad m => GHC.Internal.Base.Monad (Data.Functor.Invariant.WrappedFunctor m)
instance forall k (f :: k -> *) (a :: k). GHC.Classes.Ord (f a) => GHC.Classes.Ord (Data.Functor.Invariant.WrappedContravariant f a)
instance forall k (f :: k -> *) (a :: k). GHC.Classes.Ord (f a) => GHC.Classes.Ord (Data.Functor.Invariant.WrappedFunctor f a)
instance forall k1 k2 (p :: k1 -> k2 -> *) (a :: k1) (b :: k2). GHC.Classes.Ord (p a b) => GHC.Classes.Ord (Data.Functor.Invariant.WrappedProfunctor p a b)
instance Data.Profunctor.Monad.ProfunctorComonad Data.Functor.Invariant.WrappedProfunctor
instance Data.Profunctor.Monad.ProfunctorFunctor Data.Functor.Invariant.WrappedProfunctor
instance Data.Profunctor.Monad.ProfunctorMonad Data.Functor.Invariant.WrappedProfunctor
instance Data.Profunctor.Unsafe.Profunctor p => Data.Profunctor.Unsafe.Profunctor (Data.Functor.Invariant.WrappedProfunctor p)
instance forall k (f :: k -> *) (a :: k). GHC.Internal.Read.Read (f a) => GHC.Internal.Read.Read (Data.Functor.Invariant.WrappedContravariant f a)
instance forall k (f :: k -> *) (a :: k). GHC.Internal.Read.Read (f a) => GHC.Internal.Read.Read (Data.Functor.Invariant.WrappedFunctor f a)
instance forall k1 k2 (p :: k1 -> k2 -> *) (a :: k1) (b :: k2). GHC.Internal.Read.Read (p a b) => GHC.Internal.Read.Read (Data.Functor.Invariant.WrappedProfunctor p a b)
instance forall k (f :: k -> *) (a :: k). GHC.Internal.Show.Show (f a) => GHC.Internal.Show.Show (Data.Functor.Invariant.WrappedContravariant f a)
instance forall k (f :: k -> *) (a :: k). GHC.Internal.Show.Show (f a) => GHC.Internal.Show.Show (Data.Functor.Invariant.WrappedFunctor f a)
instance forall k1 k2 (p :: k1 -> k2 -> *) (a :: k1) (b :: k2). GHC.Internal.Show.Show (p a b) => GHC.Internal.Show.Show (Data.Functor.Invariant.WrappedProfunctor p a b)
instance Data.Profunctor.Strong.Strong p => Data.Profunctor.Strong.Strong (Data.Functor.Invariant.WrappedProfunctor p)
instance GHC.Internal.Data.Traversable.Traversable f => GHC.Internal.Data.Traversable.Traversable (Data.Functor.Invariant.WrappedFunctor f)
instance Data.Profunctor.Traversing.Traversing p => Data.Profunctor.Traversing.Traversing (Data.Functor.Invariant.WrappedProfunctor p)

-- | Functions to mechanically derive Invariant or Invariant2
--   instances, or to splice invmap or invmap2 into Haskell
--   source code. You need to enable the TemplateHaskell language
--   extension in order to use this module.
module Data.Functor.Invariant.TH

-- | Generates an Invariant instance declaration for the given data
--   type or data family instance.
deriveInvariant :: Name -> Q [Dec]

-- | Like deriveInvariant, but takes an Options argument.
deriveInvariantOptions :: Options -> Name -> Q [Dec]

-- | Generates an Invariant2 instance declaration for the given data
--   type or data family instance.
deriveInvariant2 :: Name -> Q [Dec]

-- | Like deriveInvariant2, but takes an Options argument.
deriveInvariant2Options :: Options -> Name -> Q [Dec]

-- | Generates a lambda expression which behaves like invmap
--   (without requiring an Invariant instance).
makeInvmap :: Name -> Q Exp

-- | Like makeInvmap, but takes an Options argument.
makeInvmapOptions :: Options -> Name -> Q Exp

-- | Generates a lambda expression which behaves like invmap2
--   (without requiring an Invariant2 instance).
makeInvmap2 :: Name -> Q Exp

-- | Like makeInvmap2, but takes an Options argument.
makeInvmap2Options :: Options -> Name -> Q Exp

-- | Options that further configure how the functions in
--   Data.Functor.Invariant.TH should behave.
newtype Options
Options :: Bool -> Options

-- | If True, derived instances for empty data types (i.e., ones
--   with no data constructors) will use the EmptyCase language
--   extension. If False, derived instances will simply use
--   seq instead. (This has no effect on GHCs before 7.8, since
--   EmptyCase is only available in 7.8 or later.)
[emptyCaseBehavior] :: Options -> Bool

-- | Conservative Options that doesn't attempt to use
--   EmptyCase (to prevent users from having to enable that
--   extension at use sites.)
defaultOptions :: Options
instance GHC.Classes.Eq Data.Functor.Invariant.TH.Options
instance GHC.Classes.Ord Data.Functor.Invariant.TH.Options
instance GHC.Internal.Read.Read Data.Functor.Invariant.TH.Options
instance GHC.Internal.Show.Show Data.Functor.Invariant.TH.Options
