Commit a2415187 authored by simonpj's avatar simonpj
Browse files

[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
parent 991a868b
......@@ -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}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment