projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd0c472
)
[project @ 2003-12-16 16:54:42 by simonmar]
author
simonmar
<unknown>
Tue, 16 Dec 2003 16:54:42 +0000
(16:54 +0000)
committer
simonmar
<unknown>
Tue, 16 Dec 2003 16:54:42 +0000
(16:54 +0000)
Add Show instance for Set
Data/Set.hs
patch
|
blob
|
history
diff --git
a/Data/Set.hs
b/Data/Set.hs
index
3e46e2c
..
3c81002
100644
(file)
--- 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