#3640: NamedFieldPuns broken in where clauses
---------------------------+------------------------------------------------
Reporter:  cjs             |          Owner:                
    Type:  bug             |         Status:  new           
Priority:  normal          |      Component:  Compiler      
 Version:  6.12.1 RC1      |       Severity:  major         
Keywords:  NamedFieldPuns  |       Testcase:                
      Os:  Linux           |   Architecture:  x86_64 (amd64)
---------------------------+------------------------------------------------
 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.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3640>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to