[GHC] #14307: NamedFieldPuns should allow "ambiguous" field names

GHC ghc-devs at haskell.org
Tue Oct 3 13:45:22 UTC 2017


#14307: NamedFieldPuns should allow "ambiguous" field names
-------------------------------------+-------------------------------------
        Reporter:  mgsloan           |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  low               |            Milestone:
       Component:  Compiler          |              Version:  8.2.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Simon Peyton Jones <simonpj@…>):

 In [changeset:"cb767542307b41c91061e743a4a4f448949b34cf/ghc"
 cb767542/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="cb767542307b41c91061e743a4a4f448949b34cf"
 Suppress error cascade in record fields

 When a record contruction or pattern uses a data constructor
 that isn't in scope, we may produce spurious ambiguous-field
 errors (Trac #14307).  E.g.

    f (A { fld = x }) = e

 where 'A' is not in scope.  We want to draw attention to the
 out-of-scope data constructor first; once that is fixed we
 can think about the fields.

 This patch suppresses the field errors if the data con is out
 of scope.
 }}}

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


More information about the ghc-tickets mailing list