X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FInst.lhs;h=66e72e4bce558929c1c146f0e235c58d92bd76c6;hp=1032f91c60acd8f85bd7623b3f3abc9243fdcffe;hb=3f1d7cd8eea305b13b39b304df23bbc680a729f0;hpb=e71c0818e3c5d7b0f8a681f887b6ee00532948a9 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