[GHC] #16232: Add setField to HasField

GHC ghc-devs at haskell.org
Thu Jan 24 22:52:24 UTC 2019


#16232: Add setField to HasField
-------------------------------------+-------------------------------------
        Reporter:  adamgundry        |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:  8.10.1
       Component:  Compiler (Type    |              Version:  8.7
  checker)                           |
      Resolution:                    |             Keywords:  ORF
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):

 It seems quite straightforward to generate the necessary core. I think you
 mean that you would generate:

 {{{
 \ r x -> case r of MkT _ bar -> MkT x bar
 }}}

 You don't need to mention any wired-in Ids or anything so it seems simple?

 It also doesn't seem like a lot of work to me in the grand scheme of
 things so I wouldn't mind doing it every time one of these constraints is
 solved.

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


More information about the ghc-tickets mailing list