Deriving tweaking

Edward Kmett ekmett at gmail.com
Fri Aug 5 18:32:25 UTC 2016


Done and done! Retroactively. How is that for service? =)

-Edward

On Fri, Aug 5, 2016 at 2:08 PM, David Feuer <david.feuer at gmail.com> wrote:

> I know there's been some discussion about letting users select the
> deriving mechanism they want, but I'd like to propose a separate tweak to
> the defaults. Specifically, it's annoying to have to use three pragmas to
> let me write
>
> newtype Foo f a = Foo (f a) deriving (Functor, Foldable, Traversable)
> data Bar f a = Bar (f a) deriving (Functor, Foldable, Traversable)
>
> and more annoying still that I'll end up with Foldable and Functor
> instances for Foo that may be much worse than GND-derived ones.
>
> The tweaks I'm after:
>
> 1. Prefer GND to the built-in derivations for Functor and Foldable, and
> probably also Eq and Ord.
> 2. Make DeriveTraversable imply DeriveFunctor and DeriveFoldable.
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160805/867c9f4b/attachment.html>


More information about the ghc-devs mailing list