summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgeGiorgidze <>2018-10-11 09:48:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2018-10-11 09:48:00 (GMT)
commitd3faadf02e7e6e1dbce8d857e3f3a925b49dea99 (patch)
treed93294ced272ee7b155df1e023f1326fad91a5d1
parent40d359821a0c0f8ed03b29191e81805475e8c3ae (diff)
version 0.3.0.0HEAD0.3.0.0master
-rw-r--r--Data/Set/Monad.hs6
-rw-r--r--set-monad.cabal4
2 files changed, 6 insertions, 4 deletions
diff --git a/Data/Set/Monad.hs b/Data/Set/Monad.hs
index 889a90f..290641d 100644
--- a/Data/Set/Monad.hs
+++ b/Data/Set/Monad.hs
@@ -158,7 +158,6 @@ import qualified Data.Functor as F
import qualified Control.Applicative as A
import qualified Data.Foldable as Foldable
-import Data.Monoid
import Data.Foldable (Foldable)
import Control.Arrow
import Control.Monad
@@ -208,13 +207,16 @@ instance MonadPlus Set where
mzero = Zero
mplus = Plus
+instance Semigroup (Set a) where
+ (<>) = Plus
+
instance (Ord a) => Monoid (Set a) where
mempty = empty
mappend = union
mconcat = unions
instance Foldable Set where
- foldr f def m =
+ foldr f def m =
case m of
Prim s -> S.foldr f def s
Return a -> f a def
diff --git a/set-monad.cabal b/set-monad.cabal
index 1697b92..1998a13 100644
--- a/set-monad.cabal
+++ b/set-monad.cabal
@@ -1,5 +1,5 @@
name: set-monad
-version: 0.2.0.0
+version: 0.3.0.0
synopsis: Set monad
description:
The @set-monad@ library exports the @Set@ abstract data type and
@@ -88,5 +88,5 @@ source-repository head
library
exposed-modules: Data.Set.Monad
- build-depends: base >=4 && <5, deepseq, containers
+ build-depends: base >=4.9 && < 5, deepseq, containers
ghc-options: -O3 -Wall