Add the ability to derive instances of Functor, Foldable, Traversable
authorsimonpj@microsoft.com <unknown>
Mon, 2 Feb 2009 13:48:29 +0000 (13:48 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 2 Feb 2009 13:48:29 +0000 (13:48 +0000)
commit1c15bee5a8fc004c16693d7d7a2d95b442549b66
tree47063d1b972081b645e2e2571a4088dba49b299e
parent97d5e75a63afc329096d94c74760415c586f7cec
Add the ability to derive instances of Functor, Foldable, Traversable

This patch is a straightforward extension of the 'deriving' mechanism.
The ability to derive classes Functor, Foldable, Traverable is controlled
by a single flag  -XDeriveFunctor.  (Maybe that's a poor name.)

Still to come: documentation

Thanks to twanvl for developing the patch
compiler/main/DynFlags.hs
compiler/prelude/PrelNames.lhs
compiler/typecheck/TcDeriv.lhs
compiler/typecheck/TcGenDeriv.lhs
compiler/utils/Util.lhs