Proposal: Migrate Data.Functor.{Sum, Product, Compose} from transformers to base.

Edward Kmett ekmett at
Fri Jul 24 12:36:36 UTC 2015

Ryan: I'm proposing not moving Data.Functor.Constant at all and leaving
that module alone, unmoved.

I'm proposing rather adding Data.Functor.Const and having
Control.Applicative re-export Const from it rather than supply its own.

This allows us to follow the general pattern of having all the data types
available on display in the Data.Functor.* hierarchy, while still allowing
for the fact that Const won the convenience war a long time ago.

This avoids breaking any of the handful of users of the current Constant
data type, which could then be gracefully deprecated -- or not as Ross sees
fit, within his purview as the maintainer of the transformers package.


On Thu, Jul 23, 2015 at 11:13 PM, Ryan Scott < at>

> I really like this proposal, especially since having convenient Eq1,
> Ord1, Read1, Show1, etc. instances is something I've wanted for a
> while.
> I have some questions about some specifics:
> 1. Just to verify, you're proposing a breaking change in which
> Data.Functor.Constant no longer exports Constant, but rather Const?
> 2. You mentioned that the additions to base could use
> DefaultSignatures. Could you give an example of how this would work?
> _______________________________________________
> Libraries mailing list
> Libraries at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list