From 3f1d7cd8eea305b13b39b304df23bbc680a729f0 Mon Sep 17 00:00:00 2001 From: Manuel M T Chakravarty Date: Thu, 18 Oct 2007 13:10:40 +0000 Subject: [PATCH] Fix typo that prevented zonking of rhs of EqInsts MERGE TO STABLE --- compiler/typecheck/Inst.lhs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/compiler/typecheck/Inst.lhs b/compiler/typecheck/Inst.lhs index 1032f91..66e72e4 100644 --- a/compiler/typecheck/Inst.lhs +++ b/compiler/typecheck/Inst.lhs @@ -99,6 +99,8 @@ import Outputable import Data.List import TypeRep import Class + +import Control.Monad ( liftM ) \end{code} @@ -555,11 +557,11 @@ zonkInst implic@(ImplicInst {}) zonkInst eqinst@(EqInst {tci_left = ty1, tci_right = ty2}) = do { co' <- eitherEqInst eqinst - (\covar -> return (mkWantedCo covar)) - (\co -> zonkTcType co >>= \coercion -> return (mkGivenCo coercion)) + (\covar -> return (mkWantedCo covar)) + (\co -> liftM mkGivenCo $ zonkTcType co) ; ty1' <- zonkTcType ty1 ; ty2' <- zonkTcType ty2 - ; return (eqinst {tci_co = co',tci_left=ty1',tci_right=ty2}) + ; return (eqinst {tci_co = co', tci_left= ty1', tci_right = ty2' }) } zonkInsts insts = mappM zonkInst insts -- 1.7.10.4