packages feed

cfg 0.0.2.1 → 0.0.2.2

raw patch · 4 files changed

+12/−13 lines, 4 filesdep ~basedep ~bytestringdep ~doctestPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base, bytestring, doctest, free, hedgehog, hspec-hedgehog, megaparsec, text

API changes (from Hackage documentation)

+ Cfg.Parser: ($dmparseConfig) :: (ConfigParser a, ValueParser a) => KeyTree Text Text -> Either ConfigParseError a
- Cfg.Deriving.Assert: type AssertTopLevelRecord (constraint :: Type -> Constraint) a = Assert (IsTopLevelRecord (Rep a)) ('Text "🚫 Cannot derive " ':<>: 'ShowType constraint ':<>: 'Text " instance for " ':<>: 'ShowType a ':$$: ('Text "💡 " ':<>: 'ShowType constraint ':<>: 'Text " must be derived on a top level record type with named fields."))
+ Cfg.Deriving.Assert: type AssertTopLevelRecord (constraint :: Type -> Constraint) a = Assert IsTopLevelRecord Rep a 'Text "\128683 Cannot derive " ':<>: 'ShowType constraint ':<>: 'Text " instance for " ':<>: 'ShowType a ':$$: 'Text "\128161 " ':<>: 'ShowType constraint ':<>: 'Text " must be derived on a top level record type with named fields."
- Cfg.Deriving.Assert: type family IsTopLevelRecord f
+ Cfg.Deriving.Assert: type family IsTopLevelRecord (f :: k -> Type) :: Bool
- Cfg.Deriving.Config: ConfigOpts :: a -> ConfigOpts fieldModifier a
+ Cfg.Deriving.Config: ConfigOpts :: a -> ConfigOpts (fieldModifier :: k) a
- Cfg.Deriving.Config: ConfigRoot :: a -> ConfigRoot rootType fieldModifier a
+ Cfg.Deriving.Config: ConfigRoot :: a -> ConfigRoot (rootType :: k) (fieldModifier :: k1) a
- Cfg.Deriving.Config: [unConfigOptions] :: ConfigOpts fieldModifier a -> a
+ Cfg.Deriving.Config: [unConfigOptions] :: ConfigOpts (fieldModifier :: k) a -> a
- Cfg.Deriving.Config: [unConfigRoot] :: ConfigRoot rootType fieldModifier a -> a
+ Cfg.Deriving.Config: [unConfigRoot] :: ConfigRoot (rootType :: k) (fieldModifier :: k1) a -> a
- Cfg.Deriving.Config: class (KeyModifier r, KeyModifier f) => ConfigRootOptions r f
+ Cfg.Deriving.Config: class (KeyModifier r, KeyModifier f) => ConfigRootOptions (r :: k) (f :: k1)
- Cfg.Deriving.Config: class (KeyModifier t) => GetConfigOptions t
+ Cfg.Deriving.Config: class KeyModifier t => GetConfigOptions (t :: k)
- Cfg.Deriving.Config: newtype ConfigOpts fieldModifier a
+ Cfg.Deriving.Config: newtype ConfigOpts (fieldModifier :: k) a
- Cfg.Deriving.Config: newtype ConfigRoot rootType fieldModifier a
+ Cfg.Deriving.Config: newtype ConfigRoot (rootType :: k) (fieldModifier :: k1) a
- Cfg.Deriving.KeyModifier: class KeyModifier t
+ Cfg.Deriving.KeyModifier: class KeyModifier (t :: k)
- Cfg.Env: envSourceSep :: forall m. MonadIO m => Text -> KeyTree Text Text -> m (KeyTree Text Text)
+ Cfg.Env: envSourceSep :: MonadIO m => Text -> KeyTree Text Text -> m (KeyTree Text Text)
- Cfg.Env: printDotEnv :: forall a. ConfigSource a => FilePath -> IO ()
+ Cfg.Env: printDotEnv :: forall {k} (a :: k). ConfigSource a => FilePath -> IO ()
- Cfg.Env.Keys: showEnvKeys :: forall a. ConfigSource a => Text -> [Text]
+ Cfg.Env.Keys: showEnvKeys :: forall {k} (a :: k). ConfigSource a => Text -> [Text]
- Cfg.Parser: parseConfig :: (ConfigParser a, ValueParser a) => KeyTree Text Text -> Either ConfigParseError a
+ Cfg.Parser: parseConfig :: ConfigParser a => KeyTree Text Text -> Either ConfigParseError a
- Cfg.Parser.Config: defaultParseConfig :: forall a. (Generic a, GConfigParser (Rep a)) => ConfigOptions -> KeyTree Text Text -> Either ConfigParseError a
+ Cfg.Parser.Config: defaultParseConfig :: (Generic a, GConfigParser (Rep a)) => ConfigOptions -> KeyTree Text Text -> Either ConfigParseError a
- Cfg.Parser.Value: defaultValueParser :: forall a. (Generic a, GValueParser (Rep a)) => Parser a
+ Cfg.Parser.Value: defaultValueParser :: (Generic a, GValueParser (Rep a)) => Parser a
- Cfg.Source: class ConfigSource a
+ Cfg.Source: class ConfigSource (a :: k)
- Cfg.Source: type FetchSource m = KeyTree Text Text -> m (KeyTree Text Text)
+ Cfg.Source: type FetchSource (m :: Type -> Type) = KeyTree Text Text -> m KeyTree Text Text
- Cfg.Source.Config: defaultConfigSource :: forall a. (DefaultSource a, Generic a, GConfigSource (Rep a)) => ConfigOptions -> KeyTree Text Text
+ Cfg.Source.Config: defaultConfigSource :: (DefaultSource a, Generic a, GConfigSource (Rep a)) => ConfigOptions -> KeyTree Text Text
- Cfg.Source.Default: class DefaultSource a
+ Cfg.Source.Default: class DefaultSource (a :: k)
- KeyTree: data () => Free (f :: Type -> Type) a
+ KeyTree: data Free (f :: Type -> Type) a
- KeyTree: data () => Map k a
+ KeyTree: data Map k a
- KeyTree: type KeyForest key value = Map key (Free (Map key) value)
+ KeyTree: type KeyForest key value = Map key Free Map key value
- KeyTree: type KeyTree key value = Free (Map key) value
+ KeyTree: type KeyTree key value = Free Map key value

Files

cfg.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name:          cfg-version:       0.0.2.1+version:       0.0.2.2 synopsis:   Type directed application configuration parsing and accessors @@ -59,21 +59,21 @@     UndecidableInstances    build-depends:-    , base           >=4.16.0 && <4.19+    , base           >=4.16.0 && <4.20     , containers     >=0.6    && <0.7-    , free           >=5.0.1  && <5.2+    , free           >=5.0.1  && <5.3     , mtl            >=2.1    && <2.4     , pretty-simple  >=4.0    && <4.2-    , text           >=2.0    && <2.1+    , text           >=2.0    && <2.2    default-language:   Haskell2010  library   import:          common-opts   build-depends:-    , bytestring  >=0.11   && <0.12+    , bytestring  >=0.11   && <0.13     , errors      >=2.0.0  && <2.4-    , megaparsec  >=9.0.0  && <9.5+    , megaparsec  >=9.0.0  && <9.7     , vector      >=0.12.0 && <0.14    -- cabal-fmt: expand src@@ -118,12 +118,12 @@    build-depends:     , cfg-    , hedgehog            >=1.1   && <1.3+    , hedgehog            >=1.1   && <1.5     , hspec               >=2.9   && <2.12     , hspec-core          >=2.9   && <2.12     , hspec-discover      >=2.9   && <2.12     , hspec-expectations  >=0.7.0 && <0.9-    , hspec-hedgehog      >=0.0.1 && <0.1+    , hspec-hedgehog      >=0.0.1 && <0.2  test-suite documentation   import:         common-opts@@ -133,4 +133,4 @@   main-is:        Main.hs   build-depends:     , cfg-    , doctest  >=0.21.1 && <0.22+    , doctest  >=0.21.1 && <0.23
src/Cfg.hs view
@@ -474,8 +474,9 @@   , appConfigEnvironment :: Environment   }   deriving (Generic, Show)-  deriving (ConfigSource, ConfigParser)-   via (ConfigOpts [StripPrefix "appConfig", StripSuffix "Settings", ToUpper] AppConfig5)+  deriving+    (ConfigSource, ConfigParser)+    via (ConfigOpts [StripPrefix "appConfig", StripSuffix "Settings", ToUpper] AppConfig5)  instance DefaultSource AppConfig5 where   defaults "appConfigEnvironment" = Just "Development"
test/Cfg/Env/KeysSpec.hs view
@@ -1,7 +1,6 @@ module Cfg.Env.KeysSpec where  import Cfg.Deriving-import Cfg.Deriving.KeyModifier import Cfg.Env.Keys import Cfg.Options import Cfg.Source (ConfigSource)
test/Cfg/SourceSpec.hs view
@@ -4,7 +4,6 @@ import Cfg.Deriving.KeyModifier import Cfg.Deriving.Value import Cfg.Options-import Cfg.Parser import Cfg.Source import Cfg.Source.Default import Data.Map.Strict (empty, fromList, singleton)