Henning Thielemann wrote:

I thought it must be possible to define an unboxed array type with Storable elements.

Yes, this just hasn't been done. There would be a few potentially tricky corners, of course; Storable instances are not required to be fixed in size, though all the precanned instances are. Using arbitrary Storable instances would make it necessary to scan an array linearly to get to a particular element, defeating one of the advantages of e.g. ByteStrings.

Further on, I wonder why pairs are not instances of Storable.

I think it hasn't been done simply because it hasn't been done. The upcoming fusion-based list rewrite might hold some promise for relieving the pressure for this kind of work.

        <b
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to