[GHC] #14848: -XDuplicateRecordFields breaks record expression splices

GHC ghc-devs at haskell.org
Sat Mar 24 22:35:24 UTC 2018


#14848: -XDuplicateRecordFields breaks record expression splices
-------------------------------------+-------------------------------------
        Reporter:  dailectic         |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.2
      Resolution:                    |             Keywords:  ORF
Operating System:  Linux             |         Architecture:  x86_64
 Type of failure:  GHC rejects       |  (amd64)
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by adamgundry):

 I think a possible fix here is to apply the approach described in `Note
 [Reifying field labels] from TcSplice` in the `HsRecFld` case of
 `DsMeta.repE`. That is, rather than representing the field as a `NameG`
 containing the mangled selector name (which isn't a legal variable name,
 let alone in scope), we could represent it as a `NameQ` containing the
 field label.

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


More information about the ghc-tickets mailing list