[GHC] #9526: Add missing Generic instances in base

GHC ghc-devs at haskell.org
Sun Sep 28 08:12:39 UTC 2014


#9526: Add missing Generic instances in base
-------------------------------------+-------------------------------------
              Reporter:  nh2         |            Owner:  dreixel
                  Type:  feature     |           Status:  new
  request                            |        Milestone:  7.10.1
              Priority:  normal      |          Version:  7.8.3
             Component:              |         Keywords:
  libraries/base                     |     Architecture:  Unknown/Multiple
            Resolution:              |       Difficulty:  Moderate (less
      Operating System:              |  than a day)
  Unknown/Multiple                   |       Blocked By:
       Type of failure:              |  Related Tickets:
  None/Unknown                       |
             Test Case:              |
              Blocking:  9527        |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by dreixel):

 Actually, I'm thinking that perhaps we should delete the existing
 `Generic` instances for base types. They don't really add much; the only
 thing I can think of is that you can find out the module and datatype
 name. Other than that, any generic function will still have to provide
 adhoc behaviour for types such as `Int`, because there is no generic
 behaviour for these base types.

 Also, this doesn't really block #9527, as far as I can see. You can derive
 `Generic` for a datatype that contains `Integer`, for example, which
 doesn't have a `Generic` instance. Things only fail when you try to use a
 generic function that does not have an instance for `Integer`.

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


More information about the ghc-tickets mailing list