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. Cheers, JP.