From a2415187cc4dd695de8e477a99b2b971390d14fa Mon Sep 17 00:00:00 2001 From: simonpj Date: Fri, 7 Sep 2001 13:38:55 +0000 Subject: [PATCH] [project @ 2001-09-07 13:38:55 by simonpj] Improve the error message for duplicate or invalid binders in a binding group. [Consequence: rnfail034 should not be an expected failure any more] MERGE WITH STABLE BRANCH --- ghc/compiler/rename/RnBinds.lhs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/rename/RnBinds.lhs b/ghc/compiler/rename/RnBinds.lhs index 8cb0902..1ec05fa 100644 --- a/ghc/compiler/rename/RnBinds.lhs +++ b/ghc/compiler/rename/RnBinds.lhs @@ -217,8 +217,7 @@ rnMonoBinds mbinds sigs thing_inside -- Non-empty monobinds = -- Extract all the binders in this group, -- and extend current scope, inventing new names for the new binders -- This also checks that the names form a set - bindLocatedLocalsRn (text "In a binding group") - mbinders_w_srclocs $ \ new_mbinders -> + bindLocatedLocalsRn doc mbinders_w_srclocs $ \ new_mbinders -> let binder_set = mkNameSet new_mbinders in @@ -246,6 +245,9 @@ rnMonoBinds mbinds sigs thing_inside -- Non-empty monobinds returnRn (result, delListFromNameSet all_fvs new_mbinders) where mbinders_w_srclocs = collectLocatedMonoBinders mbinds + doc = text "In the binding group for" <+> pp_bndrs mbinders_w_srclocs + pp_bndrs [(b,_)] = quotes (ppr b) + pp_bndrs bs = fsep (punctuate comma [ppr b | (b,_) <- bs]) \end{code} -- 1.7.10.4