From: simonpj Date: Tue, 9 Nov 2004 17:38:01 +0000 (+0000) Subject: [project @ 2004-11-09 17:38:01 by simonpj] X-Git-Tag: Initial_conversion_from_CVS_complete~1464 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=0cf6f8c36250e64b5b2bdf0bd6ed10e71984becc;p=ghc-hetmet.git [project @ 2004-11-09 17:38:01 by simonpj] Remember to zonk the quantified type variables of a for-all type before forming the type --- diff --git a/ghc/compiler/typecheck/TcRnDriver.lhs b/ghc/compiler/typecheck/TcRnDriver.lhs index 02b586a..676792b 100644 --- a/ghc/compiler/typecheck/TcRnDriver.lhs +++ b/ghc/compiler/typecheck/TcRnDriver.lhs @@ -84,7 +84,7 @@ import TcHsSyn ( mkHsLet, zonkTopLExpr, zonkTopBndrs ) import TcHsType ( kcHsType ) import TcExpr ( tcCheckRho ) import TcIface ( loadImportedInsts ) -import TcMType ( zonkTcType ) +import TcMType ( zonkTcType, zonkQuantifiedTyVar ) import TcUnify ( unifyTyConApp ) import TcMatches ( tcStmtsAndThen, TcStmtCtxt(..) ) import TcSimplify ( tcSimplifyInteractive, tcSimplifyInfer ) @@ -903,8 +903,9 @@ 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