Felipe Lessa wrote:
> The builds seem fine, but we spot a (length xs) on the beginning.
> Maybe this is the culprit? We already know the size of the map (it was
> serialized), so it is just a matter of exporting
> 
> fromDistinctAscSizedList :: Int -> [(k, a)] -> Map k a

Excellent idea, what does stop you? fromDistinctAscList is already a
function with a precondition that is not checked.

> Too bad 'Map' is exported as an abstract data type and it's not
> straighforward to test this conjecture. Any ideas?

One really doesn't want to see the actual implementation (except for
debugging or tuning purposes), but maybe conversions to and from a fully
(and uniquely) balanced binary tree are desirable.
(a basic binary tree data type is still missing on hackage).

I think, equal maps should not yield different serialization results
just because the internal tree structure happens to be different, but
that's of course debatable.

Cheers Christian

Maybe the discussion should be continued on librar...@haskell.org?

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to