etc 0.4.0.2 → 0.4.0.3
raw patch · 4 files changed
+12/−5 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +6/−0
- etc.cabal +1/−1
- src/System/Etc/Internal/Extra/Printer.hs +4/−3
- src/System/Etc/Internal/Spec/Types.hs +1/−1
CHANGELOG.md view
@@ -1,3 +1,9 @@+0.4.0.3+----++* Remove bug that stop configuration to be rendered when a default+ value was an empty array+ 0.4.0.2 ----
etc.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.10 name: etc-version: 0.4.0.2+version: 0.4.0.3 license: MIT license-file: LICENSE copyright: 2017, 2018 Roman Gonzalez
src/System/Etc/Internal/Extra/Printer.hs view
@@ -148,9 +148,10 @@ brackets' = enclose (lbracket <> space) (space <> rbracket) layoutSourceValueDoc valueDocs sourceDoc = case valueDocs of- [] -> throwM $ InvalidConfiguration- (Just keyPath)- "Trying to render config entry with no values"+ [] ->+ -- [Default]+ -- [] (empty array)+ return $ sourceDoc <$$> indent 2 "[] (empty array)" [singleValueDoc] -> -- [Default]
src/System/Etc/Internal/Spec/Types.hs view
@@ -273,7 +273,7 @@ (JSON.Bool{} , CVTSingle CVTBool ) -> True (JSON.Object{}, CVTSingle CVTObject) -> True (JSON.Array arr, CVTArray inner) ->- if null arr then True else all (`matchesConfigValueType` (CVTSingle inner)) arr+ if null arr then True else all (`matchesConfigValueType` CVTSingle inner) arr _ -> False assertMatchingConfigValueType :: Monad m => JSON.Value -> ConfigValueType -> m ()