[GHC] #9156: Duplicate record field

#9156: Duplicate record field ------------------------------------+------------------------------------- Reporter: wojteknar | Owner: Type: bug | Status: new Priority: low | Milestone: Component: Compiler | Version: 7.8.2 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- This compiles. {{{ #!haskell data D = D1 { f1 :: Int } | D2 { f1, f1 :: Int } -- Oops, duplicate }}} Probably harmless, but still. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9156 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9156: Duplicate record field ------------------------------------------------+-------------------------- Reporter: wojteknar | Owner: Type: bug | Status: new Priority: low | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC accepts invalid program | Unknown/Multiple Test Case: | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Changes (by wojteknar): * failure: None/Unknown => GHC accepts invalid program -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9156#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9156: Duplicate record field ------------------------------------------------+-------------------------- Reporter: wojteknar | Owner: gintas Type: bug | Status: new Priority: low | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC accepts invalid program | Unknown/Multiple Test Case: | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Changes (by nomeata): * owner: => gintas -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9156#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9156: Duplicate record field ------------------------------------------------+-------------------------- Reporter: wojteknar | Owner: gintas Type: bug | Status: new Priority: low | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC accepts invalid program | Unknown/Multiple Test Case: T9156 | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Changes (by gintas): * testcase: => T9156 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9156#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9156: Duplicate record field ------------------------------------------------+-------------------------- Reporter: wojteknar | Owner: gintas Type: bug | Status: new Priority: low | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC accepts invalid program | Unknown/Multiple Test Case: T9156 | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Comment (by gintas): Wait, some performance tests are failing, I don't think they're flukes. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9156#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9156: Duplicate record field ------------------------------------------------+-------------------------- Reporter: wojteknar | Owner: gintas Type: bug | Status: patch Priority: low | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC accepts invalid program | Unknown/Multiple Test Case: T9156 | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Changes (by gintas): * status: new => patch Comment: OK, the failures do look like a fluke, although I'm not quite sure. Could someone take a look? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9156#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9156: Duplicate record field ------------------------------------------------+-------------------------- Reporter: wojteknar | Owner: gintas Type: bug | Status: patch Priority: low | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC accepts invalid program | Unknown/Multiple Test Case: T9156 | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Changes (by gintas): * cc: nomeata (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9156#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9156: Duplicate record field ------------------------------------------------+-------------------------- Reporter: wojteknar | Owner: gintas Type: bug | Status: patch Priority: low | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC accepts invalid program | Unknown/Multiple Test Case: T9156 | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Comment (by gintas): The 0002-Refactored-record-field-duplicate-code-to-use-nested.patch is broken, I accidentally uploaded a stale version. Sorry about that. Use 0002-fixed-refactor.patch instead. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9156#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9156: Duplicate record field ------------------------------------------------+-------------------------- Reporter: wojteknar | Owner: gintas Type: bug | Status: patch Priority: low | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC accepts invalid program | Unknown/Multiple Test Case: T9156 | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Comment (by gintas): The patch should be good to apply. Could someone take a closer look? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9156#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9156: Duplicate record field ------------------------------------------------+-------------------------- Reporter: wojteknar | Owner: gintas Type: bug | Status: patch Priority: low | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC accepts invalid program | Unknown/Multiple Test Case: T9156 | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Comment (by nomeata): Sorry for the delay. The refactoring patch lost your comment, and I believe the code could use some comments. Also, your `dropOneUnloc (unloc v)` could be a `deleteBy (\v' -> unloc v == unloc v')` or `deleteBy ((==) `on` unloc)`, unless I’m mistaken. This would make the code a tad smaller and easier to read (assuming you add a comment that states that it is important here that `deleteBy` deletes only the first occurence). Very minor, but I slightly tripped over `(L loc name : r') ++ go remSeen' rs`, and would not have tripped over `(L loc name) : r' ++ go remSeen' rs`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9156#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9156: Duplicate record field -------------------------------------+------------------------------------- Reporter: wojteknar | Owner: gintas Type: bug | Status: patch Priority: low | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Differential Revisions: | Operating System: Unknown/Multiple Architecture: | Type of failure: GHC accepts Unknown/Multiple | invalid program Difficulty: Unknown | Test Case: T9156 Blocked By: | Blocking: Related Tickets: | -------------------------------------+------------------------------------- Comment (by gintas): Re-added the comment and fixed the cosmetic issues you mentioned, please take a look. Thanks. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9156#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9156: Duplicate record field -------------------------------------+------------------------------------- Reporter: wojteknar | Owner: gintas Type: bug | Status: patch Priority: low | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Differential Revisions: | Operating System: Unknown/Multiple Architecture: | Type of failure: GHC accepts Unknown/Multiple | invalid program Difficulty: Unknown | Test Case: T9156 Blocked By: | Blocking: Related Tickets: | -------------------------------------+------------------------------------- Comment (by nomeata): Looks good to me. I think I’ll try to create a Pharicator code review thingy tomorrow, just to get used to the new tool. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9156#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9156: Duplicate record field -------------------------------------+------------------------------------- Reporter: wojteknar | Owner: gintas Type: bug | Status: patch Priority: low | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Differential Revisions: Phab:D87 | Operating System: Unknown/Multiple Architecture: | Type of failure: GHC accepts Unknown/Multiple | invalid program Difficulty: Unknown | Test Case: T9156 Blocked By: | Blocking: Related Tickets: | -------------------------------------+------------------------------------- Changes (by nomeata): * differential: => Phab:D87 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9156#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9156: Duplicate record field
-------------------------------------+-------------------------------------
Reporter: wojteknar | Owner: gintas
Type: bug | Status: patch
Priority: low | Milestone:
Component: Compiler | Version: 7.8.2
Resolution: | Keywords:
Operating System: | Architecture: Unknown/Multiple
Unknown/Multiple | Difficulty: Unknown
Type of failure: GHC | Blocked By:
accepts invalid program | Related Tickets:
Test Case: T9156 |
Blocking: |
Differential Revisions: Phab:D87 |
-------------------------------------+-------------------------------------
Comment (by Joachim Breitner

#9156: Duplicate record field -------------------------------------+------------------------------------- Reporter: wojteknar | Owner: gintas Type: bug | Status: patch Priority: low | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: GHC | Blocked By: accepts invalid program | Related Tickets: Test Case: T9156 | Blocking: | Differential Revisions: Phab:D87 | -------------------------------------+------------------------------------- Comment (by nomeata): Applied. Sorry, Gintautas, for the delay and thanks for your second contribution to GHC! I hope there will be more to come :-) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9156#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9156: Duplicate record field -------------------------------------+------------------------------------- Reporter: wojteknar | Owner: gintas Type: bug | Status: closed Priority: low | Milestone: Component: Compiler | Version: 7.8.2 Resolution: fixed | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: GHC | Blocked By: accepts invalid program | Related Tickets: Test Case: T9156 | Blocking: | Differential Revisions: Phab:D87 | -------------------------------------+------------------------------------- Changes (by nomeata): * status: patch => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9156#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC