packages feed

map-syntax 0.2.0.2 → 0.3

raw patch · 2 files changed

+39/−18 lines, 2 filesdep +semigroupsdep ~basedep ~containersdep ~hspec

Dependencies added: semigroups

Dependency ranges changed: base, containers, hspec, mtl, transformers

Files

map-syntax.cabal view
@@ -1,5 +1,5 @@ name:           map-syntax-version:        0.2.0.2+version:        0.3 synopsis:       Syntax sugar for defining maps description:     Haskell's canonical list of tuples syntax for defining maps is not very@@ -13,15 +13,22 @@ build-type:     Simple cabal-version:  >= 1.10 category:       Data Structures-Tested-With:    GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1 +Tested-With:+  GHC == 7.4.2,+  GHC == 7.6.3,+  GHC == 7.8.4,+  GHC == 7.10.2,+  GHC == 8.0.1,+  GHC == 8.2.1,+  GHC == 8.4.1+ extra-source-files:   .ghci,   LICENSE,   README.md,   runCoverage.sh - Library   hs-source-dirs: src   default-language: Haskell2010@@ -29,18 +36,18 @@   exposed-modules:     Data.Map.Syntax -   build-depends:-    base                       >= 4   && < 5,+    base                       >= 4.3 && < 4.12,     containers                 >= 0.3 && < 0.6,     mtl                        >= 2.0 && < 2.3 -  if impl(ghc >= 6.12.0)-    ghc-options: -Wall -fwarn-tabs -funbox-strict-fields-                 -fno-warn-unused-do-bind-  else-    ghc-options: -Wall -fwarn-tabs -funbox-strict-fields+  ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -fno-warn-unused-do-bind +  -- See https://ghc.haskell.org/trac/ghc/wiki/Migration/8.0#base-4.9.0.0+  if impl(ghc >= 8.0)+    ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances+  else+    build-depends: semigroups == 0.18.*  source-repository head   type:     git@@ -56,12 +63,19 @@   default-language: Haskell2010    ghc-options: -Wall -fwarn-tabs++  -- See https://ghc.haskell.org/trac/ghc/wiki/Migration/8.0#base-4.9.0.0+  if impl(ghc >= 8.0)+    ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances+  else+    build-depends: semigroups == 0.18.*+   build-depends:-    base                       >= 4        && < 5,-    containers                 >= 0.3      && < 0.6,+    base,+    containers,     deepseq                    >= 1.3      && < 2,     HUnit                      >= 1.2      && < 2,-    mtl                        >= 2.0      && < 2.3,+    mtl,     QuickCheck                 >= 2.3.0.2  && < 3,-    hspec                      >= 2.2.3    && < 2.4,+    hspec                      >= 2.2.3    && < 2.6,     transformers               >= 0.3      && < 0.6
src/Data/Map/Syntax.hs view
@@ -52,8 +52,10 @@  #if !MIN_VERSION_base(4,8,0) import           Control.Applicative-import           Data.Monoid #endif+#if !MIN_VERSION_base(4,11,0)+import           Data.Semigroup+#endif ------------------------------------------------------------------------------  @@ -92,10 +94,15 @@   -------------------------------------------------------------------------------instance Monoid (MapSyntax k v) where-  mempty = return $! ()-  mappend = (>>) +instance Semigroup (MapSyntax k v) where+  (<>) = (>>)++instance Monoid (MapSyntax k v) where+  mempty = pure $! ()+#if !MIN_VERSION_base(4,11,0)+  mappend = (<>)+#endif  ------------------------------------------------------------------------------ -- | Convenient type alias that will probably be used most of the time.