Set, Map libraries

Adrian Hey ahey at
Fri Jun 3 16:47:48 EDT 2005

On Thursday 02 Jun 2005 10:18 am, Jean-Philippe Bernardy wrote:
> The definition of the Set datatype being
> data Set a    = Tip
>               | Bin {-# UNPACK #-} !Size a !(Set a) !(Set a)
> type Size     = Int
> It seems your're out of luck when it comes to very large sets.
> Also, since the structure is strict, it makes little sense to support
> 4-million-element sets.

I'd be interested to know why you say that. What would you use instead
if you needed 4-million-element sets?

The AVL trees in my implementation are strict and perfectly capable
of supporting such sets. Same should be true of Data.Set too AFAICS.

Adrian Hey  

More information about the Glasgow-haskell-users mailing list