Stefan O'Rear wrote:
Bool is 32 bits, but Don is using UArray.  UArray is not parametric in
the element type, which means it's less generally useful (no UArray of
Complex Double, for instance), but conversely it is able to use more
efficient representations depending on the type.

Would be nice if it *could* somehow be parametric... but I have absolutely no idea how you'd do that. The transformation is self-evident enough to a human, but how do you explain it to a machine?

(I somewhat suspect you'd have to bake this into the compiler itself it you wanted *arbitrary* types. Otherwise you'd have to write some special class that knows how to pack and unpack the data from the array, perhaps as a bundle of Word8s or something? Doesn't sound hugely fast...)

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

Reply via email to