Using Set: Hypergraph type

Marcin 'Qrczak' Kowalczyk qrczak@knm.org.pl
4 Sep 2001 18:06:10 GMT


Tue, 4 Sep 2001 20:28:55 +0300, Eray Ozkural <erayo@cs.bilkent.edu.tr> pisze:

> Okay, I guess I got it now. The (types of) elements of a Set ought
> to be instances of Ord. So I presume Edison supports only flat sets.

You can add an inefficient implementation of Ord (Set a) yourself:

instance Ord a => Ord (Set a) where
    compare s1 s2 = compare (toOrdList s1) (toOrdList s2)

toOrdList seems to be exported only module Collection.

If more than one module does this, they can't be used together.

-- 
 __("<  Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK