
#10512: Generic instances missing for Int32, Word64 etc. -------------------------------------+------------------------------------- Reporter: andreas.abel | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Core Libraries | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * cc: ekmett (added) Comment:
All I know is that when I tried to generate the Binary instances for my data types, I got the complaint about missing Generic instances for Int32 and Word64.
Really? I'm not sure why this would be the case, since in all of the examples I've seen, `Generic` instances don't require that a datatype's arguments also be `Generic`. For example, if you have this: {{{#!hs {-# LANGUAGE DeriveAnyClass, DeriveGeneric #-} data T = T Int32 Word64 deriving (Binary, Generic) }}} Then the generic machinery in `binary` only requires that `Int32` and `Word64` be `Binary` instances. Might I ask what your use case is? It seems ''very'' unlikely that we're going to be adding `Generic` instances for base types like these going forwards. In fact, we're going to [http://git.haskell.org/ghc.git/blobdiff/d4bcd05d7df3138429abdf43d3e3eb8f6da2... remove] the `Generic` instances for `Char`, `Double`, `Float`, and `Int` in GHC 8.0 for the reasons that Pedro and Ed described. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10512#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler