From 07545edca0c3c6e4b08a13c1ea5d29516e5290f3 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 16 Dec 2003 16:54:42 +0000 Subject: [PATCH] [project @ 2003-12-16 16:54:42 by simonmar] Add Show instance for Set --- Data/Set.hs | 3 +++ 1 file changed, 3 insertions(+) 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 -- 1.7.10.4