Ticket #3640 (closed merge: fixed)
NamedFieldPuns broken in where clauses
Description
The attached file compiles fine under GHC 6.10. However, under 6.12, it produces the error
BadPun.hs:8:17:
Conflicting definitions for `pun-right-hand-side'
In the binding group for: pun-right-hand-side, pun-right-hand-side,
pun-right-hand-side
Note that this affects the named field puns only in the where clause of badPun; goodPun, which uses them in the LHS of a top-level definition, does not have this problem.
A possibly interesting additional note is that if you change Record{f1,f2,... to Record{f1=f1,f2,..., you'll find that you get this error message instead:
BadPun.hs:8:23:
Conflicting definitions for `pun-right-hand-side'
In the binding group for: f1, pun-right-hand-side,
pun-right-hand-side
Changing f2 to f2=f2 as well makes the error go away, presumably because there's now only one pun-right-hand-side defined.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

