
27 Oct
2011
27 Oct
'11
1:24 p.m.
On Thu, Oct 27, 2011 at 10:17 AM, Edward Z. Yang
wrote: Here's the definition of Tip.
data IntMap a = Bin {-# UNPACK #-} !Prefix {-# UNPACK #-} !Mask !(IntMap a) !(IntMap a) | Tip {-# UNPACK #-} !Key a | Nil
You're right. I forgot the definition of the data type itself. I guess there's no function in the API currently that takes a key parameter and isn't strict in that parameter because the key is either
* compared to another key, or * inserted into the map
which both causes the key to be evaluated.
I believe delete undefined Nil does not terminate with current definition, but would terminate if the explicit seq would not be present. Cheers, Milan