
6 Jul
2005
6 Jul
'05
11:48 a.m.
The bug is right there in split. Data/IntMap.hs needs: *************** *** 750,755 **** --- 750,756 ---- split k t = case t of Bin p m l r + | nomatch k p m -> if k>p then (t,Nil) else (Nil,t) | zero k m -> let (lt,gt) = split k l in (lt,union gt r) | otherwise -> let (lt,gt) = split k r in (union l lt,gt) Tip ky y *************** *** 764,769 **** --- 765,771 ---- splitLookup k t = case t of Bin p m l r + | nomatch k p m -> if k>p then (t,Nothing,Nil) else (Nil,Nothing,t) | zero k m -> let (lt,found,gt) = splitLookup k l in (lt,found,union gt r) | otherwise -> let (lt,found,gt) = splitLookup k r in (union l lt,found,gt) Tip ky y