Add more type class instances for GHC.Generics
authorRyanGlScott <ryan.gl.scott@gmail.com>
Thu, 25 Feb 2016 13:49:48 +0000 (14:49 +0100)
committerBen Gamari <ben@smart-cactus.org>
Thu, 25 Feb 2016 14:41:55 +0000 (15:41 +0100)
commit673efccb3b348e9daf23d9e65460691bbea8586e
tree825b41d829a0e032a2db18386edd5a39036c2dc2
parent6319a8cf79cc1f1e25220113149ab48e5083321b
Add more type class instances for GHC.Generics

GHC.Generics provides several representation data types that have
obvious instances of various type classes in base, along with various
other types of meta-data (such as associativity and fixity).
Specifically, instances have been added for the following type classes
(where possible):

    - Applicative
    - Data
    - Functor
    - Monad
    - MonadFix
    - MonadPlus
    - MonadZip
    - Foldable
    - Traversable
    - Enum
    - Bounded
    - Ix
    - Generic1

Thanks to ocharles for starting this!

Test Plan: Validate

Reviewers: ekmett, austin, hvr, bgamari

Reviewed By: bgamari

Subscribers: RyanGlScott, thomie

Differential Revision: https://phabricator.haskell.org/D1937

GHC Trac Issues: #9043
12 files changed:
libraries/base/Control/Monad/Fix.hs
libraries/base/Control/Monad/Zip.hs
libraries/base/Data/Bifunctor.hs
libraries/base/Data/Data.hs
libraries/base/Data/Foldable.hs
libraries/base/Data/Traversable.hs
libraries/base/GHC/Generics.hs
libraries/base/changelog.md
testsuite/tests/annotations/should_fail/annfail10.stderr
testsuite/tests/ghci.debugger/scripts/break006.stderr
testsuite/tests/typecheck/should_fail/T10971b.stderr
testsuite/tests/typecheck/should_fail/T5095.stderr