lens-5.1: Lenses, Folds and Traversals

Control.Lens.Combinators

Description

This lets the subset of users who vociferously disagree about the full scope and set of operators that should be exported from lens to not have to look at any operator with which they disagree.

import Control.Lens.Combinators
Synopsis

# Documentation

class (Functor t, Foldable t) => Traversable (t :: Type -> Type) where #

Functors representing data structures that can be traversed from left to right.

A definition of traverse must satisfy the following laws:

Naturality
t . traverse f = traverse (t . f) for every applicative transformation t
Identity
traverse Identity = Identity
Composition
traverse (Compose . fmap g . f) = Compose . fmap (traverse g) . traverse f

A definition of sequenceA must satisfy the following laws:

Naturality
t . sequenceA = sequenceA . fmap t for every applicative transformation t
Identity
sequenceA . fmap Identity = Identity
Composition
sequenceA . fmap Compose = Compose . fmap sequenceA . sequenceA

where an applicative transformation is a function

t :: (Applicative f, Applicative g) => f a -> g a

preserving the Applicative operations, i.e.

t (pure x) = pure x
t (f <*> x) = t f <*> t x


and the identity functor Identity and composition functors Compose are from Data.Functor.Identity and Data.Functor.Compose.

A result of the naturality law is a purity law for traverse

traverse pure = pure

(The naturality law is implied by parametricity and thus so is the purity law [1, p15].)

Instances are similar to Functor, e.g. given a data type

data Tree a = Empty | Leaf a | Node (Tree a) a (Tree a)

a suitable instance would be

instance Traversable Tree where
traverse f Empty = pure Empty
traverse f (Leaf x) = Leaf <$> f x traverse f (Node l k r) = Node <$> traverse f l <*> f k <*> traverse f r

This is suitable even for abstract types, as the laws for <*> imply a form of associativity.

The superclass instances should satisfy the following:

• In the Functor instance, fmap should be equivalent to traversal with the identity applicative functor (fmapDefault).
• In the Foldable instance, foldMap should be equivalent to traversal with a constant applicative functor (foldMapDefault).

References: [1] The Essence of the Iterator Pattern, Jeremy Gibbons and Bruno C. d. S. Oliveira

Minimal complete definition

Methods

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

Map each element of a structure to an action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see traverse_.

#### Instances

Instances details

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

The class of contravariant functors.

Whereas in Haskell, one can think of a Functor as containing or producing values, a contravariant functor is a functor that can be thought of as consuming values.

As an example, consider the type of predicate functions a -> Bool. One such predicate might be negative x = x < 0, which classifies integers as to whether they are negative. However, given this predicate, we can re-use it in other situations, providing we have a way to map values to integers. For instance, we can use the negative predicate on a person's bank balance to work out if they are currently overdrawn:

newtype Predicate a = Predicate { getPredicate :: a -> Bool }

instance Contravariant Predicate where
contramap f (Predicate p) = Predicate (p . f)
|   - First, map the input...
----- then apply the predicate.

overdrawn :: Predicate Person
overdrawn = contramap personBankBalance negative


Any instance should be subject to the following laws:

Identity
contramap id = id
Composition
contramap (g . f) = contramap f . contramap g

Note, that the second law follows from the free theorem of the type of contramap and the first law, so you need only check that the former condition holds.

Minimal complete definition

contramap

Methods

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

