From ed5e8ba75b7cc189fc92f77052157bf5bf8f13d7 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Wed, 15 May 2019 15:28:56 +0200 Subject: [PATCH 1/5] fix monoid import warnings --- Data/Configurator/Config/Implementation.hs | 1 - Data/Configurator/FromValue/Implementation.hs | 1 - Data/Configurator/Parser/Implementation.hs | 1 - 3 files changed, 3 deletions(-) diff --git a/Data/Configurator/Config/Implementation.hs b/Data/Configurator/Config/Implementation.hs index 563fb85..abea8df 100644 --- a/Data/Configurator/Config/Implementation.hs +++ b/Data/Configurator/Config/Implementation.hs @@ -21,7 +21,6 @@ import Data.Typeable import Data.CritBit.Map.Lazy (CritBit) import qualified Data.CritBit.Map.Lazy as CB import qualified Data.List.Ordered as OL -import Data.Monoid import Data.Function (on) import Data.Text(Text) import qualified Data.Text as T diff --git a/Data/Configurator/FromValue/Implementation.hs b/Data/Configurator/FromValue/Implementation.hs index e5de9d0..9b11579 100644 --- a/Data/Configurator/FromValue/Implementation.hs +++ b/Data/Configurator/FromValue/Implementation.hs @@ -31,7 +31,6 @@ import Data.Configurator.Types.Internal ) import Data.Fixed (Fixed, HasResolution) import Data.Int(Int8, Int16, Int32, Int64) -import Data.Monoid import Data.Ratio ( Ratio, (%) ) import Data.Scientific ( Scientific, coefficient, base10Exponent, normalize diff --git a/Data/Configurator/Parser/Implementation.hs b/Data/Configurator/Parser/Implementation.hs index 3b3c82a..4e8247b 100644 --- a/Data/Configurator/Parser/Implementation.hs +++ b/Data/Configurator/Parser/Implementation.hs @@ -17,7 +17,6 @@ import qualified Data.Configurator.Config as C import Data.Configurator.Config.Implementation (ConfigPlan(..)) import Data.Configurator.Types (ConfigError) import Data.DList (DList) -import Data.Monoid import Data.Text (Text) import Data.Typeable (Typeable) From 9f371f8239727a3093cfb66195d0e54569ce945c Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Wed, 15 May 2019 15:31:07 +0200 Subject: [PATCH 2/5] Semigroup instance --- Data/Configurator/Parser/Implementation.hs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Data/Configurator/Parser/Implementation.hs b/Data/Configurator/Parser/Implementation.hs index 4e8247b..3d16120 100644 --- a/Data/Configurator/Parser/Implementation.hs +++ b/Data/Configurator/Parser/Implementation.hs @@ -149,11 +149,10 @@ instance ConfigParser ConfigParserA where -- of reliable dependency tracking in later versions of configurator-ng. newtype ConfigTransform = ConfigTransform (ConfigPlan ()) --- | 'mempty' is the identity 'ConfigTransform', 'mappend' is the composition +-- | 'mempty' is the identity 'ConfigTransform', <> is the composition -- of two 'ConfigTransform's. -instance Monoid ConfigTransform where - mempty = ConfigTransform (ConfigPlan ()) - (ConfigTransform x) `mappend` (ConfigTransform y) = (ConfigTransform (go x)) +instance Semigroup ConfigTransform where + (ConfigTransform x) <> (ConfigTransform y) = (ConfigTransform (go x)) where go (ConfigPlan _) = y go (Union a b) = Union (go a) (go b) @@ -161,6 +160,9 @@ instance Monoid ConfigTransform where go (Subconfig pre a) = Subconfig pre (go a) go Empty = Empty +instance Monoid ConfigTransform where + mempty = ConfigTransform (ConfigPlan ()) + -- | Conceptually, @'union' f g = \\config -> union\' (f config) (g config)@, -- where @union\'@ is the left-biased union of two 'Config's. union :: ConfigTransform -> ConfigTransform -> ConfigTransform From aaea07287ee269b65bbc3e699e2c132a6a023e4d Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Wed, 15 May 2019 15:32:04 +0200 Subject: [PATCH 3/5] unused import warnings --- tests/Test.hs | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/Test.hs b/tests/Test.hs index 1698b8d..9f4456f 100644 --- a/tests/Test.hs +++ b/tests/Test.hs @@ -13,7 +13,6 @@ import Data.Configurator import Data.Configurator.Parser import Data.Configurator.Types import Data.Function (on) -import Data.Functor import Data.Int import Data.List (sortBy) import Data.Maybe From 70438f45925bc4ba44d4bac3c623c0ac46e43c72 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Wed, 15 May 2019 15:34:09 +0200 Subject: [PATCH 4/5] stack.yaml resolver and critbit update (as yet unreleased) Update stack.yaml to work with recent GHC, and an unreleased critbit version that also works with recent GHC. --- stack.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stack.yaml b/stack.yaml index 49d98e6..f149f90 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,7 +1,7 @@ -resolver: lts-5.17 +resolver: lts-13.21 packages: - '.' extra-deps: -- critbit-0.2.0.0 +- critbit-0.2.1.0 From 8cbe6def8a07ce348bf479a711e5ad5cb80dfb3f Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Wed, 15 May 2019 15:40:03 +0200 Subject: [PATCH 5/5] version bump --- CHANGELOG.markdown | 4 ++++ configurator-ng.cabal | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown index 80f47da..17d1ea2 100644 --- a/CHANGELOG.markdown +++ b/CHANGELOG.markdown @@ -1,3 +1,7 @@ +### Version 0.0.0.2 (2019-05-15) + + * Cabal update: fix compile for recent GHC versions. + ### Version 0.0.0.1 (2016-10-30) * Documentation fixes: significant portions of the haddocks failed diff --git a/configurator-ng.cabal b/configurator-ng.cabal index 18b9a2d..a43193d 100644 --- a/configurator-ng.cabal +++ b/configurator-ng.cabal @@ -1,5 +1,5 @@ name: configurator-ng -version: 0.0.0.1 +version: 0.0.0.2 license: BSD3 license-file: LICENSE category: Configuration, Data