packages feed

conferer-yaml 1.0.0.0 → 1.1.0.0

raw patch · 3 files changed

+19/−7 lines, 3 filesdep ~confererdep ~conferer-aesonPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: conferer, conferer-aeson

API changes (from Hackage documentation)

+ Conferer.Source.Yaml: fromFilePath' :: FilePath -> IO Source
- Conferer.Source.Yaml: fromFilePath :: FilePath -> IO Source
+ Conferer.Source.Yaml: fromFilePath :: FilePath -> SourceCreator

Files

CHANGELOG.md view
@@ -8,9 +8,17 @@  Nothing +## [v1.1.0.0] 2021-03-01++### Changed++* Rename `fromFilePath` to `fromFilePath'`.+* Define a new `fromFilePath` whose type is `FilePath -> SourceCreator` instaed of `FilePath -> IO Source`.+ ## [v1.0.0.0] 2020-12-29  First release -[Unreleased]: https://github.com/ludat/conferer/compare/conferer-yaml_v1.0.0.0...HEAD+[Unreleased]: https://github.com/ludat/conferer/compare/conferer-yaml_v1.1.0.0...HEAD+[v1.1.0.0]: https://github.com/ludat/conferer/compare/conferer-yaml_v1.0.0.0...conferer-yaml_v1.1.0.0 [v1.0.0.0]: https://github.com/ludat/conferer/compare/v0.0.0.0...conferer-yaml_v1.0.0.0
conferer-yaml.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: ada51878e61d1455d4094686b329b46171a3ce3b73d1d9950447d4871073f2a6+-- hash: f0165eab1cb30f1958939d1fd33c120c5355b7d8cce50bc50697c28be7049e48  name:           conferer-yaml-version:        1.0.0.0+version:        1.1.0.0 synopsis:       Configuration for reading yaml files  description:    Library to abstract the parsing of many haskell config values from different config sources
src/Conferer/Source/Yaml.hs view
@@ -14,17 +14,21 @@ import Conferer.Source.Files import Conferer.Source --- | Create a 'SourceCreator' from a yaml file that we get from the env +-- | Create a 'SourceCreator' from a yaml file that we get from the env -- with the same logic as 'JSON.JSONSource' fromConfig :: Key -> SourceCreator fromConfig key config = do   filePath <- getFilePathFromEnv key "yaml" config-  fromFilePath filePath+  fromFilePath' filePath +-- | Create a 'SourceCreator' by reading the provided path as json+fromFilePath :: FilePath -> SourceCreator+fromFilePath filePath _config =+  fromFilePath' filePath  -- | Create a 'Source' by reading the provided path as json -fromFilePath :: FilePath -> IO Source-fromFilePath filePath = do+fromFilePath' :: FilePath -> IO Source+fromFilePath' filePath = do   configAsJson <- decodeFileEither filePath   case configAsJson of     Right jsonConfig -> return $ JSON.fromValue jsonConfig