[Haskell-cafe] Block-wise lazy sequences in Haskell

Bryan O'Sullivan bos at serpentine.com
Wed Sep 5 14:14:58 EDT 2007

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. 

> 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.


More information about the Haskell-Cafe mailing list