[GHC] #9815: Runtime error with RecordWildCards and a non-record constructor

GHC ghc-devs at haskell.org
Fri Nov 21 13:02:51 UTC 2014


#9815: Runtime error with RecordWildCards and a non-record constructor
-------------------------------------+-------------------------------------
              Reporter:  akio        |            Owner:
                  Type:  feature     |           Status:  new
  request                            |        Milestone:
              Priority:  normal      |          Version:  7.8.3
             Component:  Compiler    |         Keywords:  RecordWildCards,
            Resolution:              |  warning
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:  GHC         |       Blocked By:
  accepts invalid program            |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

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

 In [changeset:"4ba4cc7aaaf2bff31bc8474c8ba40e1cbe3e3875/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="4ba4cc7aaaf2bff31bc8474c8ba40e1cbe3e3875"
 Fix Trac #9815

 Dot-dot record-wildcard notation is simply illegal for constructors
 without any named fields, but that was neither documented nor checked.
 This patch does so

 - Make the check in RnPat
 - Add test T9815
 - Fix CmmLayoutStack which was using the illegal form (!)
 - Document in user manual
 }}}

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


More information about the ghc-tickets mailing list