on master help sign in
5 files changed+10−9
since splitsnapshots
unifiedsplit
.github/workflows/tests.yml+1−5 libyaml/package.yaml+1−1 libyaml/src/Text/Libyaml.hs+1−1 yaml/package.yaml+1−1 yaml/src/Data/Yaml/Config.hs+6−1
.github/workflows/tests.yml+1−5
@@ -14,16 +14,12 @@ jobs:
1414 fail-fast: false
1515 matrix:
1616 os: [ubuntu-latest, macos-latest, windows-latest]
17− resolver: [nightly, lts-20, lts-15, lts-14, lts-12, lts-11]
17+ resolver: [nightly, lts-22, lts-20, lts-17]
1818 exclude:
1919 - os: windows-latest
2020 resolver: lts-15
2121 - os: windows-latest
2222 resolver: nightly
23− include:
24− - os: ubuntu-latest
25− resolver: lts-9
26− # problems on macOS and Windows (https://github.com/snoyberg/yaml/pull/216#issuecomment-1585522312)
2723
2824 steps:
2925 - name: Clone project
libyaml/package.yaml+1−1
@@ -25,7 +25,7 @@ flags:
2525 default: false
2626
2727dependencies:
28−- base >=4.9.1 && <5 # GHC 8.0.2 and later
28+- base >=4.14 && <5 # GHC 8.10.1 and later
2929- bytestring >=0.9.1.4
3030- conduit >=1.2.8 && <1.4
3131- resourcet >=0.3 && <1.4
libyaml/src/Text/Libyaml.hs+1−1
@@ -776,7 +776,7 @@ encodeWith opts =
776776 close _ fbuf = withForeignPtr fbuf $ \b -> do
777777 ptr' <- c_get_buffer_buff b
778778 len <- c_get_buffer_used b
779− fptr <- newForeignPtr_ $ castPtr ptr'
779+ fptr <- newForeignPtr finalizerFree $ castPtr ptr'
780780 return $ B.fromForeignPtr fptr 0 $ fromIntegral len
781781
782782
yaml/package.yaml+1−1
@@ -34,7 +34,7 @@ flags:
3434 default: true
3535
3636dependencies:
37−- base >=4.9.1 && <5 # GHC 8.0.2 and later, meaning that Data.Semigroup is in base
37+- base >=4.14 && <5 # GHC 8.10.1 and later
3838- bytestring >=0.9.1.4
3939- transformers >=0.1
4040- mtl
yaml/src/Data/Yaml/Config.hs+6−1
@@ -5,7 +5,7 @@
55-- In particular, merging environment variables with yaml values
66--
77-- 'loadYamlSettings' is a high-level API for loading YAML and merging environment variables.
8−-- A yaml value of @_env:ENV_VAR:default@ will lookup the environment variable @ENV_VAR@.
8+-- A yaml value of @_env:ENV_VAR:default@ or just @_env:ENV_VAR@ will lookup the environment variable @ENV_VAR@.
99--
1010-- On a historical note, this code was taken directly from the yesod web framework's configuration module.
1111module Data.Yaml.Config
@@ -185,6 +185,11 @@ requireCustomEnv = RequireCustomEnv
185185--
186186-- > loadYamlSettings ["config/foo.yaml"] [] useEnv
187187--
188+-- Alternatively you can configure settings through the Yaml @Value@ directly in Haskell.
189+-- For example, to load up settings from only from environment variables, you can use:
190+--
191+-- > loadYamlSettings [] [object ["connectionString" .= ("_env:DATABASE_URL" :: String)]] requireEnv
192+--
188193-- @since 0.8.16
189194loadYamlSettings
190195 :: FromJSON settings