[GHC] #10577: Use empty cases where appropriate when deriving instances for empty types

GHC ghc-devs at haskell.org
Thu Nov 2 17:30:45 UTC 2017


#10577: Use empty cases where appropriate when deriving instances for empty types
-------------------------------------+-------------------------------------
        Reporter:  rwbarton          |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.11
      Resolution:                    |             Keywords:  deriving
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #13117, #7401     |  Differential Rev(s):  Phab:D4047
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"1317ba625d40fbd51cb0538b3fde28f412f30c01/ghc"
 1317ba62/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="1317ba625d40fbd51cb0538b3fde28f412f30c01"
 Implement the EmptyDataDeriving proposal

 This implements the `EmptyDataDeriving` proposal put forth in
 https://github.com/ghc-proposals/ghc-
 proposals/blob/dbf51608/proposals/0006-deriving-empty.rst.
 This has two major changes:

 * The introduction of an `EmptyDataDeriving` extension, which
   permits directly deriving `Eq`, `Ord`, `Read`, and `Show` instances
   for empty data types.
 * An overhaul in the code that is emitted in derived instances for
   empty data types. To see an overview of the changes brought forth,
   refer to the changes to the 8.4.1 release notes.

 Test Plan: ./validate

 Reviewers: bgamari, dfeuer, austin, hvr, goldfire

 Reviewed By: bgamari

 Subscribers: rwbarton, thomie

 GHC Trac Issues: #7401, #10577, #13117

 Differential Revision: https://phabricator.haskell.org/D4047
 }}}

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


More information about the ghc-tickets mailing list