HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulebase-4.20.2.0Haskell2010

Type.Reflection.Unsafe

The representations of the types TyCon and TypeRep, and the function mkTyCon which is used by derived instances of Typeable to construct TyCons.

Be warned, these functions can be used to construct ill-kinded type representations.

  • 4 types
  • 8 values
  • Packagebase-4.20.2.0
  • Exports13
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceUnsafe.hs

Type representations

5 declarations
datadata TypeRep (a :: k) where
#

TypeRep is a concrete representation of a (monomorphic) type. TypeRep supports reasonably efficient equality. See Note [Grand plan for Typeable] in GHC.Tc.Instance.Typeable

Instances4TestEquality, Eq, Ord, Show
  • TestEquality TypeRepDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Typeable.Internal
  • Eq (TypeRep a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Typeable.Internal
  • Ord (TypeRep a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Typeable.Internal
  • Show (TypeRep a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Typeable.Internal
valuemkTyCon
  1. :: String

    package name

  2. -> String

    module name

  3. -> String

    the name of the type constructor

  4. -> Int

    number of kind variables

  5. -> KindRep

    kind representation

  6. -> TyCon

    A unique TyCon object Used when the strings are dynamically allocated, eg from binary deserialisation

#

Exquisitely unsafe.

Kind representations

3 declarations

Type constructors

5 declarations
datadata TyCon
#
Instances3Eq, Ord, Show
  • Eq TyConDefined in ghc-prim-0.12.0 · GHC.Classes
  • Ord TyConDefined in ghc-prim-0.12.0 · GHC.Classes
  • Show TyConDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
valuemkTrCon :: TyCon -> [SomeTypeRep] -> TypeRep a
#

Construct a representation for a type constructor applied at a monomorphic kind.

Note that this is unsafe as it allows you to construct ill-kinded types.