effectful-config-file 0.1.2.3 → 0.1.2.4
raw patch · 5 files changed
+30/−9 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +6/−0
- effectful-config-file.cabal +1/−1
- src/Data/Config.hs +16/−6
- src/Effectful/Config.hs +5/−1
- src/Effectful/Config/Log.hs +2/−1
CHANGELOG.md view
@@ -1,3 +1,9 @@+## [1.2.4](https://github.com/haskell-github-trust/effectful-config-file/compare/1.2.3...1.2.4) (2026-11-16)++### Bug Fixes++* switch stackage to nightly ([489ff28](https://github.com/haskell-github-trust/effectful-config-file/commit/489ff28d4b87e31805a427ad7f26a5e0002a27e3))+ ## [1.2.3](https://github.com/haskell-github-trust/effectful-config-file/compare/1.2.2...1.2.3) (2026-11-11) ### Bug Fixes
effectful-config-file.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: effectful-config-file-version: 0.1.2.3+version: 0.1.2.4 synopsis: Config-file effect for effectful description: Config-file parser and utilities to use in conjunction with effectful category: Configuration
src/Data/Config.hs view
@@ -21,6 +21,7 @@ import Control.Monad (guard, void, (<=<)) import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.Char8 as B (pack)+import Data.Functor ((<&>)) import Data.List (isPrefixOf) import Data.Text (Text) import qualified Data.Text as T (pack, unpack)@@ -145,7 +146,11 @@ either (\e -> warnAt l (errorBundlePretty e) >> fromValue v) pure- (runParser configValueParser ("ConfigValue " <> show (typeOf @a undefined)) (T.unpack t))+ ( runParser+ configValueParser+ ("ConfigValue " <> show (typeOf @a undefined))+ (T.unpack t)+ ) fromValue v = Literal <$> fromValue v -- | Wraps a config value fetch in a @config.fetch@ span tagged with the@@ -158,7 +163,11 @@ -> Eff es a withConfigSpan source key act = do tp <- getGlobalTracerProvider- let tracer = makeTracer tp (instrumentationLibrary "effectful-config-file" "0.1.0.0") tracerOptions+ let tracer =+ makeTracer+ tp+ (instrumentationLibrary "effectful-config-file" "0.1.0.0")+ tracerOptions inSpan' tracer "config.fetch" defaultSpanArguments $ \sp -> do addAttribute sp "config.source" source addAttribute sp "config.key" key@@ -177,7 +186,10 @@ addAttribute sp "config.found" (either (const False) (const True) r) pure r -rethrowMissing :: IOE :> es => Either IOException b -> Eff es b+rethrowMissing+ :: IOE :> es+ => Either IOException b+ -> Eff es b rethrowMissing = either (liftIO . ioError) pure instance ConfigParse a => ConfigFetch (ConfigValue a) where@@ -193,9 +205,7 @@ $ \sp -> do fp' <- if "~/" `isPrefixOf` fp- then do- home <- liftIO getHomeDirectory- pure $ home </> drop 2 fp+ then liftIO getHomeDirectory <&> (</> drop 2 fp) else pure fp logDebug $ "fetching config value from file " <> T.pack fp
src/Effectful/Config.hs view
@@ -132,7 +132,11 @@ -> Eff es c readConfig' path = do tp <- getGlobalTracerProvider- let tracer = makeTracer tp (instrumentationLibrary "effectful-config-file" "0.1.0.0") tracerOptions+ let tracer =+ makeTracer+ tp+ (instrumentationLibrary "effectful-config-file" "0.1.0.0")+ tracerOptions inSpan' tracer "config.read" defaultSpanArguments $ \sp -> do addAttribute sp "config.path" (T.pack path) processResult . decode' =<< liftIO (T.readFile path)
src/Effectful/Config/Log.hs view
@@ -37,7 +37,8 @@ type instance DispatchOf Log = Static WithSideEffects -newtype instance StaticRep Log = Log (Loc -> LogSource -> LogLevel -> LogStr -> IO ())+newtype instance StaticRep Log+ = Log (Loc -> LogSource -> LogLevel -> LogStr -> IO ()) -- | Run the t'Log' effect with a @monad-logger@ style logging function. --