[GHC] #9156: Duplicate record field

GHC ghc-devs at haskell.org
Mon Jul 7 08:24:55 UTC 2014


#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


More information about the ghc-tickets mailing list