projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b5ec986
)
TcHsType: set the kind for tyvars that occur in explicit code types
author
Adam Megacz
<megacz@cs.berkeley.edu>
Mon, 30 May 2011 01:46:11 +0000
(18:46 -0700)
committer
Adam Megacz
<megacz@cs.berkeley.edu>
Mon, 30 May 2011 01:46:11 +0000
(18:46 -0700)
compiler/typecheck/TcHsType.lhs
patch
|
blob
|
history
diff --git
a/compiler/typecheck/TcHsType.lhs
b/compiler/typecheck/TcHsType.lhs
index
f7f3da6
..
669c61c
100644
(file)
--- a/
compiler/typecheck/TcHsType.lhs
+++ b/
compiler/typecheck/TcHsType.lhs
@@
-37,6
+37,7
@@
import TcMType
import TcUnify
import TcIface
import TcType
import TcUnify
import TcIface
import TcType
+import TypeRep ( ecKind )
import {- Kind parts of -} Type
import Var
import VarSet
import {- Kind parts of -} Type
import Var
import VarSet
@@
-366,6
+367,7
@@
kc_hs_type (HsPArrTy ty) = do
return (HsPArrTy ty', liftedTypeKind)
kc_hs_type (HsModalBoxType ecn ty) = do
return (HsPArrTy ty', liftedTypeKind)
kc_hs_type (HsModalBoxType ecn ty) = do
+ kc_check_hs_type (HsTyVar ecn) (EK ecKind EkUnk)
ty' <- kcLiftedType ty
return (HsModalBoxType ecn ty', liftedTypeKind)
ty' <- kcLiftedType ty
return (HsModalBoxType ecn ty', liftedTypeKind)
@@
-594,11
+596,9
@@
ds_type (HsPArrTy ty) = do
return (mkPArrTy tau_ty)
ds_type (HsModalBoxType ecn ty) = do
return (mkPArrTy tau_ty)
ds_type (HsModalBoxType ecn ty) = do
- ecn' <- ds_app (HsTyVar ecn) []
tau_ty <- dsHsType ty
checkWiredInTyCon hetMetCodeTypeTyCon
tau_ty <- dsHsType ty
checkWiredInTyCon hetMetCodeTypeTyCon
- return (mkHetMetCodeTypeTy (tcGetTyVar "totally bogus, dude" ecn') tau_ty)
-
+ return (mkHetMetCodeTypeTy (mkTyVar ecn ecKind) tau_ty)
ds_type (HsTupleTy boxity tys) = do
tau_tys <- dsHsTypes tys
ds_type (HsTupleTy boxity tys) = do
tau_tys <- dsHsTypes tys