Double seems to truncate to Int while values outside of the bounds go
to zero.  Obviously there would be no way to have a one to one mapping
as Double is often in excess of 64 bits while Int is often 32 bits.
These recent questions are really more about knowing the tool
(library) you are using.  Double can't be used as a key in IntMat, but
it can now be used as a key in EnumMap - if it works for your needs
then great!

Thomas


On Mon, Aug 10, 2009 at 10:37 AM, Louis
Wasserman<[email protected]> wrote:
> Pardon my asking, but are fromEnum and toEnum guaranteed to preserve order
> on types like Double?  I'd like to see a Double-backed Patricia tree map,
> but are we certain that EnumMap as presented will behave properly on such
> types?
>
> Louis Wasserman
> [email protected]
>
> _______________________________________________
> Haskell-Cafe mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to