(>$) :: b -> f b -> f a infixl 4 # Replace all locations in the output with the same value. The default definition is contramap . const, but this may be overridden with a more efficient version. #### Instances Instances details  A Predicate is a Contravariant Functor, because contramap can apply its function argument to the input of the predicate. Instance detailsDefined in Data.Functor.Contravariant Methodscontramap :: (a -> b) -> Predicate b -> Predicate a #(>$) :: b -> Predicate b -> Predicate a # A Comparison is a Contravariant Functor, because contramap can apply its function argument to each input of the comparison function. Instance detailsDefined in Data.Functor.Contravariant Methodscontramap :: (a -> b) -> Comparison b -> Comparison a #(>$) :: b -> Comparison b -> Comparison a # Equivalence relations are Contravariant, because you can apply the contramapped function to each input to the equivalence relation. Instance detailsDefined in Data.Functor.Contravariant Methodscontramap :: (a -> b) -> Equivalence b -> Equivalence a #(>$) :: b -> Equivalence b -> Equivalence a # Contravariant (V1 :: Type -> Type) Instance detailsDefined in Data.Functor.Contravariant Methodscontramap :: (a -> b) -> V1 b -> V1 a #(>$) :: b -> V1 b -> V1 a # Contravariant (U1 :: Type -> Type) Instance detailsDefined in Data.Functor.Contravariant Methodscontramap :: (a -> b) -> U1 b -> U1 a #(>$) :: b -> U1 b -> U1 a # Instance detailsDefined in Data.Functor.Contravariant Methodscontramap :: (a0 -> b) -> Op a b -> Op a a0 #(>$) :: b -> Op a b -> Op a a0 # Instance detailsDefined in Data.Functor.Contravariant Methodscontramap :: (a -> b) -> Proxy b -> Proxy a #(>$) :: b -> Proxy b -> Proxy a # Instance detailsDefined in Control.Monad.Trans.Maybe Methodscontramap :: (a -> b) -> MaybeT m b -> MaybeT m a #(>$) :: b -> MaybeT m b -> MaybeT m a # Instance detailsDefined in Control.Monad.Trans.List Methodscontramap :: (a -> b) -> ListT m b -> ListT m a #(>$) :: b -> ListT m b -> ListT m a # Source # Instance detailsDefined in Control.Lens.Internal.Indexed Methodscontramap :: (a -> b) -> Indexing64 f b -> Indexing64 f a #(>$) :: b -> Indexing64 f b -> Indexing64 f a # Source # Instance detailsDefined in Control.Lens.Internal.Indexed Methodscontramap :: (a -> b) -> Indexing f b -> Indexing f a #(>$) :: b -> Indexing f b -> Indexing f a # Instance detailsDefined in Data.Functor.Contravariant Methodscontramap :: (a -> b) -> Rec1 f b -> Rec1 f a #(>$) :: b -> Rec1 f b -> Rec1 f a # Contravariant (Const a :: Type -> Type) Instance detailsDefined in Data.Functor.Contravariant Methodscontramap :: (a0 -> b) -> Const a b -> Const a a0 #(>$) :: b -> Const a b -> Const a a0 # Instance detailsDefined in Data.Functor.Contravariant Methodscontramap :: (a -> b) -> Alt f b -> Alt f a #(>$) :: b -> Alt f b -> Alt f a # Instance detailsDefined in Control.Monad.Trans.Identity Methodscontramap :: (a -> b) -> IdentityT f b -> IdentityT f a #(>$) :: b -> IdentityT f b -> IdentityT f a # (Functor f, Contravariant g) => Contravariant (ComposeFC f g) Instance detailsDefined in Data.Functor.Contravariant.Compose Methodscontramap :: (a -> b) -> ComposeFC f g b -> ComposeFC f g a #(>$) :: b -> ComposeFC f g b -> ComposeFC f g a # (Contravariant f, Functor g) => Contravariant (ComposeCF f g) Instance detailsDefined in Data.Functor.Contravariant.Compose Methodscontramap :: (a -> b) -> ComposeCF f g b -> ComposeCF f g a #(>$) :: b -> ComposeCF f g b -> ComposeCF f g a # Contravariant m => Contravariant (ExceptT e m) Instance detailsDefined in Control.Monad.Trans.Except Methodscontramap :: (a -> b) -> ExceptT e m b -> ExceptT e m a #(>$) :: b -> ExceptT e m b -> ExceptT e m a # Contravariant m => Contravariant (ErrorT e m) Instance detailsDefined in Control.Monad.Trans.Error Methodscontramap :: (a -> b) -> ErrorT e m b -> ErrorT e m a #(>$) :: b -> ErrorT e m b -> ErrorT e m a # Contravariant m => Contravariant (ReaderT r m) Instance detailsDefined in Control.Monad.Trans.Reader Methodscontramap :: (a -> b) -> ReaderT r m b -> ReaderT r m a #(>$) :: b -> ReaderT r m b -> ReaderT r m a # Contravariant m => Contravariant (StateT s m) Instance detailsDefined in Control.Monad.Trans.State.Lazy Methodscontramap :: (a -> b) -> StateT s m b -> StateT s m a #(>$) :: b -> StateT s m b -> StateT s m a # Contravariant m => Contravariant (StateT s m) Instance detailsDefined in Control.Monad.Trans.State.Strict Methodscontramap :: (a -> b) -> StateT s m b -> StateT s m a #(>$) :: b -> StateT s m b -> StateT s m a # Contravariant m => Contravariant (WriterT w m) Instance detailsDefined in Control.Monad.Trans.Writer.Lazy Methodscontramap :: (a -> b) -> WriterT w m b -> WriterT w m a #(>$) :: b -> WriterT w m b -> WriterT w m a # Contravariant m => Contravariant (WriterT w m) Instance detailsDefined in Control.Monad.Trans.Writer.Strict Methodscontramap :: (a -> b) -> WriterT w m b -> WriterT w m a #(>$) :: b -> WriterT w m b -> WriterT w m a # Contravariant (Constant a :: Type -> Type) Instance detailsDefined in Data.Functor.Constant Methodscontramap :: (a0 -> b) -> Constant a b -> Constant a a0 #(>$) :: b -> Constant a b -> Constant a a0 # Derived instance. Instance detailsDefined in Data.Functor.Reverse Methodscontramap :: (a -> b) -> Reverse f b -> Reverse f a #(>$) :: b -> Reverse f b -> Reverse f a # Derived instance. Instance detailsDefined in Control.Applicative.Backwards Methodscontramap :: (a -> b) -> Backwards f b -> Backwards f a #(>$) :: b -> Backwards f b -> Backwards f a # Source # Instance detailsDefined in Control.Lens.Internal.Getter Methodscontramap :: (a0 -> b) -> AlongsideRight f a b -> AlongsideRight f a a0 #(>$) :: b -> AlongsideRight f a b -> AlongsideRight f a a0 # Source # Instance detailsDefined in Control.Lens.Internal.Getter Methodscontramap :: (a -> b0) -> AlongsideLeft f b b0 -> AlongsideLeft f b a #(>$) :: b0 -> AlongsideLeft f b b0 -> AlongsideLeft f b a # Contravariant (Effect m r) Source # Instance detailsDefined in Control.Lens.Internal.Zoom Methodscontramap :: (a -> b) -> Effect m r b -> Effect m r a #(>$) :: b -> Effect m r b -> Effect m r a # Contravariant (K1 i c :: Type -> Type) Instance detailsDefined in Data.Functor.Contravariant Methodscontramap :: (a -> b) -> K1 i c b -> K1 i c a #(>$) :: b -> K1 i c b -> K1 i c a # (Contravariant f, Contravariant g) => Contravariant (f :+: g) Instance detailsDefined in Data.Functor.Contravariant Methodscontramap :: (a -> b) -> (f :+: g) b -> (f :+: g) a #(>$) :: b -> (f :+: g) b -> (f :+: g) a # (Contravariant f, Contravariant g) => Contravariant (f :*: g) Instance detailsDefined in Data.Functor.Contravariant Methodscontramap :: (a -> b) -> (f :*: g) b -> (f :*: g) a #(>$) :: b -> (f :*: g) b -> (f :*: g) a # (Contravariant f, Contravariant g) => Contravariant (Product f g) Instance detailsDefined in Data.Functor.Contravariant Methodscontramap :: (a -> b) -> Product f g b -> Product f g a #(>$) :: b -> Product f g b -> Product f g a # (Contravariant f, Contravariant g) => Contravariant (Sum f g) Instance detailsDefined in Data.Functor.Contravariant Methodscontramap :: (a -> b) -> Sum f g b -> Sum f g a #(>$) :: b -> Sum f g b -> Sum f g a # Contravariant f => Contravariant (Star f a) Instance detailsDefined in Data.Profunctor.Types Methodscontramap :: (a0 -> b) -> Star f a b -> Star f a a0 #(>$) :: b -> Star f a b -> Star f a a0 # Contravariant (Forget r a :: Type -> Type) Instance detailsDefined in Data.Profunctor.Types Methodscontramap :: (a0 -> b) -> Forget r a b -> Forget r a a0 #(>$) :: b -> Forget r a b -> Forget r a a0 # Contravariant f => Contravariant (M1 i c f) Instance detailsDefined in Data.Functor.Contravariant Methodscontramap :: (a -> b) -> M1 i c f b -> M1 i c f a #(>$) :: b -> M1 i c f b -> M1 i c f a # (Functor f, Contravariant g) => Contravariant (f :.: g) Instance detailsDefined in Data.Functor.Contravariant Methodscontramap :: (a -> b) -> (f :.: g) b -> (f :.: g) a #(>$) :: b -> (f :.: g) b -> (f :.: g) a # (Functor f, Contravariant g) => Contravariant (Compose f g) Instance detailsDefined in Data.Functor.Contravariant Methodscontramap :: (a -> b) -> Compose f g b -> Compose f g a #(>$) :: b -> Compose f g b -> Compose f g a # Contravariant m => Contravariant (RWST r w s m) Instance detailsDefined in Control.Monad.Trans.RWS.Lazy Methodscontramap :: (a -> b) -> RWST r w s m b -> RWST r w s m a #(>$) :: b -> RWST r w s m b -> RWST r w s m a # Contravariant m => Contravariant (RWST r w s m) Instance detailsDefined in Control.Monad.Trans.RWS.Strict Methodscontramap :: (a -> b) -> RWST r w s m b -> RWST r w s m a #(>$) :: b -> RWST r w s m b -> RWST r w s m a # (Profunctor p, Contravariant g) => Contravariant (PretextT p g a b) Source # Instance detailsDefined in Control.Lens.Internal.Context Methodscontramap :: (a0 -> b0) -> PretextT p g a b b0 -> PretextT p g a b a0 #(>$) :: b0 -> PretextT p g a b b0 -> PretextT p g a b a0 # (Profunctor p, Contravariant g) => Contravariant (BazaarT1 p g a b) Source # Instance detailsDefined in Control.Lens.Internal.Bazaar Methodscontramap :: (a0 -> b0) -> BazaarT1 p g a b b0 -> BazaarT1 p g a b a0 #(>$) :: b0 -> BazaarT1 p g a b b0 -> BazaarT1 p g a b a0 # (Profunctor p, Contravariant g) => Contravariant (BazaarT p g a b) Source # Instance detailsDefined in Control.Lens.Internal.Bazaar Methodscontramap :: (a0 -> b0) -> BazaarT p g a b b0 -> BazaarT p g a b a0 #(>$) :: b0 -> BazaarT p g a b b0 -> BazaarT p g a b a0 # Contravariant f => Contravariant (TakingWhile p f a b) Source # Instance detailsDefined in Control.Lens.Internal.Magma Methodscontramap :: (a0 -> b0) -> TakingWhile p f a b b0 -> TakingWhile p f a b a0 #(>$) :: b0 -> TakingWhile p f a b b0 -> TakingWhile p f a b a0 # Contravariant (EffectRWS w st m s) Source # Instance detailsDefined in Control.Lens.Internal.Zoom Methodscontramap :: (a -> b) -> EffectRWS w st m s b -> EffectRWS w st m s a #(>$) :: b -> EffectRWS w st m s b -> EffectRWS w st m s a #

class Bifunctor (p :: Type -> Type -> Type) where #

A bifunctor is a type constructor that takes two type arguments and is a functor in both arguments. That is, unlike with Functor, a type constructor such as Either does not need to be partially applied for a Bifunctor instance, and the methods in this class permit mapping functions over the Left value or the Right value, or both at the same time.

Formally, the class Bifunctor represents a bifunctor from Hask -> Hask.

Intuitively it is a bifunctor where both the first and second arguments are covariant.

You can define a Bifunctor by either defining bimap or by defining both first and second.

If you supply bimap, you should ensure that:

bimap id id ≡ id

If you supply first and second, ensure:

first id ≡ id
second id ≡ id


If you supply both, you should also ensure:

bimap f g ≡ first f . second g

These ensure by parametricity:

bimap  (f . g) (h . i) ≡ bimap f h . bimap g i
first  (f . g) ≡ first  f . first  g
second (f . g) ≡ second f . second g


Since: base-4.8.0.0

Minimal complete definition

Methods

bimap :: (a -> b) -> (c -> d) -> p a c -> p b d #

Map over both arguments at the same time.

bimap f g ≡ first f . second g

#### Examples

Expand
>>> bimap toUpper (+1) ('j', 3)
('J',4)

>>> bimap toUpper (+1) (Left 'j')
Left 'J'

>>> bimap toUpper (+1) (Right 3)
Right 4


#### Instances

