[Haskell-cafe] Possible Improvements

Don Stewart dons at galois.com
Mon Dec 3 01:31:37 EST 2007


dons:
> 
>  * Full strictness       == teh suckness. 
>  * Mixed lazy and strict == flexible and efficient data types.
> 
> Makes me wonder why Map is strict in the spine,
> 
>     data Map k a  = Tip 
>                   | Bin {-# UNPACK #-} !Size !k a !(Map k a) !(Map k a)
> 

Spencer points out that being sized-balanced, subtree sizes must be
computed on insertion, so may as well make the structure spine strict
anyway.

-- Don


More information about the Libraries mailing list