#2953: deriving Functor, Foldable, Traversable
---------------------------------+------------------------------------------
Reporter: twanvl | Owner: twanvl
Type: feature request | Status: new
Priority: normal | Milestone: 6.12 branch
Component: Compiler | Version: 6.11
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Os: Unknown/Multiple
Architecture: Unknown/Multiple |
---------------------------------+------------------------------------------
Comment (by twanvl):
I'll get to work on the documentation.
Regarding the flag name:
* In a sense Functor and Foldable are specializations of Traversable, so
-XDeriveTraversable might make more sense. On the other hand, it is
possible to derive Functor instances for some types containing functions,
where it is not possible to make a Traversable instance.
* For Data and Typeable the flag is -XDeriveDataTypeable, so we could
also go with -XDeriveFunctorFoldableTraversable, but that is a bit long.
* The last alternative is to make three flags, one for each class. This
is slightly more work for the programmer if he wants to derive all three
instances.
If I had to choose, I think I would prefer the last alternative.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2953#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs