Missing instance declarations in base

Edward Kmett ekmett at gmail.com
Mon Jun 29 20:32:05 UTC 2015


It depends. The problem is ultimately that folks use Storable for many
things. Sometimes it is native interop, but sometimes it is for serializing
out to a known binary file format, etc. In the absence of these extra
instances we do not have to choose its "real" role. If we added them then
we'd start committing to one of those scenarios.

-Edward


On Mon, Jun 29, 2015 at 12:46 PM, Mike Izbicki <mike at izbicki.me> wrote:

> Are the alignment issues for tuples not something that CPP could fix?
>
> On Mon, Jun 29, 2015 at 8:18 AM, Edward Kmett <ekmett at gmail.com> wrote:
> > The main problem with adding those in general is that then we have to get
> > deeper into the business of packing and alignment. You need to add the
> > spacers for when the second structure isn't aligned with the first, and
> the
> > logic for that isn't cross-platform friendly.
> >
> > -Edward
> >
> >
> >
> > On Mon, Jun 29, 2015 at 11:04 AM, Henning Thielemann
> > <lemming at henning-thielemann.de> wrote:
> >>
> >>
> >> On Mon, 29 Jun 2015, Edward Kmett wrote:
> >>
> >>> 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.
> >>
> >>
> >> Btw. what about Storable (a,b) and Storable (a,b,c)?
> >
> >
> >
> > _______________________________________________
> > Libraries mailing list
> > Libraries at haskell.org
> > http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20150629/b1eefbff/attachment.html>


More information about the Libraries mailing list