Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update for recent GHC #9

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.markdown
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion Data/Configurator/Config/Implementation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion Data/Configurator/FromValue/Implementation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions Data/Configurator/Parser/Implementation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -150,18 +149,20 @@ 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)
go (Superconfig pre a) = Superconfig pre (go a)
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
Expand Down
2 changes: 1 addition & 1 deletion configurator-ng.cabal
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion tests/Test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down