On this page
Type.Reflection.Unsafe
| Copyright | (c) The University of Glasgow CWI 2001--2015 |
|---|---|
| License | BSD-style (see the file libraries/base/LICENSE) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Description
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.
Type representations
A concrete representation of a (monomorphic) type. TypeRep supports reasonably efficient equality.
Instances
| TestEquality (TypeRep :: k -> Type) Source | |
|
Defined in Data.Typeable.Internal |
|
| Show (TypeRep a) Source | |
| Eq (TypeRep a) Source | Since: base-2.1 |
| Ord (TypeRep a) Source | Since: base-4.4.0.0 |
|
Defined in Data.Typeable.Internal |
|
mkTrApp :: forall k1 k2 (a :: k1 -> k2) (b :: k1). TypeRep (a :: k1 -> k2) -> TypeRep (b :: k1) -> TypeRep (a b) Source
Construct a representation for a type application.
Arguments
Exquisitely unsafe.
typeRepFingerprint :: TypeRep a -> Fingerprint Source
Observe the Fingerprint of a type representation
Since: base-4.8.0.0
someTypeRepFingerprint :: SomeTypeRep -> Fingerprint Source
Kind representations
The representation produced by GHC for conjuring up the kind of a TypeRep.
Constructors
Bundled Patterns
| pattern KindRepTypeLit :: TypeLitSort -> String -> KindRep |
Instances
data TypeLitSort Source
Constructors
Instances
| Show TypeLitSort Source | Since: base-4.11.0.0 |
|
Defined in GHC.Show MethodsshowsPrec :: Int -> TypeLitSort -> ShowS Source show :: TypeLitSort -> String Source showList :: [TypeLitSort] -> ShowS Source |
|
Type constructors
mkTrCon :: forall k (a :: k). TyCon -> [SomeTypeRep] -> TypeRep a Source
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.
tyConKindRep :: TyCon -> KindRep Source
tyConKindArgs :: TyCon -> Int Source
© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/9.4.2/docs/libraries/base-4.17.0.0/Type-Reflection-Unsafe.html