Missing instance declarations in base

Evan Laforge qdunkan at gmail.com
Mon Jun 29 20:57:15 UTC 2015


On Mon, Jun 29, 2015 at 1:40 PM, Henning Thielemann
<lemming at henning-thielemann.de> wrote:
> The Storable class is part of the FFI and thus I think we must comply to the
> system ABI.

I think it's actually kind of overloaded, because it has haskell-only
types like Char.

I actually think it's really dangerous and we should have a separate
Storable for each language, which only that language's types (that
just C at the moment).  I've already done it that way for quite a few
years now.

So I'm against tuples in Storable because tuples don't exist in C, so
you should really be using a record with a corresponding struct.

For non-FFI use a tuple makes sense, but aren't there lots of other
ways to do that?  E.g. I think Data.Vector.Unboxed has special
support, and binary serialization has Data.Binary, etc.


More information about the Libraries mailing list