1. Bryan O'Sullivan
  2. critbit

Commits

Flaviu Andrei Csernik  committed 2f3a088

Add Monoid instance for Set k.

  • Participants
  • Parent commits fd90250
  • Branches default

Comments (0)

Files changed (1)

File Data/CritBit/Set.hs

View file
 instance (Show a) => Show (Set a) where
     show s = "fromList " ++ show (toList s)
 
+instance CritBitKey k => Monoid (Set k) where
+    mempty  = empty
+    mappend = union
+    mconcat = unions 
+
 instance Foldable Set where
     foldMap f (Set (CritBit n)) = foldSet f n