[GHC] #11173: Infix declarations for record fields with DuplicateRecordFields are broken

GHC ghc-devs at haskell.org
Fri Dec 11 22:17:18 UTC 2015


#11173: Infix declarations for record fields with DuplicateRecordFields are broken
-------------------------------------+-------------------------------------
        Reporter:  kanetw            |                Owner:  adamgundry
            Type:  bug               |               Status:  patch
        Priority:  high              |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  7.11
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #11167            |  Differential Rev(s):  Phab:D1600
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"6e56ac58a6905197412d58e32792a04a63b94d7e/ghc"
 6e56ac58/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="6e56ac58a6905197412d58e32792a04a63b94d7e"
 Fix infix record field fixity (#11167 and #11173).

 This extends D1585 with proper support for infix duplicate record
 fields.  In particular, it is now possible to declare record fields as
 infix in a module for which `DuplicateRecordFields` is enabled, fixity
 is looked up correctly and a readable (although unpleasant) error
 message is generated if multiple fields with different fixities are in
 scope.

 As a bonus, `DEPRECATED` and `WARNING` pragmas now work for
 duplicate record fields. The pragma applies to all fields with the
 given label.

 In addition, a couple of minor `DuplicateRecordFields` bugs, which were
 pinpointed by the `T11167_ambig` test case, are fixed by this patch:

   - Ambiguous infix fields can now be disambiguated by putting a type
     signature on the first argument

   - Polymorphic type constructor signatures (such as `ContT () IO a` in
     `T11167_ambig`) now work for disambiguation

 Parts of this patch are from D1585 authored by @KaneTW.

 Test Plan: New tests added.

 Reviewers: KaneTW, bgamari, austin

 Reviewed By: bgamari

 Subscribers: thomie, hvr

 Differential Revision: https://phabricator.haskell.org/D1600

 GHC Trac Issues: #11167, #11173
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11173#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list