| Copyright | (c) The University of Glasgow CWI 2001--2015 |
|---|---|
| License | BSD-style (see the file libraries/base/LICENSE) |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Type.Reflection.Unsafe
Description
- data TypeRep (a :: k)
- mkTrApp :: forall k1 k2 (a :: k1 -> k2) (b :: k1). TypeRep (a :: k1 -> k2) -> TypeRep (b :: k1) -> TypeRep (a b)
- mkTyCon :: String -> String -> String -> Int -> KindRep -> TyCon
- typeRepFingerprint :: TypeRep a -> Fingerprint
- someTypeRepFingerprint :: SomeTypeRep -> Fingerprint
- data KindRep :: *
- data TypeLitSort :: *
- data TyCon :: *
- mkTrCon :: forall k (a :: k). TyCon -> [SomeTypeRep] -> TypeRep a
- tyConKindRep :: TyCon -> KindRep
- tyConKindArgs :: TyCon -> Int
- tyConFingerprint :: TyCon -> Fingerprint
Type representations
A concrete representation of a (monomorphic) type.
TypeRep supports reasonably efficient equality.
mkTrApp :: forall k1 k2 (a :: k1 -> k2) (b :: k1). TypeRep (a :: k1 -> k2) -> TypeRep (b :: k1) -> TypeRep (a b) #
Construct a representation for a type application.
Note that this is known-key to the compiler, which uses it in desugar
Typeable evidence.
Arguments
| :: String | package name |
| -> String | module name |
| -> String | the name of the type constructor |
| -> Int | number of kind variables |
| -> KindRep | kind representation |
| -> TyCon | A unique |
Exquisitely unsafe.
typeRepFingerprint :: TypeRep a -> Fingerprint #
Observe the Fingerprint of a type representation
Since: 4.8.0.0
Kind representations
The representation produced by GHC for conjuring up the kind of a
TypeRep.
data TypeLitSort :: * Source #
Constructors
| TypeLitSymbol | |
| TypeLitNat |
Type constructors
mkTrCon :: forall k (a :: k). 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.
tyConKindRep :: TyCon -> KindRep #
tyConKindArgs :: TyCon -> Int #
tyConFingerprint :: TyCon -> Fingerprint #