PROPOSAL: Add instances to Data.Monoid newtype wrappers

Oliver Charles ollie at ocharles.org.uk
Thu Dec 11 16:00:26 UTC 2014


Sean Leather <sean.leather at gmail.com> writes:

> As of base 4.7.0.1, none of the newtype wrappers in Data.Monoid have
> instances for:
>
>    - Typeable
>    - Data
>    - Functor
>
>
> It looks like the base library repository has AutoDeriveTypeable, so I
> presume that takes care of the Typeable instances. It also looks like First
> and Last now have Functor instances, amongst others.
>
> In particular, I would like to add Functor instances for all parameterized
> types, where applicable (i.e. Dual, Sum, Product).
>
> In general, I think we should add whatever other instances make sense. Data
> came to mind. Others?

+1, I believe the general feeling is: add canonical type class instances
whether one exists. These instances certainly make sense.

-- ocharles
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/libraries/attachments/20141211/cb01f25a/attachment-0001.sig>


More information about the Libraries mailing list