Instances details
 Since: base-4.8.0.0 Instance detailsDefined in Data.Bifunctor Methodsbimap :: (a -> b) -> (c -> d) -> Either a c -> Either b d #first :: (a -> b) -> Either a c -> Either b c #second :: (b -> c) -> Either a b -> Either a c # Since: base-4.8.0.0 Instance detailsDefined in Data.Bifunctor Methodsbimap :: (a -> b) -> (c -> d) -> (a, c) -> (b, d) #first :: (a -> b) -> (a, c) -> (b, c) #second :: (b -> c) -> (a, b) -> (a, c) # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodsbimap :: (a -> b) -> (c -> d) -> Arg a c -> Arg b d #first :: (a -> b) -> Arg a c -> Arg b c #second :: (b -> c) -> Arg a b -> Arg a c # Instance detailsDefined in Data.Strict.Tuple Methodsbimap :: (a -> b) -> (c -> d) -> Pair a c -> Pair b d #first :: (a -> b) -> Pair a c -> Pair b c #second :: (b -> c) -> Pair a b -> Pair a c # Instance detailsDefined in Data.Strict.These Methodsbimap :: (a -> b) -> (c -> d) -> These a c -> These b d #first :: (a -> b) -> These a c -> These b c #second :: (b -> c) -> These a b -> These a c # Instance detailsDefined in Data.Strict.Either Methodsbimap :: (a -> b) -> (c -> d) -> Either a c -> Either b d #first :: (a -> b) -> Either a c -> Either b c #second :: (b -> c) -> Either a b -> Either a c # Instance detailsDefined in Data.These Methodsbimap :: (a -> b) -> (c -> d) -> These a c -> These b d #first :: (a -> b) -> These a c -> These b c #second :: (b -> c) -> These a b -> These a c # Bifunctor ((,,) x1) Since: base-4.8.0.0 Instance detailsDefined in Data.Bifunctor Methodsbimap :: (a -> b) -> (c -> d) -> (x1, a, c) -> (x1, b, d) #first :: (a -> b) -> (x1, a, c) -> (x1, b, c) #second :: (b -> c) -> (x1, a, b) -> (x1, a, c) # Bifunctor (Const :: Type -> Type -> Type) Since: base-4.8.0.0 Instance detailsDefined in Data.Bifunctor Methodsbimap :: (a -> b) -> (c -> d) -> Const a c -> Const b d #first :: (a -> b) -> Const a c -> Const b c #second :: (b -> c) -> Const a b -> Const a c # Functor f => Bifunctor (FreeF f) Instance detailsDefined in Control.Monad.Trans.Free Methodsbimap :: (a -> b) -> (c -> d) -> FreeF f a c -> FreeF f b d #first :: (a -> b) -> FreeF f a c -> FreeF f b c #second :: (b -> c) -> FreeF f a b -> FreeF f a c # Functor f => Bifunctor (CofreeF f) Instance detailsDefined in Control.Comonad.Trans.Cofree Methodsbimap :: (a -> b) -> (c -> d) -> CofreeF f a c -> CofreeF f b d #first :: (a -> b) -> CofreeF f a c -> CofreeF f b c #second :: (b -> c) -> CofreeF f a b -> CofreeF f a c # Bifunctor (Constant :: Type -> Type -> Type) Instance detailsDefined in Data.Functor.Constant Methodsbimap :: (a -> b) -> (c -> d) -> Constant a c -> Constant b d #first :: (a -> b) -> Constant a c -> Constant b c #second :: (b -> c) -> Constant a b -> Constant a c # Bifunctor (Tagged :: Type -> Type -> Type) Instance detailsDefined in Data.Tagged Methodsbimap :: (a -> b) -> (c -> d) -> Tagged a c -> Tagged b d #first :: (a -> b) -> Tagged a c -> Tagged b c #second :: (b -> c) -> Tagged a b -> Tagged a c # Source # Instance detailsDefined in Control.Lens.Internal.Getter Methodsbimap :: (a -> b) -> (c -> d) -> AlongsideRight f a c -> AlongsideRight f b d #first :: (a -> b) -> AlongsideRight f a c -> AlongsideRight f b c #second :: (b -> c) -> AlongsideRight f a b -> AlongsideRight f a c # Source # Instance detailsDefined in Control.Lens.Internal.Getter Methodsbimap :: (a -> b) -> (c -> d) -> AlongsideLeft f a c -> AlongsideLeft f b d #first :: (a -> b) -> AlongsideLeft f a c -> AlongsideLeft f b c #second :: (b -> c) -> AlongsideLeft f a b -> AlongsideLeft f a c # Bifunctor (K1 i :: Type -> Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Bifunctor Methodsbimap :: (a -> b) -> (c -> d) -> K1 i a c -> K1 i b d #first :: (a -> b) -> K1 i a c -> K1 i b c #second :: (b -> c) -> K1 i a b -> K1 i a c # Bifunctor ((,,,) x1 x2) Since: base-4.8.0.0 Instance detailsDefined in Data.Bifunctor Methodsbimap :: (a -> b) -> (c -> d) -> (x1, x2, a, c) -> (x1, x2, b, d) #first :: (a -> b) -> (x1, x2, a, c) -> (x1, x2, b, c) #second :: (b -> c) -> (x1, x2, a, b) -> (x1, x2, a, c) # Bifunctor ((,,,,) x1 x2 x3) Since: base-4.8.0.0 Instance detailsDefined in Data.Bifunctor Methodsbimap :: (a -> b) -> (c -> d) -> (x1, x2, x3, a, c) -> (x1, x2, x3, b, d) #first :: (a -> b) -> (x1, x2, x3, a, c) -> (x1, x2, x3, b, c) #second :: (b -> c) -> (x1, x2, x3, a, b) -> (x1, x2, x3, a, c) # Instance detailsDefined in Data.Bifunctor.Wrapped Methodsbimap :: (a -> b) -> (c -> d) -> WrappedBifunctor p a c -> WrappedBifunctor p b d #first :: (a -> b) -> WrappedBifunctor p a c -> WrappedBifunctor p b c #second :: (b -> c) -> WrappedBifunctor p a b -> WrappedBifunctor p a c # Functor g => Bifunctor (Joker g :: Type -> Type -> Type) Instance detailsDefined in Data.Bifunctor.Joker Methodsbimap :: (a -> b) -> (c -> d) -> Joker g a c -> Joker g b d #first :: (a -> b) -> Joker g a c -> Joker g b c #second :: (b -> c) -> Joker g a b -> Joker g a c # Bifunctor p => Bifunctor (Flip p) Instance detailsDefined in Data.Bifunctor.Flip Methodsbimap :: (a -> b) -> (c -> d) -> Flip p a c -> Flip p b d #first :: (a -> b) -> Flip p a c -> Flip p b c #second :: (b -> c) -> Flip p a b -> Flip p a c # Functor f => Bifunctor (Clown f :: Type -> Type -> Type) Instance detailsDefined in Data.Bifunctor.Clown Methodsbimap :: (a -> b) -> (c -> d) -> Clown f a c -> Clown f b d #first :: (a -> b) -> Clown f a c -> Clown f b c #second :: (b -> c) -> Clown f a b -> Clown f a c # Bifunctor ((,,,,,) x1 x2 x3 x4) Since: base-4.8.0.0 Instance detailsDefined in Data.Bifunctor Methodsbimap :: (a -> b) -> (c -> d) -> (x1, x2, x3, x4, a, c) -> (x1, x2, x3, x4, b, d) #first :: (a -> b) -> (x1, x2, x3, x4, a, c) -> (x1, x2, x3, x4, b, c) #second :: (b -> c) -> (x1, x2, x3, x4, a, b) -> (x1, x2, x3, x4, a, c) # (Bifunctor p, Bifunctor q) => Bifunctor (Sum p q) Instance detailsDefined in Data.Bifunctor.Sum Methodsbimap :: (a -> b) -> (c -> d) -> Sum p q a c -> Sum p q b d #first :: (a -> b) -> Sum p q a c -> Sum p q b c #second :: (b -> c) -> Sum p q a b -> Sum p q a c # (Bifunctor f, Bifunctor g) => Bifunctor (Product f g) Instance detailsDefined in Data.Bifunctor.Product Methodsbimap :: (a -> b) -> (c -> d) -> Product f g a c -> Product f g b d #first :: (a -> b) -> Product f g a c -> Product f g b c #second :: (b -> c) -> Product f g a b -> Product f g a c # Bifunctor ((,,,,,,) x1 x2 x3 x4 x5) Since: base-4.8.0.0 Instance detailsDefined in Data.Bifunctor Methodsbimap :: (a -> b) -> (c -> d) -> (x1, x2, x3, x4, x5, a, c) -> (x1, x2, x3, x4, x5, b, d) #first :: (a -> b) -> (x1, x2, x3, x4, x5, a, c) -> (x1, x2, x3, x4, x5, b, c) #second :: (b -> c) -> (x1, x2, x3, x4, x5, a, b) -> (x1, x2, x3, x4, x5, a, c) # (Functor f, Bifunctor p) => Bifunctor (Tannen f p) Instance detailsDefined in Data.Bifunctor.Tannen Methodsbimap :: (a -> b) -> (c -> d) -> Tannen f p a c -> Tannen f p b d #first :: (a -> b) -> Tannen f p a c -> Tannen f p b c #second :: (b -> c) -> Tannen f p a b -> Tannen f p a c # (Bifunctor p, Functor f, Functor g) => Bifunctor (Biff p f g) Instance detailsDefined in Data.Bifunctor.Biff Methodsbimap :: (a -> b) -> (c -> d) -> Biff p f g a c -> Biff p f g b d #first :: (a -> b) -> Biff p f g a c -> Biff p f g b c #second :: (b -> c) -> Biff p f g a b -> Biff p f g a c #

