From: simonmar Date: Tue, 16 Dec 2003 16:54:42 +0000 (+0000) Subject: [project @ 2003-12-16 16:54:42 by simonmar] X-Git-Tag: nhc98-1-18-release~429 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=07545edca0c3c6e4b08a13c1ea5d29516e5290f3;p=ghc-base.git [project @ 2003-12-16 16:54:42 by simonmar] Add Show instance for Set --- diff --git a/Data/Set.hs b/Data/Set.hs index 3e46e2c..3c81002 100644 --- a/Data/Set.hs +++ b/Data/Set.hs @@ -92,6 +92,9 @@ instance (Eq a) => Eq (Set a) where (MkSet set_1) == (MkSet set_2) = set_1 == set_2 (MkSet set_1) /= (MkSet set_2) = set_1 /= set_2 +instance Show e => Show (Set e) where + showsPrec p s = showsPrec p (setToList s) + -- but not so clear what the right thing to do is: {- NO: instance (Ord a) => Ord (Set a) where