From ea6a162f9401f624be1254bb751c6586ee884eab Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Sat, 23 Jun 2007 19:06:53 +0000 Subject: [PATCH] Fix an error message `y' in the error message `x' is not a (visible) method of class `y' had gone missing. --- compiler/rename/RnEnv.lhs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/rename/RnEnv.lhs b/compiler/rename/RnEnv.lhs index 51b30c3..94a65ac 100644 --- a/compiler/rename/RnEnv.lhs +++ b/compiler/rename/RnEnv.lhs @@ -232,8 +232,7 @@ lookupInstDeclBndr :: Name -> Located RdrName -> RnM (Located Name) -- name is only in scope qualified. I.e. even if method op is -- in scope as M.op, we still allow plain 'op' on the LHS of -- an instance decl -lookupInstDeclBndr cls rdr = lookup_located_sub_bndr is_op - (ptext SLIT("method of class")) rdr +lookupInstDeclBndr cls rdr = lookup_located_sub_bndr is_op doc rdr where doc = ptext SLIT("method of class") <+> quotes (ppr cls) is_op gre@(GRE {gre_par = ParentIs n}) = n == cls -- 1.7.10.4