X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=ghc%2Fcompiler%2Ftypecheck%2FTcInstDcls.lhs;h=2a9570355549de54f27bb556687c34bce89399fc;hb=4166dff80e8ec94022a040318ff2759913fbbe06;hp=a8a3de04d9b37f485731572960fc031897604004;hpb=d00cf5b8622c0715a038129c6887bb677baa5996;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcInstDcls.lhs b/ghc/compiler/typecheck/TcInstDcls.lhs index a8a3de0..2a95703 100644 --- a/ghc/compiler/typecheck/TcInstDcls.lhs +++ b/ghc/compiler/typecheck/TcInstDcls.lhs @@ -31,9 +31,9 @@ import TcEnv ( TcEnv, tcExtendGlobalValEnv, tcExtendTyVarEnvForMeths, tcAddImportedIdInfo, tcInstId, tcLookupClass, InstInfo(..), pprInstInfo, simpleInstInfoTyCon, simpleInstInfoTy, - newDFunName, tcExtendTyVarEnv, tcGetInstEnv + newDFunName, tcExtendTyVarEnv ) -import InstEnv ( InstEnv, extendInstEnv, pprInstEnv ) +import InstEnv ( InstEnv, extendInstEnv ) import TcMonoType ( tcTyVars, tcHsSigType, kcHsSigType ) import TcSimplify ( tcSimplifyAndCheck ) import TcType ( zonkTcSigTyVars ) @@ -220,11 +220,11 @@ addInstInfos inst_env infos = addInstDFuns inst_env (map iDFunId infos) addInstDFuns :: InstEnv -> [DFunId] -> NF_TcM InstEnv addInstDFuns dfuns infos = getDOptsTc `thenTc` \ dflags -> - extendInstEnv dflags dfuns infos `bind` \ (inst_env', errs) -> + let + (inst_env', errs) = extendInstEnv dflags dfuns infos + in addErrsTc errs `thenNF_Tc_` returnTc inst_env' - where - bind x f = f x \end{code} \begin{code}