HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulesyb-0.7.3Haskell98

Data.Generics

"Scrap your boilerplate" --- Generic programming in Haskell See http://www.cs.uu.nl/wiki/GenericProgramming/SYB. To scrap your boilerplate it is sufficient to import the present module, which simply re-exports all themes of the Data.Generics library.

  • 11 types
  • 2 classes
  • 61 values
  • Packagesyb-0.7.3
  • Exports74
  • LanguageHaskell98
  • LicenceBSD-3-Clause
  • SourceGenerics.hs

All Data.Generics modules

74 declarations
classclass Typeable a => Data a where
#

The Data class comprehends a fundamental primitive gfoldl for folding over constructor applications, say terms. This primitive can be instantiated in several ways to map over the immediate subterms of a term; see the gmap combinators later in this class. Indeed, a generic programmer does not necessarily need to use the ingenious gfoldl primitive but rather the intuitive gmap combinators. The gfoldl primitive is completed by means to query top-level constructors, to turn constructor representations into proper terms, and to list all possible datatype constructors. This completion allows us to serve generic programming scenarios like read, show, equality, term generation.

The combinators gmapT, gmapQ, gmapM, etc are all provided with default definitions in terms of gfoldl, leaving open the opportunity to provide datatype-specific definitions. (The inclusion of the gmap combinators as members of class Data allows the programmer or the compiler to derive specialised, and maybe more efficient code per datatype. Note: gfoldl is more higher-order than the gmap combinators. This is subject to ongoing benchmarking experiments. It might turn out that the gmap combinators will be moved out of the class Data.)

Conceptually, the definition of the gmap combinators in terms of the primitive gfoldl requires the identification of the gfoldl function arguments. Technically, we also need to identify the type constructor c for the construction of the result type from the folded term type.

In the definition of gmapQx combinators, we use phantom type constructors for the c in the type of gfoldl because the result type of a query does not involve the (polymorphic) type of the term argument. In the definition of gmapQl we simply use the plain constant type constructor because gfoldl is left-associative anyway and so it is readily suited to fold a left-associative binary operation over the immediate subterms. In the definition of gmapQr, extra effort is needed. We use a higher-order accumulation trick to mediate between left-associative constructor application vs. right-associative binary operation (e.g., (:)). When the query is meant to compute a value of type r, then the result type within generic folding is r -> r. So the result of folding is a function to which we finally pass the right unit.

With the -XDeriveDataTypeable option, GHC can generate instances of the Data class automatically. For example, given the declaration

data T a b = C1 a b | C2 deriving (Typeable, Data)

GHC will generate an instance that is equivalent to

instance (Data a, Data b) => Data (T a b) where
    gfoldl k z (C1 a b) = z C1 `k` a `k` b
    gfoldl k z C2       = z C2

    gunfold k z c = case constrIndex c of
                        1 -> k (k (z C1))
                        2 -> z C2

    toConstr (C1 _ _) = con_C1
    toConstr C2       = con_C2

    dataTypeOf _ = ty_T

con_C1 = mkConstr ty_T "C1" [] Prefix
con_C2 = mkConstr ty_T "C2" [] Prefix
ty_T   = mkDataType "Module.T" [con_C1, con_C2]

This is suitable for datatypes that are exported transparently.

