Allow deriving Generic1
authorJose Pedro Magalhaes <jpm@cs.ox.ac.uk>
Thu, 21 Jun 2012 11:23:01 +0000 (12:23 +0100)
committerJose Pedro Magalhaes <jpm@cs.ox.ac.uk>
Thu, 21 Jun 2012 11:23:01 +0000 (12:23 +0100)
commit156ec95a8e92cc8314db134311d2fbb0269f0679
tree72090831abeb0b37028a73af71cae31cb7cc6d7e
parent2b3734853ae5ddb75f85bfcc4ab8842a9ba4b5e0
Allow deriving Generic1

This completes the support for generic programming introduced
in GHC 7.2. Generic1 allows defining generic functions that
operate on type containers, such as `fmap`, for instance.

Along the way we have fixed #5936 and #5939, allowing
deriving Generic/Generic1 for data families, and disallowing
deriving Generic/Generic1 for instantiated types.

Most of this patch is Nicolas Frisby's work.
compiler/basicTypes/OccName.lhs
compiler/prelude/PrelNames.lhs
compiler/typecheck/TcDeriv.lhs
compiler/typecheck/TcGenGenerics.lhs