summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2012-02-16 13:48:09 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2012-02-16 13:48:09 +0000
commitd31e9d6a44842206f341bac8d692aae5a6d6ed00 (patch)
tree4fbd841d6eefeea921093aa7740a08c296b74119
parentde9bae8846510b76a1d9ad1830c1116318351c8b (diff)
downloadhaskell-d31e9d6a44842206f341bac8d692aae5a6d6ed00.tar.gz
Wibbles to the ATyVar changes
-rw-r--r--compiler/typecheck/TcHsSyn.lhs3
-rw-r--r--compiler/typecheck/TcRnTypes.lhs9
2 files changed, 8 insertions, 4 deletions
diff --git a/compiler/typecheck/TcHsSyn.lhs b/compiler/typecheck/TcHsSyn.lhs
index 73361aefaa..cce80af5d8 100644
--- a/compiler/typecheck/TcHsSyn.lhs
+++ b/compiler/typecheck/TcHsSyn.lhs
@@ -1159,10 +1159,11 @@ zonkEvBind env (EvBind var term)
-- Fast path for variable-variable bindings
-- NB: could be optimized further! (e.g. SymCo cv)
| Just cv <- getTcCoVar_maybe co
- -> do { let cv' = zonkIdOcc env cv -- Just lazily look up
+ -> do { let cv' = zonkIdOcc env cv -- Just lazily look up
term' = EvCoercion (TcCoVarCo cv')
var' = setVarType var (varType cv')
; return (EvBind var' term') }
+
-- Ugly safe and slow path
_ -> do { var' <- {-# SCC "zonkEvBndr" #-} zonkEvBndr env var
; term' <- zonkEvTerm env term
diff --git a/compiler/typecheck/TcRnTypes.lhs b/compiler/typecheck/TcRnTypes.lhs
index 8ff3ce3f76..b353943488 100644
--- a/compiler/typecheck/TcRnTypes.lhs
+++ b/compiler/typecheck/TcRnTypes.lhs
@@ -225,8 +225,8 @@ data TcGblEnv
-- Updated at intervals (e.g. after dealing with types and classes)
tcg_inst_env :: InstEnv,
- -- ^ Instance envt for /home-package/ modules; Includes the dfuns in
- -- tcg_insts
+ -- ^ Instance envt for all /home-package/ modules;
+ -- Includes the dfuns in tcg_insts
tcg_fam_inst_env :: FamInstEnv, -- ^ Ditto for family instances
-- Now a bunch of things about this module that are simply
@@ -429,6 +429,9 @@ data TcLclEnv -- Changes as we move inside an expression
tcl_env :: TcTypeEnv, -- The local type environment: Ids and
-- TyVars defined in this module
+
+ tcl_tidy :: TidyEnv, -- Used for tidying types; contains all
+ -- in-scope type variables (but not term variables)
tcl_tyvars :: TcRef TcTyVarSet, -- The "global tyvars"
-- Namely, the in-scope TyVars bound in tcl_env,
@@ -566,7 +569,7 @@ data TcTyThing
tct_closed :: TopLevelFlag, -- See Note [Bindings with closed types]
tct_level :: ThLevel }
- | ATyVar Name TcType -- The type to which the lexically scoped type vaiable
+ | ATyVar Name TcTyVar -- The type to which the lexically scoped type vaiable
-- is currently refined. We only need the Name
-- for error-message purposes; it is the corresponding
-- Name in the domain of the envt