diff options
author | Iavor S. Diatchki <iavor.diatchki@gmail.com> | 2012-01-24 22:11:44 -0800 |
---|---|---|
committer | Iavor S. Diatchki <iavor.diatchki@gmail.com> | 2012-01-24 22:11:44 -0800 |
commit | 5851f84733f4ef1ee158b911febd753ced619555 (patch) | |
tree | 8840092a97618c214810d0fcb52ef17e204dbbea /compiler/prelude/TysPrim.lhs | |
parent | 9c1575228173218a3cfa06ddbec3865b12d87713 (diff) | |
download | haskell-5851f84733f4ef1ee158b911febd753ced619555.tar.gz |
Add support for type-level "strings".
These are types that look like "this" and "that".
They are of kind `Symbol`, defined in module `GHC.TypeLits`.
For each type-level symbol `X`, we have a singleton type, `TSymbol X`.
The value of the singleton type can be named with the overloaded
constant `tSymbol`. Here is an example:
tSymbol :: TSymbol "Hello"
Diffstat (limited to 'compiler/prelude/TysPrim.lhs')
-rw-r--r-- | compiler/prelude/TysPrim.lhs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/prelude/TysPrim.lhs b/compiler/prelude/TysPrim.lhs index 60fad552e8..7634089ded 100644 --- a/compiler/prelude/TysPrim.lhs +++ b/compiler/prelude/TysPrim.lhs @@ -38,7 +38,7 @@ module TysPrim( anyKind, liftedTypeKind, unliftedTypeKind, openTypeKind, argTypeKind, ubxTupleKind, constraintKind, mkArrowKind, mkArrowKinds, - typeNatKind, + typeNatKind, typeStringKind, funTyCon, funTyConName, primTyCons, @@ -345,6 +345,8 @@ constraintKind = kindTyConType constraintKindTyCon typeNatKind :: Kind typeNatKind = kindTyConType (mkKindTyCon typeNatKindConName tySuperKind) +typeStringKind :: Kind +typeStringKind = kindTyConType (mkKindTyCon typeStringKindConName tySuperKind) -- | Given two kinds @k1@ and @k2@, creates the 'Kind' @k1 -> k2@ mkArrowKind :: Kind -> Kind -> Kind |