Add basic support for number type literals.
authorIavor S. Diatchki <iavor.diatchki@gmail.com>
Sun, 16 Jan 2011 21:56:36 +0000 (13:56 -0800)
committerIavor S. Diatchki <iavor.diatchki@gmail.com>
Sun, 16 Jan 2011 21:56:36 +0000 (13:56 -0800)
commit9cbc204d3da17f1f9257d30b297dd6557ffa2abb
treeeb76bedc5cafeb5be38912f6e85bacb75084e47a
parentb40cea3e36672aecae80498956341036bd70c566
Add basic support for number type literals.

We add a new kind, Nat, inhabited by a family of types,
one for each natural number:

0, 1, 2 .. :: Nat

In terms of GHC's sub-kind relation, Nat is only a sub-kind of itself.

The numeric types are empty because there are no primitives of these
types, and the kind "Nat" is not related to *, the kind of types which
can be defined in Haskell programs.
34 files changed:
compiler/codeGen/ClosureInfo.lhs
compiler/codeGen/StgCmmClosure.hs
compiler/coreSyn/CoreLint.lhs
compiler/coreSyn/ExternalCore.lhs
compiler/coreSyn/MkExternalCore.lhs
compiler/coreSyn/PprExternalCore.lhs
compiler/hsSyn/Convert.lhs
compiler/hsSyn/HsTypes.lhs
compiler/iface/BinIface.hs
compiler/iface/IfaceSyn.lhs
compiler/iface/IfaceType.lhs
compiler/iface/TcIface.lhs
compiler/main/DynFlags.hs
compiler/parser/Lexer.x
compiler/parser/Parser.y.pp
compiler/parser/RdrHsSyn.lhs
compiler/prelude/PrelNames.lhs
compiler/rename/RnHsSyn.lhs
compiler/rename/RnTypes.lhs
compiler/typecheck/TcCanonical.lhs
compiler/typecheck/TcErrors.lhs
compiler/typecheck/TcHsType.lhs
compiler/typecheck/TcMType.lhs
compiler/typecheck/TcSimplify.lhs
compiler/typecheck/TcSplice.lhs
compiler/typecheck/TcTyDecls.lhs
compiler/typecheck/TcType.lhs
compiler/typecheck/TcUnify.lhs
compiler/types/Coercion.lhs
compiler/types/FamInstEnv.lhs
compiler/types/OptCoercion.lhs
compiler/types/Type.lhs
compiler/types/TypeRep.lhs
compiler/types/Unify.lhs