diff options
author | Jose Pedro Magalhaes <jpm@cs.uu.nl> | 2011-11-11 09:07:11 +0000 |
---|---|---|
committer | Jose Pedro Magalhaes <jpm@cs.uu.nl> | 2011-11-11 09:09:23 +0000 |
commit | 09015be8d580bc33f5f1960c8e31d00ba7a459a1 (patch) | |
tree | c7efea03f85327c35d875257679a73520408c3e9 /compiler/prelude/TysWiredIn.lhs | |
parent | fd742437b9e5933da145aea1e80766990c649a15 (diff) | |
download | haskell-09015be8d580bc33f5f1960c8e31d00ba7a459a1.tar.gz |
New kind-polymorphic core
This big patch implements a kind-polymorphic core for GHC. The current
implementation focuses on making sure that all kind-monomorphic programs still
work in the new core; it is not yet guaranteed that kind-polymorphic programs
(using the new -XPolyKinds flag) will work.
For more information, see http://haskell.org/haskellwiki/GHC/Kinds
Diffstat (limited to 'compiler/prelude/TysWiredIn.lhs')
-rw-r--r-- | compiler/prelude/TysWiredIn.lhs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/compiler/prelude/TysWiredIn.lhs b/compiler/prelude/TysWiredIn.lhs index 54acefc087..c6991e1591 100644 --- a/compiler/prelude/TysWiredIn.lhs +++ b/compiler/prelude/TysWiredIn.lhs @@ -420,16 +420,25 @@ mkIPName ip tycon_u datacon_u dc_wrk_u co_ax_u = name_ip \begin{code} eqTyCon :: TyCon eqTyCon = mkAlgTyCon eqTyConName - (mkArrowKinds [openTypeKind, openTypeKind] constraintKind) - [alphaTyVar, betaTyVar] + (ForAllTy kv $ mkArrowKinds [k, k] constraintKind) + [kv, a, b] [] -- No stupid theta (DataTyCon [eqBoxDataCon] False) NoParentTyCon NonRecursive False - + where + kv = kKiVar + k = mkTyVarTy kv + a:b:_ = tyVarList k + eqBoxDataCon :: DataCon -eqBoxDataCon = pcDataCon eqBoxDataConName [alphaTyVar, betaTyVar] [TyConApp eqPrimTyCon [mkTyVarTy alphaTyVar, mkTyVarTy betaTyVar]] eqTyCon +eqBoxDataCon = pcDataCon eqBoxDataConName args [TyConApp eqPrimTyCon (map mkTyVarTy args)] eqTyCon + where + kv = kKiVar + k = mkTyVarTy kv + a:b:_ = tyVarList k + args = [kv, a, b] \end{code} \begin{code} |