To answer just one of Jan Skibinski's questions: 

> +   Haskell extension libraries define a bunch of Word types. 
>     An attempt to show that Haskell can be numerically efficient?

The motivation for adding Word{8,16,32,64} was to make it easier to
interface to foreign libraries which use these types.  The names
are supposed to be completely unambiguous so that library designers
know exactly what they're getting.

The design does not include a type "Word" which, like "Int" could
contain as many bits as the implementor felt like.

We argued for a while about including a type for unsigned ints of
unbounded size.  We didn't do so because we can always add it later
and because we had no compelling need.  (The lack of compelling need
is important because it's much easier to design something right if 
you're planning to use it next week.)


So, no I don't think we were worrying about efficiency when we added these.
In fact, Word{8,16,32} are represented as 32 bit numbers in Hugs
and most arithmetic operations are just normal 32 bit operations.
We only convert them to the right size when we compare them, print
them, etc (ie for operations where the result will be affected).


-- 
Alastair Reid              Yale Haskell Project Hacker
[EMAIL PROTECTED]  http://WWW.CS.Yale.EDU/homes/reid-alastair/



Reply via email to