newtype Identity a #

Since: base-4.8.0.0

Constructors

 Identity FieldsrunIdentity :: a

#### Instances

Instances details
 Since: base-4.8.0.0 Instance detailsDefined in Data.Functor.Identity Methods(>>=) :: Identity a -> (a -> Identity b) -> Identity b #(>>) :: Identity a -> Identity b -> Identity b #return :: a -> Identity a # Since: base-4.8.0.0 Instance detailsDefined in Data.Functor.Identity Methodsfmap :: (a -> b) -> Identity a -> Identity b #(<) :: a -> Identity b -> Identity a # Since: base-4.8.0.0 Instance detailsDefined in Data.Functor.Identity Methodsmfix :: (a -> Identity a) -> Identity a # Since: base-4.8.0.0 Instance detailsDefined in Data.Functor.Identity Methodspure :: a -> Identity a #(<*>) :: Identity (a -> b) -> Identity a -> Identity b #liftA2 :: (a -> b -> c) -> Identity a -> Identity b -> Identity c #(*>) :: Identity a -> Identity b -> Identity b #(<*) :: Identity a -> Identity b -> Identity a # Since: base-4.8.0.0 Instance detailsDefined in Data.Functor.Identity Methodsfold :: Monoid m => Identity m -> m #foldMap :: Monoid m => (a -> m) -> Identity a -> m #foldMap' :: Monoid m => (a -> m) -> Identity a -> m #foldr :: (a -> b -> b) -> b -> Identity a -> b #foldr' :: (a -> b -> b) -> b -> Identity a -> b #foldl :: (b -> a -> b) -> b -> Identity a -> b #foldl' :: (b -> a -> b) -> b -> Identity a -> b #foldr1 :: (a -> a -> a) -> Identity a -> a #foldl1 :: (a -> a -> a) -> Identity a -> a #toList :: Identity a -> [a] #null :: Identity a -> Bool #length :: Identity a -> Int #elem :: Eq a => a -> Identity a -> Bool #maximum :: Ord a => Identity a -> a #minimum :: Ord a => Identity a -> a #sum :: Num a => Identity a -> a #product :: Num a => Identity a -> a # Since: base-4.9.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> Identity a -> f (Identity b) #sequenceA :: Applicative f => Identity (f a) -> f (Identity a) #mapM :: Monad m => (a -> m b) -> Identity a -> m (Identity b) #sequence :: Monad m => Identity (m a) -> m (Identity a) # Instance detailsDefined in Data.Distributive Methodsdistribute :: Functor f => f (Identity a) -> Identity (f a) #collect :: Functor f => (a -> Identity b) -> f a -> Identity (f b) #distributeM :: Monad m => m (Identity a) -> Identity (m a) #collectM :: Monad m => (a -> Identity b) -> m a -> Identity (m b) # Instance detailsDefined in Data.Functor.Rep Associated Typestype Rep Identity # Methodstabulate :: (Rep Identity -> a) -> Identity a #index :: Identity a -> Rep Identity -> a # Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftEq :: (a -> b -> Bool) -> Identity a -> Identity b -> Bool # Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftCompare :: (a -> b -> Ordering) -> Identity a -> Identity b -> Ordering # Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Identity a) #liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Identity a] #liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Identity a) #liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Identity a] # Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Identity a -> ShowS #liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Identity a] -> ShowS # Instance detailsDefined in Control.Comonad Methodsextract :: Identity a -> a #duplicate :: Identity a -> Identity (Identity a) #extend :: (Identity a -> b) -> Identity a -> Identity b # Instance detailsDefined in Control.Comonad Methods(<@>) :: Identity (a -> b) -> Identity a -> Identity b #(@>) :: Identity a -> Identity b -> Identity b #(<@) :: Identity a -> Identity b -> Identity a # Since: deepseq-1.4.3.0 Instance detailsDefined in Control.DeepSeq MethodsliftRnf :: (a -> ()) -> Identity a -> () # Instance detailsDefined in Data.Hashable.Class MethodsliftHashWithSalt :: (Int -> a -> Int) -> Int -> Identity a -> Int # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f => (a -> f b) -> Identity a -> f (Identity b) #sequence1 :: Apply f => Identity (f b) -> f (Identity b) # Choose the first option every time. While 'choose the last option' every time is also valid, this instance satisfies more laws.Since: semigroupoids-5.3.6 Instance detailsDefined in Data.Functor.Alt Methods() :: Identity a -> Identity a -> Identity a #some :: Applicative Identity => Identity a -> Identity [a] #many :: Applicative Identity => Identity a -> Identity [a] # Instance detailsDefined in Data.Functor.Bind.Class Methods(<.>) :: Identity (a -> b) -> Identity a -> Identity b #(.>) :: Identity a -> Identity b -> Identity b #(<.) :: Identity a -> Identity b -> Identity a #liftF2 :: (a -> b -> c) -> Identity a -> Identity b -> Identity c # Instance detailsDefined in Data.Functor.Bind.Class Methods(>>-) :: Identity a -> (a -> Identity b) -> Identity b #join :: Identity (Identity a) -> Identity a # Instance detailsDefined in Data.Semigroup.Foldable.Class Methodsfold1 :: Semigroup m => Identity m -> m #foldMap1 :: Semigroup m => (a -> m) -> Identity a -> m #toNonEmpty :: Identity a -> NonEmpty a # Instance detailsDefined in Data.Functor.Extend Methodsduplicated :: Identity a -> Identity (Identity a) #extended :: (Identity a -> b) -> Identity a -> Identity b # Source # So you can pass our Setter into combinators from other lens libraries. Instance detailsDefined in Control.Lens.Internal.Setter Methodsuntainted :: Identity a -> a Source #untaintedDot :: Profunctor p => p a (Identity b) -> p a b Source #taintedDot :: Profunctor p => p a b -> p a (Identity b) Source # Instance detailsDefined in WithIndex Methodsimap :: (() -> a -> b) -> Identity a -> Identity b # Instance detailsDefined in WithIndex MethodsifoldMap :: Monoid m => (() -> a -> m) -> Identity a -> m #ifoldMap' :: Monoid m => (() -> a -> m) -> Identity a -> m #ifoldr :: (() -> a -> b -> b) -> b -> Identity a -> b #ifoldl :: (() -> b -> a -> b) -> b -> Identity a -> b #ifoldr' :: (() -> a -> b -> b) -> b -> Identity a -> b #ifoldl' :: (() -> b -> a -> b) -> b -> Identity a -> b # Instance detailsDefined in WithIndex Methodsitraverse :: Applicative f => (() -> a -> f b) -> Identity a -> f (Identity b) # Source # Instance detailsDefined in Control.Lens.Reified Methodssieve :: ReifiedGetter a b -> a -> Identity b # Source # Instance detailsDefined in Control.Lens.Reified Methodscosieve :: ReifiedGetter a b -> Identity a -> b # Monad m => MonadFree Identity (IterT m) Instance detailsDefined in Control.Monad.Trans.Iter Methodswrap :: Identity (IterT m a) -> IterT m a # Instance detailsDefined in Control.Comonad.Trans.Coiter Methodsunwrap :: CoiterT w a -> Identity (CoiterT w a) # Unbox a => Vector Vector (Identity a) Instance detailsDefined in Data.Vector.Unboxed.Base MethodsbasicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Identity a) -> m (Vector (Identity a)) #basicUnsafeThaw :: PrimMonad m => Vector (Identity a) -> m (Mutable Vector (PrimState m) (Identity a)) #basicLength :: Vector (Identity a) -> Int #basicUnsafeSlice :: Int -> Int -> Vector (Identity a) -> Vector (Identity a) #basicUnsafeIndexM :: Monad m => Vector (Identity a) -> Int -> m (Identity a) #basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Identity a) -> Vector (Identity a) -> m () #elemseq :: Vector (Identity a) -> Identity a -> b -> b # Unbox a => MVector MVector (Identity a) Instance detailsDefined in Data.Vector.Unboxed.Base MethodsbasicLength :: MVector s (Identity a) -> Int #basicUnsafeSlice :: Int -> Int -> MVector s (Identity a) -> MVector s (Identity a) #basicOverlaps :: MVector s (Identity a) -> MVector s (Identity a) -> Bool #basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (Identity a)) #basicInitialize :: PrimMonad m => MVector (PrimState m) (Identity a) -> m () #basicUnsafeReplicate :: PrimMonad m => Int -> Identity a -> m (MVector (PrimState m) (Identity a)) #basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Identity a) -> Int -> m (Identity a) #basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Identity a) -> Int -> Identity a -> m () #basicClear :: PrimMonad m => MVector (PrimState m) (Identity a) -> m () #basicSet :: PrimMonad m => MVector (PrimState m) (Identity a) -> Identity a -> m () #basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Identity a) -> MVector (PrimState m) (Identity a) -> m () #basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Identity a) -> MVector (PrimState m) (Identity a) -> m () #basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Identity a) -> Int -> m (MVector (PrimState m) (Identity a)) # Bounded a => Bounded (Identity a) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Identity Methods Enum a => Enum (Identity a) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Identity Methodssucc :: Identity a -> Identity a #pred :: Identity a -> Identity a #toEnum :: Int -> Identity a #fromEnum :: Identity a -> Int #enumFrom :: Identity a -> [Identity a] #enumFromThen :: Identity a -> Identity a -> [Identity a] #enumFromTo :: Identity a -> Identity a -> [Identity a] #enumFromThenTo :: Identity a -> Identity a -> Identity a -> [Identity a] # Eq a => Eq (Identity a) Since: base-4.8.0.0 Instance detailsDefined in Data.Functor.Identity Methods(==) :: Identity a -> Identity a -> Bool #(/=) :: Identity a -> Identity a -> Bool # Floating a => Floating (Identity a) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Identity Methodspi :: Identity a #exp :: Identity a -> Identity a #log :: Identity a -> Identity a #sqrt :: Identity a -> Identity a #(**) :: Identity a -> Identity a -> Identity a #logBase :: Identity a -> Identity a -> Identity a #sin :: Identity a -> Identity a #cos :: Identity a -> Identity a #tan :: Identity a -> Identity a #asin :: Identity a -> Identity a #acos :: Identity a -> Identity a #atan :: Identity a -> Identity a #sinh :: Identity a -> Identity a #cosh :: Identity a -> Identity a #tanh :: Identity a -> Identity a #asinh :: Identity a -> Identity a #acosh :: Identity a -> Identity a #atanh :: Identity a -> Identity a #log1p :: Identity a -> Identity a #expm1 :: Identity a -> Identity a #log1pexp :: Identity a -> Identity a #log1mexp :: Identity a -> Identity a # Fractional a => Fractional (Identity a) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Identity Methods(/) :: Identity a -> Identity a -> Identity a #recip :: Identity a -> Identity a # Integral a => Integral (Identity a) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Identity Methodsquot :: Identity a -> Identity a -> Identity a #rem :: Identity a -> Identity a -> Identity a #div :: Identity a -> Identity a -> Identity a #mod :: Identity a -> Identity a -> Identity a #quotRem :: Identity a -> Identity a -> (Identity a, Identity a) #divMod :: Identity a -> Identity a -> (Identity a, Identity a) # Data a => Data (Identity a) Since: base-4.9.0.0 Instance detailsDefined in Data.Data Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Identity a -> c (Identity a) #gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Identity a) #toConstr :: Identity a -> Constr #dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Identity a)) #dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Identity a)) #gmapT :: (forall b. Data b => b -> b) -> Identity a -> Identity a #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Identity a -> r #gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Identity a -> r #gmapQ :: (forall d. Data d => d -> u) -> Identity a -> [u] #gmapQi :: Int -> (forall d. Data d => d -> u) -> Identity a -> u #gmapM :: Monad m => (forall d. Data d => d -> m d) -> Identity a -> m (Identity a) #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Identity a -> m (Identity a) #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Identity a -> m (Identity a) # Num a => Num (Identity a) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Identity Methods(+) :: Identity a -> Identity a -> Identity a #(-) :: Identity a -> Identity a -> Identity a #(*) :: Identity a -> Identity a -> Identity a #negate :: Identity a -> Identity a #abs :: Identity a -> Identity a #signum :: Identity a -> Identity a # Ord a => Ord (Identity a) Since: base-4.8.0.0 Instance detailsDefined in Data.Functor.Identity Methodscompare :: Identity a -> Identity a -> Ordering #(<) :: Identity a -> Identity a -> Bool #(<=) :: Identity a -> Identity a -> Bool #(>) :: Identity a -> Identity a -> Bool #(>=) :: Identity a -> Identity a -> Bool #max :: Identity a -> Identity a -> Identity a #min :: Identity a -> Identity a -> Identity a # Read a => Read (Identity a) This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removedSince: base-4.8.0.0 Instance detailsDefined in Data.Functor.Identity MethodsreadsPrec :: Int -> ReadS (Identity a) # Real a => Real (Identity a) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Identity Methods RealFloat a => RealFloat (Identity a) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Identity MethodsfloatDigits :: Identity a -> Int #floatRange :: Identity a -> (Int, Int) #decodeFloat :: Identity a -> (Integer, Int) #exponent :: Identity a -> Int #significand :: Identity a -> Identity a #scaleFloat :: Int -> Identity a -> Identity a #isNaN :: Identity a -> Bool #isInfinite :: Identity a -> Bool #isIEEE :: Identity a -> Bool #atan2 :: Identity a -> Identity a -> Identity a # RealFrac a => RealFrac (Identity a) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Identity MethodsproperFraction :: Integral b => Identity a -> (b, Identity a) #truncate :: Integral b => Identity a -> b #round :: Integral b => Identity a -> b #ceiling :: Integral b => Identity a -> b #floor :: Integral b => Identity a -> b # Show a => Show (Identity a) This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removedSince: base-4.8.0.0 Instance detailsDefined in Data.Functor.Identity MethodsshowsPrec :: Int -> Identity a -> ShowS #show :: Identity a -> String #showList :: [Identity a] -> ShowS # Ix a => Ix (Identity a) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Identity Methodsrange :: (Identity a, Identity a) -> [Identity a] #index :: (Identity a, Identity a) -> Identity a -> Int #unsafeIndex :: (Identity a, Identity a) -> Identity a -> Int #inRange :: (Identity a, Identity a) -> Identity a -> Bool #rangeSize :: (Identity a, Identity a) -> Int #unsafeRangeSize :: (Identity a, Identity a) -> Int # Since: base-4.8.0.0 Instance detailsDefined in Data.Functor.Identity Associated Typestype Rep (Identity a) :: Type -> Type # Methodsfrom :: Identity a -> Rep (Identity a) x #to :: Rep (Identity a) x -> Identity a # Semigroup a => Semigroup (Identity a) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Identity Methods(<>) :: Identity a -> Identity a -> Identity a #sconcat :: NonEmpty (Identity a) -> Identity a #stimes :: Integral b => b -> Identity a -> Identity a # Monoid a => Monoid (Identity a) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Identity Methodsmappend :: Identity a -> Identity a -> Identity a #mconcat :: [Identity a] -> Identity a # Storable a => Storable (Identity a) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Identity MethodssizeOf :: Identity a -> Int #alignment :: Identity a -> Int #peekElemOff :: Ptr (Identity a) -> Int -> IO (Identity a) #pokeElemOff :: Ptr (Identity a) -> Int -> Identity a -> IO () #peekByteOff :: Ptr b -> Int -> IO (Identity a) #pokeByteOff :: Ptr b -> Int -> Identity a -> IO () #peek :: Ptr (Identity a) -> IO (Identity a) #poke :: Ptr (Identity a) -> Identity a -> IO () # Bits a => Bits (Identity a) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Identity Methods(.&.) :: Identity a -> Identity a -> Identity a #(.|.) :: Identity a -> Identity a -> Identity a #xor :: Identity a -> Identity a -> Identity a #complement :: Identity a -> Identity a #shift :: Identity a -> Int -> Identity a #rotate :: Identity a -> Int -> Identity a #bit :: Int -> Identity a #setBit :: Identity a -> Int -> Identity a #clearBit :: Identity a -> Int -> Identity a #complementBit :: Identity a -> Int -> Identity a #testBit :: Identity a -> Int -> Bool #bitSize :: Identity a -> Int #isSigned :: Identity a -> Bool #shiftL :: Identity a -> Int -> Identity a #unsafeShiftL :: Identity a -> Int -> Identity a #shiftR :: Identity a -> Int -> Identity a #unsafeShiftR :: Identity a -> Int -> Identity a #rotateL :: Identity a -> Int -> Identity a #rotateR :: Identity a -> Int -> Identity a #popCount :: Identity a -> Int # FiniteBits a => FiniteBits (Identity a) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Identity Methods NFData a => NFData (Identity a) Since: deepseq-1.4.0.0 Instance detailsDefined in Control.DeepSeq Methodsrnf :: Identity a -> () # Hashable a => Hashable (Identity a) Instance detailsDefined in Data.Hashable.Class MethodshashWithSalt :: Int -> Identity a -> Int #hash :: Identity a -> Int # Prim a => Prim (Identity a) Since: primitive-0.6.5.0 Instance detailsDefined in Data.Primitive.Types MethodssizeOf# :: Identity a -> Int# #alignment# :: Identity a -> Int# #readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, Identity a #) #writeByteArray# :: MutableByteArray# s -> Int# -> Identity a -> State# s -> State# s #setByteArray# :: MutableByteArray# s -> Int# -> Int# -> Identity a -> State# s -> State# s #readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, Identity a #) #writeOffAddr# :: Addr# -> Int# -> Identity a -> State# s -> State# s #setOffAddr# :: Addr# -> Int# -> Int# -> Identity a -> State# s -> State# s # Unbox a => Unbox (Identity a) Instance detailsDefined in Data.Vector.Unboxed.Base Source # Instance detailsDefined in Control.Lens.Wrapped Associated Typestype Unwrapped (Identity a) Source # Methods Ixed (Identity a) Source # Instance detailsDefined in Control.Lens.At Methodsix :: Index (Identity a) -> Traversal' (Identity a) (IxValue (Identity a)) Source # Since: base-4.8.0.0 Instance detailsDefined in Data.Functor.Identity Associated Typestype Rep1 Identity :: k -> Type # Methodsfrom1 :: forall (a :: k). Identity a -> Rep1 Identity a #to1 :: forall (a :: k). Rep1 Identity a -> Identity a # t ~ Identity b => Rewrapped (Identity a) t Source # Instance detailsDefined in Control.Lens.Wrapped Field1 (Identity a) (Identity b) a b Source # Instance detailsDefined in Control.Lens.Tuple Methods_1 :: Lens (Identity a) (Identity b) a b Source # Each (Identity a) (Identity b) a b Source # each :: Traversal (Identity a) (Identity b) a b Instance detailsDefined in Control.Lens.Each Methodseach :: Traversal (Identity a) (Identity b) a b Source # Sieve ((->) :: Type -> Type -> Type) Identity Instance detailsDefined in Data.Profunctor.Sieve Methodssieve :: (a -> b) -> a -> Identity b # Cosieve ((->) :: Type -> Type -> Type) Identity Instance detailsDefined in Data.Profunctor.Sieve Methodscosieve :: (a -> b) -> Identity a -> b # type Rep Identity Instance detailsDefined in Data.Functor.Rep type Rep Identity = () newtype MVector s (Identity a) Instance detailsDefined in Data.Vector.Unboxed.Base newtype MVector s (Identity a) = MV_Identity (MVector s a) type Rep (Identity a) Instance detailsDefined in Data.Functor.Identity type Rep (Identity a) = D1 ('MetaData "Identity" "Data.Functor.Identity" "base" 'True) (C1 ('MetaCons "Identity" 'PrefixI 'True) (S1 ('MetaSel ('Just "runIdentity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) newtype Vector (Identity a) Instance detailsDefined in Data.Vector.Unboxed.Base newtype Vector (Identity a) = V_Identity (Vector a) type Unwrapped (Identity a) Source # Instance detailsDefined in Control.Lens.Wrapped type Unwrapped (Identity a) = a type IxValue (Identity a) Source # Instance detailsDefined in Control.Lens.At type IxValue (Identity a) = a type Index (Identity a) Source # Instance detailsDefined in Control.Lens.At type Index (Identity a) = () type Rep1 Identity Instance detailsDefined in Data.Functor.Identity type Rep1 Identity = D1 ('MetaData "Identity" "Data.Functor.Identity" "base" 'True) (C1 ('MetaCons "Identity" 'PrefixI 'True) (S1 ('MetaSel ('Just "runIdentity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)) newtype Const a (b :: k) # The Const functor. Constructors  Const FieldsgetConst :: a #### Instances Instances details  Generic1 (Const a :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Associated Typestype Rep1 (Const a) :: k -> Type # Methodsfrom1 :: forall (a0 :: k0). Const a a0 -> Rep1 (Const a) a0 #to1 :: forall (a0 :: k0). Rep1 (Const a) a0 -> Const a a0 # Instance detailsDefined in WithIndex Methodsimap :: (Void -> a -> b) -> Const e a -> Const e b # Instance detailsDefined in WithIndex MethodsifoldMap :: Monoid m => (Void -> a -> m) -> Const e a -> m #ifoldMap' :: Monoid m => (Void -> a -> m) -> Const e a -> m #ifoldr :: (Void -> a -> b -> b) -> b -> Const e a -> b #ifoldl :: (Void -> b -> a -> b) -> b -> Const e a -> b #ifoldr' :: (Void -> a -> b -> b) -> b -> Const e a -> b #ifoldl' :: (Void -> b -> a -> b) -> b -> Const e a -> b # Instance detailsDefined in WithIndex Methodsitraverse :: Applicative f => (Void -> a -> f b) -> Const e a -> f (Const e b) # Unbox a => Vector Vector (Const a b) Instance detailsDefined in Data.Vector.Unboxed.Base MethodsbasicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Const a b) -> m (Vector (Const a b)) #basicUnsafeThaw :: PrimMonad m => Vector (Const a b) -> m (Mutable Vector (PrimState m) (Const a b)) #basicLength :: Vector (Const a b) -> Int #basicUnsafeSlice :: Int -> Int -> Vector (Const a b) -> Vector (Const a b) #basicUnsafeIndexM :: Monad m => Vector (Const a b) -> Int -> m (Const a b) #basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Const a b) -> Vector (Const a b) -> m () #elemseq :: Vector (Const a b) -> Const a b -> b0 -> b0 # Unbox a => MVector MVector (Const a b) Instance detailsDefined in Data.Vector.Unboxed.Base MethodsbasicLength :: MVector s (Const a b) -> Int #basicUnsafeSlice :: Int -> Int -> MVector s (Const a b) -> MVector s (Const a b) #basicOverlaps :: MVector s (Const a b) -> MVector s (Const a b) -> Bool #basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (Const a b)) #basicInitialize :: PrimMonad m => MVector (PrimState m) (Const a b) -> m () #basicUnsafeReplicate :: PrimMonad m => Int -> Const a b -> m (MVector (PrimState m) (Const a b)) #basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Const a b) -> Int -> m (Const a b) #basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Const a b) -> Int -> Const a b -> m () #basicClear :: PrimMonad m => MVector (PrimState m) (Const a b) -> m () #basicSet :: PrimMonad m => MVector (PrimState m) (Const a b) -> Const a b -> m () #basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Const a b) -> MVector (PrimState m) (Const a b) -> m () #basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Const a b) -> MVector (PrimState m) (Const a b) -> m () #basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Const a b) -> Int -> m (MVector (PrimState m) (Const a b)) # Bifunctor (Const :: Type -> Type -> Type) Since: base-4.8.0.0 Instance detailsDefined in Data.Bifunctor Methodsbimap :: (a -> b) -> (c -> d) -> Const a c -> Const b d #first :: (a -> b) -> Const a c -> Const b c #second :: (b -> c) -> Const a b -> Const a c # Bitraversable (Const :: Type -> Type -> Type) Since: base-4.10.0.0 Instance detailsDefined in Data.Bitraversable Methodsbitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Const a b -> f (Const c d) # Bifoldable (Const :: Type -> Type -> Type) Since: base-4.10.0.0 Instance detailsDefined in Data.Bifoldable Methodsbifold :: Monoid m => Const m m -> m #bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Const a b -> m #bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Const a b -> c #bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Const a b -> c # Eq2 (Const :: Type -> Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Const a c -> Const b d -> Bool # Ord2 (Const :: Type -> Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Const a c -> Const b d -> Ordering # Read2 (Const :: Type -> Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Const a b) #liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Const a b] #liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Const a b) #liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Const a b] # Show2 (Const :: Type -> Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Const a b -> ShowS #liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Const a b] -> ShowS # Biapplicative (Const :: Type -> Type -> Type) Instance detailsDefined in Data.Biapplicative Methodsbipure :: a -> b -> Const a b #(<<*>>) :: Const (a -> b) (c -> d) -> Const a c -> Const b d #biliftA2 :: (a -> b -> c) -> (d -> e -> f) -> Const a d -> Const b e -> Const c f #(*>>) :: Const a b -> Const c d -> Const c d #(<<*) :: Const a b -> Const c d -> Const a b # NFData2 (Const :: Type -> Type -> Type) Since: deepseq-1.4.3.0 Instance detailsDefined in Control.DeepSeq MethodsliftRnf2 :: (a -> ()) -> (b -> ()) -> Const a b -> () # Hashable2 (Const :: Type -> Type -> Type) Instance detailsDefined in Data.Hashable.Class MethodsliftHashWithSalt2 :: (Int -> a -> Int) -> (Int -> b -> Int) -> Int -> Const a b -> Int # Bitraversable1 (Const :: Type -> Type -> Type) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodsbitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> Const a c -> f (Const b d) #bisequence1 :: Apply f => Const (f a) (f b) -> f (Const a b) # Biapply (Const :: Type -> Type -> Type) Instance detailsDefined in Data.Functor.Bind.Class Methods(<<.>>) :: Const (a -> b) (c -> d) -> Const a c -> Const b d #(.>>) :: Const a b -> Const c d -> Const c d #(<<.) :: Const a b -> Const c d -> Const a b # Bifoldable1 (Const :: Type -> Type -> Type) Instance detailsDefined in Data.Semigroup.Foldable.Class Methodsbifold1 :: Semigroup m => Const m m -> m #bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Const a b -> m # Semigroupoid (Const :: Type -> Type -> Type) Instance detailsDefined in Data.Semigroupoid Methodso :: forall (j :: k) (k1 :: k) (i :: k). Const j k1 -> Const i j -> Const i k1 # Functor (Const m :: Type -> Type) Since: base-2.1 Instance detailsDefined in Data.Functor.Const Methodsfmap :: (a -> b) -> Const m a -> Const m b #(<) :: a -> Const m b -> Const m a # Monoid m => Applicative (Const m :: Type -> Type) Since: base-2.0.1 Instance detailsDefined in Data.Functor.Const Methodspure :: a -> Const m a #(<*>) :: Const m (a -> b) -> Const m a -> Const m b #liftA2 :: (a -> b -> c) -> Const m a -> Const m b -> Const m c #(*>) :: Const m a -> Const m b -> Const m b #(<*) :: Const m a -> Const m b -> Const m a # Foldable (Const m :: Type -> Type) Since: base-4.7.0.0 Instance detailsDefined in Data.Functor.Const Methodsfold :: Monoid m0 => Const m m0 -> m0 #foldMap :: Monoid m0 => (a -> m0) -> Const m a -> m0 #foldMap' :: Monoid m0 => (a -> m0) -> Const m a -> m0 #foldr :: (a -> b -> b) -> b -> Const m a -> b #foldr' :: (a -> b -> b) -> b -> Const m a -> b #foldl :: (b -> a -> b) -> b -> Const m a -> b #foldl' :: (b -> a -> b) -> b -> Const m a -> b #foldr1 :: (a -> a -> a) -> Const m a -> a #foldl1 :: (a -> a -> a) -> Const m a -> a #toList :: Const m a -> [a] #null :: Const m a -> Bool #length :: Const m a -> Int #elem :: Eq a => a -> Const m a -> Bool #maximum :: Ord a => Const m a -> a #minimum :: Ord a => Const m a -> a #sum :: Num a => Const m a -> a #product :: Num a => Const m a -> a # Traversable (Const m :: Type -> Type) Since: base-4.7.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> Const m a -> f (Const m b) #sequenceA :: Applicative f => Const m (f a) -> f (Const m a) #mapM :: Monad m0 => (a -> m0 b) -> Const m a -> m0 (Const m b) #sequence :: Monad m0 => Const m (m0 a) -> m0 (Const m a) # Contravariant (Const a :: Type -> Type) Instance detailsDefined in Data.Functor.Contravariant Methodscontramap :: (a0 -> b) -> Const a b -> Const a a0 #(>\$) :: b -> Const a b -> Const a a0 # Eq a => Eq1 (Const a :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftEq :: (a0 -> b -> Bool) -> Const a a0 -> Const a b -> Bool # Ord a => Ord1 (Const a :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftCompare :: (a0 -> b -> Ordering) -> Const a a0 -> Const a b -> Ordering # Read a => Read1 (Const a :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Const a a0) #liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Const a a0] #liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Const a a0) #liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Const a a0] # Show a => Show1 (Const a :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Const a a0 -> ShowS #liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Const a a0] -> ShowS # NFData a => NFData1 (Const a :: Type -> Type) Since: deepseq-1.4.3.0 Instance detailsDefined in Control.DeepSeq MethodsliftRnf :: (a0 -> ()) -> Const a a0 -> () # Hashable a => Hashable1 (Const a :: Type -> Type) Instance detailsDefined in Data.Hashable.Class MethodsliftHashWithSalt :: (Int -> a0 -> Int) -> Int -> Const a a0 -> Int # Semigroup m => Apply (Const m :: Type -> Type) A Const m is not Applicative unless its m is a Monoid, but it is an instance of Apply Instance detailsDefined in Data.Functor.Bind.Class Methods(<.>) :: Const m (a -> b) -> Const m a -> Const m b #(.>) :: Const m a -> Const m b -> Const m b #(<.) :: Const m a -> Const m b -> Const m a #liftF2 :: (a -> b -> c) -> Const m a -> Const m b -> Const m c # ComonadCofree (Const b :: Type -> Type) ((,) b) Instance detailsDefined in Control.Comonad.Cofree.Class Methodsunwrap :: (b, a) -> Const b (b, a) # Sieve (Forget r :: Type -> Type -> Type) (Const r :: Type -> Type) Instance detailsDefined in Data.Profunctor.Sieve Methodssieve :: Forget r a b -> a -> Const r b # Bounded a => Bounded (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const MethodsminBound :: Const a b #maxBound :: Const a b # Enum a => Enum (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methodssucc :: Const a b -> Const a b #pred :: Const a b -> Const a b #toEnum :: Int -> Const a b #fromEnum :: Const a b -> Int #enumFrom :: Const a b -> [Const a b] #enumFromThen :: Const a b -> Const a b -> [Const a b] #enumFromTo :: Const a b -> Const a b -> [Const a b] #enumFromThenTo :: Const a b -> Const a b -> Const a b -> [Const a b] # Eq a => Eq (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methods(==) :: Const a b -> Const a b -> Bool #(/=) :: Const a b -> Const a b -> Bool # Floating a => Floating (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methodspi :: Const a b #exp :: Const a b -> Const a b #log :: Const a b -> Const a b #sqrt :: Const a b -> Const a b #(**) :: Const a b -> Const a b -> Const a b #logBase :: Const a b -> Const a b -> Const a b #sin :: Const a b -> Const a b #cos :: Const a b -> Const a b #tan :: Const a b -> Const a b #asin :: Const a b -> Const a b #acos :: Const a b -> Const a b #atan :: Const a b -> Const a b #sinh :: Const a b -> Const a b #cosh :: Const a b -> Const a b #tanh :: Const a b -> Const a b #asinh :: Const a b -> Const a b #acosh :: Const a b -> Const a b #atanh :: Const a b -> Const a b #log1p :: Const a b -> Const a b #expm1 :: Const a b -> Const a b #log1pexp :: Const a b -> Const a b #log1mexp :: Const a b -> Const a b # Fractional a => Fractional (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methods(/) :: Const a b -> Const a b -> Const a b #recip :: Const a b -> Const a b #fromRational :: Rational -> Const a b # Integral a => Integral (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methodsquot :: Const a b -> Const a b -> Const a b #rem :: Const a b -> Const a b -> Const a b #div :: Const a b -> Const a b -> Const a b #mod :: Const a b -> Const a b -> Const a b #quotRem :: Const a b -> Const a b -> (Const a b, Const a b) #divMod :: Const a b -> Const a b -> (Const a b, Const a b) #toInteger :: Const a b -> Integer # (Typeable k, Data a, Typeable b) => Data (Const a b) Since: base-4.10.0.0 Instance detailsDefined in Data.Data Methodsgfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Const a b -> c (Const a b) #gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Const a b) #toConstr :: Const a b -> Constr #dataTypeOf :: Const a b -> DataType #dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Const a b)) #dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Const a b)) #gmapT :: (forall b0. Data b0 => b0 -> b0) -> Const a b -> Const a b #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Const a b -> r #gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Const a b -> r #gmapQ :: (forall d. Data d => d -> u) -> Const a b -> [u] #gmapQi :: Int -> (forall d. Data d => d -> u) -> Const a b -> u #gmapM :: Monad m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) # Num a => Num (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methods(+) :: Const a b -> Const a b -> Const a b #(-) :: Const a b -> Const a b -> Const a b #(*) :: Const a b -> Const a b -> Const a b #negate :: Const a b -> Const a b #abs :: Const a b -> Const a b #signum :: Const a b -> Const a b #fromInteger :: Integer -> Const a b # Ord a => Ord (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methodscompare :: Const a b -> Const a b -> Ordering #(<) :: Const a b -> Const a b -> Bool #(<=) :: Const a b -> Const a b -> Bool #(>) :: Const a b -> Const a b -> Bool #(>=) :: Const a b -> Const a b -> Bool #max :: Const a b -> Const a b -> Const a b #min :: Const a b -> Const a b -> Const a b # Read a => Read (Const a b) This instance would be equivalent to the derived instances of the Const newtype if the getConst field were removedSince: base-4.8.0.0 Instance detailsDefined in Data.Functor.Const MethodsreadsPrec :: Int -> ReadS (Const a b) #readList :: ReadS [Const a b] #readPrec :: ReadPrec (Const a b) #readListPrec :: ReadPrec [Const a b] # Real a => Real (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const MethodstoRational :: Const a b -> Rational # RealFloat a => RealFloat (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const MethodsfloatRadix :: Const a b -> Integer #floatDigits :: Const a b -> Int #floatRange :: Const a b -> (Int, Int) #decodeFloat :: Const a b -> (Integer, Int) #encodeFloat :: Integer -> Int -> Const a b #exponent :: Const a b -> Int #significand :: Const a b -> Const a b #scaleFloat :: Int -> Const a b -> Const a b #isNaN :: Const a b -> Bool #isInfinite :: Const a b -> Bool #isDenormalized :: Const a b -> Bool #isNegativeZero :: Const a b -> Bool #isIEEE :: Const a b -> Bool #atan2 :: Const a b -> Const a b -> Const a b # RealFrac a => RealFrac (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const MethodsproperFraction :: Integral b0 => Const a b -> (b0, Const a b) #truncate :: Integral b0 => Const a b -> b0 #round :: Integral b0 => Const a b -> b0 #ceiling :: Integral b0 => Const a b -> b0 #floor :: Integral b0 => Const a b -> b0 # Show a => Show (Const a b) This instance would be equivalent to the derived instances of the Const newtype if the getConst field were removedSince: base-4.8.0.0 Instance detailsDefined in Data.Functor.Const MethodsshowsPrec :: Int -> Const a b -> ShowS #show :: Const a b -> String #showList :: [Const a b] -> ShowS # Ix a => Ix (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methodsrange :: (Const a b, Const a b) -> [Const a b] #index :: (Const a b, Const a b) -> Const a b -> Int #unsafeIndex :: (Const a b, Const a b) -> Const a b -> Int #inRange :: (Const a b, Const a b) -> Const a b -> Bool #rangeSize :: (Const a b, Const a b) -> Int #unsafeRangeSize :: (Const a b, Const a b) -> Int # Generic (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Associated Typestype Rep (Const a b) :: Type -> Type # Methodsfrom :: Const a b -> Rep (Const a b) x #to :: Rep (Const a b) x -> Const a b # Semigroup a => Semigroup (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methods(<>) :: Const a b -> Const a b -> Const a b #sconcat :: NonEmpty (Const a b) -> Const a b #stimes :: Integral b0 => b0 -> Const a b -> Const a b # Monoid a => Monoid (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methodsmempty :: Const a b #mappend :: Const a b -> Const a b -> Const a b #mconcat :: [Const a b] -> Const a b # Storable a => Storable (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const MethodssizeOf :: Const a b -> Int #alignment :: Const a b -> Int #peekElemOff :: Ptr (Const a b) -> Int -> IO (Const a b) #pokeElemOff :: Ptr (Const a b) -> Int -> Const a b -> IO () #peekByteOff :: Ptr b0 -> Int -> IO (Const a b) #pokeByteOff :: Ptr b0 -> Int -> Const a b -> IO () #peek :: Ptr (Const a b) -> IO (Const a b) #poke :: Ptr (Const a b) -> Const a b -> IO () # Bits a => Bits (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methods(.&.) :: Const a b -> Const a b -> Const a b #(.|.) :: Const a b -> Const a b -> Const a b #xor :: Const a b -> Const a b -> Const a b #complement :: Const a b -> Const a b #shift :: Const a b -> Int -> Const a b #rotate :: Const a b -> Int -> Const a b #zeroBits :: Const a b #bit :: Int -> Const a b #setBit :: Const a b -> Int -> Const a b #clearBit :: Const a b -> Int -> Const a b #complementBit :: Const a b -> Int -> Const a b #testBit :: Const a b -> Int -> Bool #bitSizeMaybe :: Const a b -> Maybe Int #bitSize :: Const a b -> Int #isSigned :: Const a b -> Bool #shiftL :: Const a b -> Int -> Const a b #unsafeShiftL :: Const a b -> Int -> Const a b #shiftR :: Const a b -> Int -> Const a b #unsafeShiftR :: Const a b -> Int -> Const a b #rotateL :: Const a b -> Int -> Const a b #rotateR :: Const a b -> Int -> Const a b #popCount :: Const a b -> Int # FiniteBits a => FiniteBits (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const MethodsfiniteBitSize :: Const a b -> Int #countLeadingZeros :: Const a b -> Int #countTrailingZeros :: Const a b -> Int # NFData a => NFData (Const a b) Since: deepseq-1.4.0.0 Instance detailsDefined in Control.DeepSeq Methodsrnf :: Const a b -> () # Hashable a => Hashable (Const a b) Instance detailsDefined in Data.Hashable.Class MethodshashWithSalt :: Int -> Const a b -> Int #hash :: Const a b -> Int # Prim a => Prim (Const a b) Since: primitive-0.6.5.0 Instance detailsDefined in Data.Primitive.Types MethodssizeOf# :: Const a b -> Int# #alignment# :: Const a b -> Int# #indexByteArray# :: ByteArray# -> Int# -> Const a b #readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, Const a b #) #writeByteArray# :: MutableByteArray# s -> Int# -> Const a b -> State# s -> State# s #setByteArray# :: MutableByteArray# s -> Int# -> Int# -> Const a b -> State# s -> State# s #indexOffAddr# :: Addr# -> Int# -> Const a b #readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, Const a b #) #writeOffAddr# :: Addr# -> Int# -> Const a b -> State# s -> State# s #setOffAddr# :: Addr# -> Int# -> Int# -> Const a b -> State# s -> State# s # Unbox a => Unbox (Const a b) Instance detailsDefined in Data.Vector.Unboxed.Base Wrapped (Const a x) Source # Instance detailsDefined in Control.Lens.Wrapped Associated Typestype Unwrapped (Const a x) Source # Methods_Wrapped' :: Iso' (Const a x) (Unwrapped (Const a x)) Source # t ~ Const a' x' => Rewrapped (Const a x) t Source # Instance detailsDefined in Control.Lens.Wrapped type Rep1 (Const a :: k -> Type) Instance detailsDefined in Data.Functor.Const type Rep1 (Const a :: k -> Type) = D1 ('MetaData "Const" "Data.Functor.Const" "base" 'True) (C1 ('MetaCons "Const" 'PrefixI 'True) (S1 ('MetaSel ('Just "getConst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) newtype MVector s (Const a b) Instance detailsDefined in Data.Vector.Unboxed.Base newtype MVector s (Const a b) = MV_Const (MVector s a) type Rep (Const a b) Instance detailsDefined in Data.Functor.Const type Rep (Const a b) = D1 ('MetaData "Const" "Data.Functor.Const" "base" 'True) (C1 ('MetaCons "Const" 'PrefixI 'True) (S1 ('MetaSel ('Just "getConst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) newtype Vector (Const a b) Instance detailsDefined in Data.Vector.Unboxed.Base newtype Vector (Const a b) = V_Const (Vector a) type Unwrapped (Const a x) Source # Instance detailsDefined in Control.Lens.Wrapped type Unwrapped (Const a x) = a

