[GHC] #5972: option to suppress (Monomorphic) record selector functions

GHC ghc-devs at haskell.org
Tue Sep 6 10:23:57 UTC 2016


#5972: option to suppress (Monomorphic) record selector functions
-------------------------------------+-------------------------------------
        Reporter:  AntC              |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:
      Resolution:                    |             Keywords:  records
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 mpickering):

 This sounds good in theory but there are some namespacing problems.

 Say that we just want to suppress the record selectors, that is easy
 enough to achieve, but the intention is clearly that users can then define
 their own selectors with whatever semantics they want with the same names
 as the field labels. A field label and record selector are currently the
 same thing. In order to resolve record updates, the current implementation
 looks up the record selector with the right name. It would seem that a
 correct solution would place field labels in a separate namespace to
 variables so they would become truly distinct and properly distinguish the
 record selector and the field label.

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


More information about the ghc-tickets mailing list