Missing instance declarations in base

Henning Thielemann lemming at henning-thielemann.de
Mon Jun 29 07:11:47 UTC 2015


On Mon, 29 Jun 2015, Fumiaki Kinoshita 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

They were certainly omitted earlier because of the RealFloat constraint of 
the (:+) constructor.


> Also, I wonder if () could be Storable:
> 
> instance Storable () where
>   sizeOf _ = 0
>   alignment _ = 1
>   peek _ = return ()
>   poke _ _ = return ()

This would allow me to remove the orphan instance from:

https://hackage.haskell.org/package/storable-tuple


More information about the Libraries mailing list