
#9069: -XDeriveTraversable should imply -XDeriveFunctor and -XDeriveFoldable -------------------------------------+------------------------------------ Reporter: sjoerd_visscher | Owner: Type: feature request | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by sjoerd_visscher): Right, thanks, I will do that! The main reason is that currently you have to quite a bit to just get a derived `Traversable` instance: 1. You have to add `deriving (Functor, Foldable, Traversable)` 2. You have to import `Data.Foldable` and `Data.Traversable` 3. You have to turn on 3 extensions. Item 1 is fine, we don't want any magic. Item 2 could be solved by moving `Foldable` and `Traversable` to the prelude. So the only thing that I can do right now is improve item 3. If you derive the `Traversable` instance it would be invalid to have an instance for `Functor` or `Foldable` that is not equiavalent to the derived instances, so it makes sense to turn those extensions on automatically. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9069#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler