Haskell Foldable Wats

Marcin Mrotek marcin.jan.mrotek at gmail.com
Thu Feb 18 14:37:32 UTC 2016


>
> I also do not see why (a,a) could not be a container of exactly two
> elements, as opposed to current GHC which insists it is a container of
> exactly one element.  (Case for the mental institution, I'd say.)
>

Because this isn't how types in Haskell works. `Foo a a` always parsed to
`(Foo a) a` and no instance of any class can implement it differently than
`(Foo b) a`, unless you want to throw parametricity out of the window. This
has been long before `Foldable`.

Best regards,
Marcin Mrotek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20160218/4fcea468/attachment.html>


More information about the Libraries mailing list