Methods

  • gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> a -> c a

    Left-associative fold operation for constructor applications.

    The type of gfoldl is a headache, but operationally it is a simple generalisation of a list fold.

    The default definition for gfoldl is const id, which is suitable for abstract datatypes with no substructures.

  • gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c a

    Unfolding constructor applications

  • toConstr :: a -> Constr

    Obtaining the constructor from a given datum. For proper terms, this is meant to be the top-level constructor. Primitive datatypes are here viewed as potentially infinite sets of values (i.e., constructors).

  • dataTypeOf :: a -> DataType

    The outer type constructor of the type

  • dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c a)

    Mediate types and unary type constructors.

    In Data instances of the form

        instance (Data a, ...) => Data (T a)
    

    dataCast1 should be defined as gcast1.

    The default definition is const Nothing, which is appropriate for instances of other forms.

  • dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a)

    Mediate types and binary type constructors.

    In Data instances of the form

        instance (Data a, Data b, ...) => Data (T a b)
    

    dataCast2 should be defined as gcast2.

    The default definition is const Nothing, which is appropriate for instances of other forms.

  • gmapT :: (forall b. Data b => b -> b) -> a -> a

    A generic transformation that maps over the immediate subterms

    The default definition instantiates the type constructor c in the type of gfoldl to an identity datatype constructor, using the isomorphism pair as injection and projection.

  • gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r

    A generic query with a left-associative binary operator

  • gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r

    A generic query with a right-associative binary operator

  • gmapQ :: (forall d. Data d => d -> u) -> a -> [u]

    A generic query that processes the immediate subterms and returns a list of results. The list is given in the same order as originally specified in the declaration of the data constructors.

  • gmapQi :: Int -> (forall d. Data d => d -> u) -> a -> u

    A generic query that processes one child by index (zero-based)

  • gmapM :: Monad m => (forall d. Data d => d -> m d) -> a -> m a

    A generic monadic transformation that maps over the immediate subterms

    The default definition instantiates the type constructor c in the type of gfoldl to the monad datatype constructor, defining injection and projection using return and >>=.

  • gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> a -> m a

    Transformation of at least one immediate subterm does not fail

  • gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> a -> m a

    Transformation of one immediate subterm with success

