| Copyright | (c) The University of Glasgow, CWI 2001--2011 |
|---|---|
| License | BSD-style (see the file libraries/base/LICENSE) |
| Safe Haskell | Unsafe |
| Language | Haskell2010 |
Data.OldTypeable.Internal
Description
Deprecated: Use Data.Typeable.Internal instead
The representations of the types TyCon and TypeRep, and the function mkTyCon which is used by derived instances of Typeable to construct a TyCon.
Since: 4.7.0.0
- data TypeRep = TypeRep !Fingerprint TyCon [TypeRep]
- data TyCon = TyCon {}
- mkTyCon :: Word64# -> Word64# -> String -> String -> String -> TyCon
- mkTyCon3 :: String -> String -> String -> TyCon
- mkTyConApp :: TyCon -> [TypeRep] -> TypeRep
- mkAppTy :: TypeRep -> TypeRep -> TypeRep
- typeRepTyCon :: TypeRep -> TyCon
- typeOfDefault :: forall t a. (Typeable1 t, Typeable a) => t a -> TypeRep
- typeOf1Default :: forall t a b. (Typeable2 t, Typeable a) => t a b -> TypeRep
- typeOf2Default :: forall t a b c. (Typeable3 t, Typeable a) => t a b c -> TypeRep
- typeOf3Default :: forall t a b c d. (Typeable4 t, Typeable a) => t a b c d -> TypeRep
- typeOf4Default :: forall t a b c d e. (Typeable5 t, Typeable a) => t a b c d e -> TypeRep
- typeOf5Default :: forall t a b c d e f. (Typeable6 t, Typeable a) => t a b c d e f -> TypeRep
- typeOf6Default :: forall t a b c d e f g. (Typeable7 t, Typeable a) => t a b c d e f g -> TypeRep
- class Typeable a where
- class Typeable1 t where
- class Typeable2 t where
- class Typeable3 t where
- class Typeable4 t where
- class Typeable5 t where
- class Typeable6 t where
- class Typeable7 t where
- mkFunTy :: TypeRep -> TypeRep -> TypeRep
- splitTyConApp :: TypeRep -> (TyCon, [TypeRep])
- funResultTy :: TypeRep -> TypeRep -> Maybe TypeRep
- typeRepArgs :: TypeRep -> [TypeRep]
- showsTypeRep :: TypeRep -> ShowS
- tyConString :: TyCon -> String
- listTc :: TyCon
- funTc :: TyCon
Documentation
data TypeRep
A concrete representation of a (monomorphic) type. TypeRep
supports reasonably efficient equality.
Constructors
| TypeRep !Fingerprint TyCon [TypeRep] |
data TyCon
Constructors
| TyCon | |
Fields
| |
Arguments
| :: String | package name |
| -> String | module name |
| -> String | the name of the type constructor |
| -> TyCon | A unique |
Builds a TyCon object representing a type constructor. An
implementation of Data.Typeable should ensure that the following holds:
A==A' ^ B==B' ^ C==C' ==> mkTyCon A B C == mkTyCon A' B' C'
mkTyConApp :: TyCon -> [TypeRep] -> TypeRep
Applies a type constructor to a sequence of types
typeRepTyCon :: TypeRep -> TyCon
Observe the type constructor of a type representation
typeOfDefault :: forall t a. (Typeable1 t, Typeable a) => t a -> TypeRep
typeOf1Default :: forall t a b. (Typeable2 t, Typeable a) => t a b -> TypeRep
typeOf2Default :: forall t a b c. (Typeable3 t, Typeable a) => t a b c -> TypeRep
typeOf3Default :: forall t a b c d. (Typeable4 t, Typeable a) => t a b c d -> TypeRep
typeOf4Default :: forall t a b c d e. (Typeable5 t, Typeable a) => t a b c d e -> TypeRep
typeOf5Default :: forall t a b c d e f. (Typeable6 t, Typeable a) => t a b c d e f -> TypeRep
typeOf6Default :: forall t a b c d e f g. (Typeable7 t, Typeable a) => t a b c d e f g -> TypeRep
class Typeable a where
The class Typeable allows a concrete representation of a type to
be calculated.
Methods
Instances
| Typeable Bool | |
| Typeable Char | |
| Typeable Double | |
| Typeable Float | |
| Typeable Int | |
| Typeable Int8 | |
| Typeable Int16 | |
| Typeable Int32 | |
| Typeable Int64 | |
| Typeable Integer | |
| Typeable Ordering | |
| Typeable RealWorld | |
| Typeable Word | |
| Typeable Word8 | |
| Typeable Word16 | |
| Typeable Word32 | |
| Typeable Word64 | |
| Typeable () | |
| Typeable TyCon | |
| Typeable TypeRep | |
| (Typeable1 s, Typeable a) => Typeable (s a) | One Typeable instance for all Typeable1 instances |
class Typeable1 t where
Variant for unary type constructors
class Typeable2 t where
Variant for binary type constructors
class Typeable3 t where
Variant for 3-ary type constructors
class Typeable4 t where
Variant for 4-ary type constructors
class Typeable5 t where
Variant for 5-ary type constructors
class Typeable6 t where
Variant for 6-ary type constructors
class Typeable7 t where
Variant for 7-ary type constructors
mkFunTy :: TypeRep -> TypeRep -> TypeRep
A special case of mkTyConApp, which applies the function
type constructor to a pair of types.
splitTyConApp :: TypeRep -> (TyCon, [TypeRep])
Splits a type constructor application
funResultTy :: TypeRep -> TypeRep -> Maybe TypeRep
typeRepArgs :: TypeRep -> [TypeRep]
Observe the argument types of a type representation
showsTypeRep :: TypeRep -> ShowS
tyConString :: TyCon -> String
Observe string encoding of a type representation