data (a :: k) :~: (b :: k) where infix 4 #

Propositional equality. If a :~: b is inhabited by some terminating value, then the type a is the same as the type b. To use this equality in practice, pattern-match on the a :~: b to get out the Refl constructor; in the body of the pattern-match, the compiler knows that a ~ b.

Since: base-4.7.0.0

Constructors

 Refl :: forall k (a :: k). a :~: a

#### Instances

Instances details
 Category ((:~:) :: k -> k -> Type) Since: base-4.7.0.0 Instance detailsDefined in Control.Category Methodsid :: forall (a :: k0). a :~: a #(.) :: forall (b :: k0) (c :: k0) (a :: k0). (b :~: c) -> (a :~: b) -> a :~: c # Semigroupoid ((:~:) :: k -> k -> Type) Instance detailsDefined in Data.Semigroupoid Methodso :: forall (j :: k0) (k1 :: k0) (i :: k0). (j :~: k1) -> (i :~: j) -> i :~: k1 # TestCoercion ((:~:) a :: k -> Type) Since: base-4.7.0.0 Instance detailsDefined in Data.Type.Coercion MethodstestCoercion :: forall (a0 :: k0) (b :: k0). (a :~: a0) -> (a :~: b) -> Maybe (Coercion a0 b) # TestEquality ((:~:) a :: k -> Type) Since: base-4.7.0.0 Instance detailsDefined in Data.Type.Equality MethodstestEquality :: forall (a0 :: k0) (b :: k0). (a :~: a0) -> (a :~: b) -> Maybe (a0 :~: b) # NFData2 ((:~:) :: Type -> Type -> Type) Since: deepseq-1.4.3.0 Instance detailsDefined in