X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcInstDcls.lhs;h=14c96aec431b7618756335dbdc951baf033b0d41;hb=04c3bfc687db82659a7fe5a8b0fa4244c52560b7;hp=e7c472b4751cbf3d863b209687da1596e0256eea;hpb=5e5310b3cb4f78e30cc7b90879eb016e97c214cb;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcInstDcls.lhs b/compiler/typecheck/TcInstDcls.lhs index e7c472b..14c96ae 100644 --- a/compiler/typecheck/TcInstDcls.lhs +++ b/compiler/typecheck/TcInstDcls.lhs @@ -21,7 +21,7 @@ import FamInst import FamInstEnv import TcDeriv import TcEnv -import RnEnv ( lookupImportedName ) +import RnEnv ( lookupGlobalOccRn ) import TcHsType import TcUnify import TcSimplify @@ -863,7 +863,7 @@ tcInstanceMethod loc clas tyvars dfun_dicts theta inst_tys { -- Build the typechecked version directly, -- without calling typecheck_method; -- see Note [Default methods in instances] - dm_name <- lookupImportedName (mkDefMethRdrName sel_name) + dm_name <- lookupGlobalOccRn (mkDefMethRdrName sel_name) -- Might not be imported, but will be an OrigName ; dm_id <- tcLookupId dm_name ; return (wrapId dm_wrapper dm_id, emptyBag) } } @@ -963,7 +963,7 @@ mustBeVarArgErr ty = wrongATArgErr :: Type -> Type -> SDoc wrongATArgErr ty instTy = sep [ ptext (sLit "Type indexes must match class instance head") - , ptext (sLit "Found") <+> ppr ty <+> ptext (sLit "but expected") <+> - ppr instTy + , ptext (sLit "Found") <+> quotes (ppr ty) + <+> ptext (sLit "but expected") <+> quotes (ppr instTy) ] \end{code}