Fix up yesterdays commit to TcSimplify; fixes broken HEAD
authorsimonpj@microsoft.com <unknown>
Tue, 12 Dec 2006 09:25:56 +0000 (09:25 +0000)
committersimonpj@microsoft.com <unknown>
Tue, 12 Dec 2006 09:25:56 +0000 (09:25 +0000)
compiler/typecheck/TcRnDriver.lhs
compiler/typecheck/TcRules.lhs
compiler/typecheck/TcSimplify.lhs

index 88dfe81..83d8321 100644 (file)
@@ -1038,9 +1038,8 @@ tcRnExpr hsc_env ictxt rdr_expr
     ((tc_expr, res_ty), lie)      <- getLIE (tcInferRho rn_expr) ;
     ((qtvs, _, dict_ids), lie_top) <- getLIE (tcSimplifyInfer smpl_doc (tyVarsOfType res_ty) lie)  ;
     tcSimplifyInteractive lie_top ;
-    qtvs' <- mappM zonkQuantifiedTyVar qtvs ;
 
-    let { all_expr_ty = mkForAllTys qtvs' $
+    let { all_expr_ty = mkForAllTys qtvs $
                        mkFunTys (map idType dict_ids)  $
                        res_ty } ;
     zonkTcType all_expr_ty
index 28be06e..25abd58 100644 (file)
@@ -82,11 +82,9 @@ tcRule (HsRule name act vars lhs fv_lhs rhs fv_rhs)
     tcSimplifyInferCheck loc
                         forall_tvs
                         lhs_dicts rhs_lie      `thenM` \ (forall_tvs1, rhs_binds) ->
-    zonkQuantifiedTyVars forall_tvs1           `thenM` \ forall_tvs2 ->
-       -- This zonk is exactly the same as the one in TcBinds.generalise
 
     returnM (HsRule name act
-                   (map (RuleBndr . noLoc) (forall_tvs2 ++ tpl_ids))   -- yuk
+                   (map (RuleBndr . noLoc) (forall_tvs1 ++ tpl_ids))   -- yuk
                    (mkHsDictLet lhs_binds lhs') fv_lhs
                    (mkHsDictLet rhs_binds rhs') fv_rhs)
 
index 1689dab..451e3b1 100644 (file)
@@ -657,7 +657,7 @@ tcSimplifyInfer
        :: SDoc
        -> TcTyVarSet           -- fv(T); type vars
        -> [Inst]               -- Wanted
-       -> TcM ([TcTyVar],      -- Tyvars to quantify (zonked)
+       -> TcM ([TcTyVar],      -- Tyvars to quantify (zonked and quantified)
                [Inst],         -- Dict Ids that must be bound here (zonked)
                TcDictBinds)    -- Bindings
        -- Any free (escaping) Insts are tossed into the environment
@@ -1172,7 +1172,7 @@ tcSimplifyRestricted      -- Used for restricted binding groups
        -> [Name]               -- Things bound in this group
        -> TcTyVarSet           -- Free in the type of the RHSs
        -> [Inst]               -- Free in the RHSs
-       -> TcM ([TyVar],        -- Tyvars to quantify (zonked)
+       -> TcM ([TyVar],        -- Tyvars to quantify (zonked and quantified)
                TcDictBinds)    -- Bindings
        -- tcSimpifyRestricted returns no constraints to
        -- quantify over; by definition there are none.