Missing instance declarations in base

Edward Kmett ekmett at gmail.com
Mon Jun 29 15:00:35 UTC 2015


On Mon, Jun 29, 2015 at 2:56 AM, Fumiaki Kinoshita <fumiexcel at gmail.com>
wrote:

> I found some missing instances in the base package. The instances below
> are almost unique by parametricity.
>
> Data.Complex:
>   instance Functor Complex
>   instance Applicative Complex
>   instance Foldable Complex -- real first
>   instance Traversable Complex
>

I've had to have orphans for these in order to make linear work for years
now. No objection to adding them. They were blocked before by the RealFloat
a => data type context.


> Data.Functor.Identity:
>   instance Monoid a => Monoid (Identity a)
>
> Control.Applicative:
>   instance Foldable ZipList
>   instance Traversable ZipList
>
> I'm going to write a patch if there is no issue with them.
>
> Also, I wonder if () could be Storable:
>
> instance Storable () where
>   sizeOf _ = 0
>   alignment _ = 1
>   peek _ = return ()
>   poke _ _ = return ()
>

No objection from me to any of them; a very strong +1.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20150629/592b657f/attachment.html>


More information about the Libraries mailing list