Instances97Data, …
  • Data ByteArrayDefined in base-4.20.2.0 · Data.Array.Byte
  • Data IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data NaturalDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data VoidDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data ThreadIdDefined in syb-0.7.3 · Data.Generics.Instances · orphan
  • Data DataTypeDefined in syb-0.7.3 · Data.Generics.Instances · orphan
  • Data AllDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data AnyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data VersionDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data SpecConstrAnnotationDefined in ghc-internal-9.1003.0 · GHC.Internal.Exts
  • Data IntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data WordPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data AssociativityDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data DecidedStrictnessDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data FixityDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data SourceStrictnessDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data SourceUnpackednessDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data HandleDefined in syb-0.7.3 · Data.Generics.Instances · orphan
  • Data Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data CharDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data DoubleDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data FloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data IntDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data OrderingDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data TyConDefined in syb-0.7.3 · Data.Generics.Instances · orphan
  • Data WordDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data ()Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (Complex a)Defined in base-4.20.2.0 · Data.Complex
  • Data a => Data (First a)Defined in base-4.20.2.0 · Data.Semigroup
  • Data a => Data (Last a)Defined in base-4.20.2.0 · Data.Semigroup
  • Data a => Data (Max a)Defined in base-4.20.2.0 · Data.Semigroup
  • Data a => Data (Min a)Defined in base-4.20.2.0 · Data.Semigroup
  • Data a => Data (NonEmpty a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (Identity a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (First a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (Last a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (Down a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (Dual a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (Product a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (Sum a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (ConstPtr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (ForeignPtr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (ZipList a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Functor.ZipList
  • Data a => Data (Maybe a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (Ptr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data [a]Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data

    For historical reasons, the constructor name used for (:) is "(:)". In a derived instance, it would be ":".

  • Data m => Data (WrappedMonoid m)Defined in base-4.20.2.0 · Data.Semigroup
  • Data p => Data (Par1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Typeable a => Data (STM a)Defined in syb-0.7.3 · Data.Generics.Instances · orphan
  • Typeable a => Data (TVar a)Defined in syb-0.7.3 · Data.Generics.Instances · orphan
  • Typeable a => Data (IORef a)Defined in syb-0.7.3 · Data.Generics.Instances · orphan
  • Typeable a => Data (MVar a)Defined in syb-0.7.3 · Data.Generics.Instances · orphan
  • Typeable a => Data (StablePtr a)Defined in syb-0.7.3 · Data.Generics.Instances · orphan
  • Typeable a => Data (IO a)Defined in syb-0.7.3 · Data.Generics.Instances · orphan
  • Typeable s => Data (MutableByteArray s)Defined in base-4.20.2.0 · Data.Array.Byte
  • (Data a, Integral a) => Data (Ratio a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data p => Data (U1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data p => Data (V1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data t => Data (Proxy t)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data a, Data b) => Data (Arg a b)Defined in base-4.20.2.0 · Data.Semigroup
  • (Data a, Data b) => Data (Either a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data a, Data b) => Data (a, b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data a, Data b) => Data (a -> b)Defined in syb-0.7.3 · Data.Generics.Instances · orphan
  • (Data a, Data b, Ix a) => Data (Array a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Typeable k, Typeable a) => Data (Fixed a)Defined in base-4.20.2.0 · Data.Fixed
  • (Typeable m, Typeable a, Data (m a)) => Data (WrappedMonad m a)Defined in base-4.20.2.0 · Control.Applicative
  • (Typeable s, Typeable a) => Data (ST s a)Defined in syb-0.7.3 · Data.Generics.Instances · orphan
  • (Data (f a), Data a, Typeable f) => Data (Ap f a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data (f a), Data a, Typeable f) => Data (Alt f a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data (f p), Typeable f, Data p) => Data (Rec1 f p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data a, Data b, Data c) => Data (a, b, c)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Typeable a, Typeable b, Typeable c, Data (a b c)) => Data (WrappedArrow a b c)Defined in base-4.20.2.0 · Control.Applicative
  • (Typeable k, Data a, Typeable b) => Data (Const a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Coercible a b, Data a, Data b) => Data (Coercion a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (a ~ b, Data a) => Data (a :~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data a, Data b, Data c, Data d) => Data (a, b, c, d)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Typeable a, Typeable f, Typeable g, Typeable k, Data (f a), Data (g a)) => Data (Product f g a)Defined in base-4.20.2.0 · Data.Functor.Product
  • (Typeable a, Typeable f, Typeable g, Typeable k, Data (f a), Data (g a)) => Data (Sum f g a)Defined in base-4.20.2.0 · Data.Functor.Sum
  • (Typeable f, Typeable g, Data p, Data (f p), Data (g p)) => Data ((:*:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Typeable f, Typeable g, Data p, Data (f p), Data (g p)) => Data ((:+:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Typeable i, Data p, Data c) => Data (K1 i c p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Typeable i, Typeable j, Typeable a, Typeable b, a ~~ b) => Data (a :~~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data a, Data b, Data c, Data d, Data e) => Data (a, b, c, d, e)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data p, Data (f p), Typeable c, Typeable i, Typeable f) => Data (M1 i c f p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Typeable a, Typeable f, Typeable g, Typeable k1, Typeable k2, Data (f (g a))) => Data (Compose f g a)Defined in base-4.20.2.0 · Data.Functor.Compose
  • (Typeable f, Typeable g, Data p, Data (f (g p))) => Data ((:.:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data a, Data b, Data c, Data d, Data e, Data f) => Data (a, b, c, d, e, f)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data a, Data b, Data c, Data d, Data e, Data f, Data g) => Data (a, b, c, d, e, f, g)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
datadata DataType
#

Representation of datatypes. A package of constructor representations with names of type and module.

Instances2Data, Show
  • Data DataTypeDefined in syb-0.7.3 · Data.Generics.Instances · orphan
  • Show DataTypeDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
datadata TyCon
#
Instances4Eq, Data, Ord, Show
  • Eq TyConDefined in ghc-prim-0.12.0 · GHC.Classes
  • Data TyConDefined in syb-0.7.3 · Data.Generics.Instances · orphan
  • Ord TyConDefined in ghc-prim-0.12.0 · GHC.Classes
  • Show TyConDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
classclass Typeable (a :: k) where
#

The class Typeable allows a concrete representation of a type to be calculated.

valueconstrFields :: Constr -> [String]
#

Gets the field labels of a constructor. The list of labels is returned in the same order as they were given in the original constructor declaration.

Applies a type to a function type. Returns: Just u if the first argument represents a function of type t -> u and the second argument represents a function of type t. Otherwise, returns Nothing.

valuesplitTyConApp :: TypeRep -> (TyCon, [TypeRep])
#

Splits a type constructor application. Note that if the type constructor is polymorphic, this will not return the kinds that were used.

valuetypeRep :: Typeable a => proxy a -> TypeRep
#

Takes a value of type a and returns a concrete representation of that type.

typetype ConIndex = Int
#

Unique index for datatype constructors, counting from 1 in the order they are given in the program text.

datadata Constr
#

Representation of constructors. Note that equality on constructors with different types may not work -- i.e. the constructors for False and Nothing may compare equal.

Instances2Eq, Show
  • Eq ConstrDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data

    Equality of constructors

  • Show ConstrDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
datadata Fixity
#

Fixity of constructors

Instances2Eq, Show
  • Eq FixityDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Show FixityDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
datadata Proxy (t :: k)
#

Proxy is a type that holds no data, but has a phantom parameter of arbitrary type (or even kind). Its use is to provide type information, even though there is no value available of that type (or it may be too costly to create one).

Historically, Proxy :: Proxy a is a safer alternative to the undefined :: a idiom.

Example1 expression
Proxy :: Proxy (Void, Int -> Int)Proxy

Proxy can even hold types of higher kinds,

Example1 expression
Proxy :: Proxy EitherProxy
Example1 expression
Proxy :: Proxy FunctorProxy
Example1 expression
Proxy :: Proxy complicatedStructureProxy
Instances27Generic1, Monad, Functor, Applicative, Foldable, Traversable, …
  • Generic1 ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Monad ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Functor ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Applicative ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Foldable ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Traversable ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Traversable
  • Alternative ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • MonadPlus ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • MonadZip ProxyDefined in base-4.20.2.0 · Control.Monad.Zip
  • Eq1 ProxyDefined in base-4.20.2.0 · Data.Functor.Classes
  • Ord1 ProxyDefined in base-4.20.2.0 · Data.Functor.Classes
  • Read1 ProxyDefined in base-4.20.2.0 · Data.Functor.Classes
  • Show1 ProxyDefined in base-4.20.2.0 · Data.Functor.Classes
  • Contravariant ProxyDefined in base-4.20.2.0 · Data.Functor.Contravariant
  • Bounded (Proxy t)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Enum (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Eq (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Data t => Data (Proxy t)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Ord (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Read (Proxy t)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Show (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Ix (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Generic (Proxy t)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Semigroup (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Monoid (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • type Rep (Proxy t) = D1 ('MetaData "Proxy" "GHC.Internal.Data.Proxy" "ghc-internal" 'False) (C1 ('MetaCons "Proxy" 'PrefixI 'False) U1)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • type Rep1 Proxy = D1 ('MetaData "Proxy" "GHC.Internal.Data.Proxy" "ghc-internal" 'False) (C1 ('MetaCons "Proxy" 'PrefixI 'False) U1)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
datadata (:~:) (a :: k) (b :: k) where
#

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.

Constructors

Instances10Category, TestCoercion, TestEquality, Bounded, Enum, Eq, …
  • Category (:~:)Defined in ghc-internal-9.1003.0 · GHC.Internal.Control.Category
  • TestCoercion ((:~:) a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Coercion
  • TestEquality ((:~:) a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • a ~ b => Bounded (a :~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • a ~ b => Enum (a :~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • Eq (a :~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • (a ~ b, Data a) => Data (a :~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Ord (a :~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • a ~ b => Read (a :~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • Show (a :~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
datadata (:~~:) (a :: k1) (b :: k2) where
#

Kind heterogeneous propositional equality. Like :~:, a :~~: b is inhabited by a terminating value if and only if a is the same type as b.

Constructors

Instances10Category, TestCoercion, TestEquality, Bounded, Enum, Eq, …
  • Category (:~~:)Defined in ghc-internal-9.1003.0 · GHC.Internal.Control.Category
  • TestCoercion ((:~~:) a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Coercion
  • TestEquality ((:~~:) a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • a ~~ b => Bounded (a :~~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • a ~~ b => Enum (a :~~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • Eq (a :~~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • (Typeable i, Typeable j, Typeable a, Typeable b, a ~~ b) => Data (a :~~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Ord (a :~~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • a ~~ b => Read (a :~~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • Show (a :~~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality