Missing instance declarations in base

Andreas Abel andreas.abel at ifi.lmu.de
Mon Jun 29 09:33:35 UTC 2015


+1.

On 29.06.2015 08:56, 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
>
> 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 ()
>
>
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>


-- 
Andreas Abel  <><      Du bist der geliebte Mensch.

Department of Computer Science and Engineering
Chalmers and Gothenburg University, Sweden

andreas.abel at gu.se
http://www2.tcs.ifi.lmu.de/~abel/


More information about the Libraries mailing list