on master help sign in
.github/workflows/tests.yml+1−5
since splitsnapshots
unifiedsplit
@@ -14,16 +14,12 @@ jobs:
14 fail-fast: false
14 fail-fast: false
15 matrix:
15 matrix:
16 os: [ubuntu-latest, macos-latest, windows-latest]
16 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]
18 exclude:
18 exclude:
19 - os: windows-latest
19 - os: windows-latest
20 resolver: lts-15
20 resolver: lts-15
21 - os: windows-latest
21 - os: windows-latest
22 resolver: nightly
22 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)
27
23
28 steps:
24 steps:
29 - name: Clone project
25 - name: Clone project
libyaml/package.yaml+1−1
@@ -25,7 +25,7 @@ flags:
25 default: false
25 default: false
26
26
27dependencies:
27dependencies:
28−- base >=4.9.1 && <5 # GHC 8.0.2 and later
28+- base >=4.14 && <5 # GHC 8.10.1 and later
29- bytestring >=0.9.1.4
29- bytestring >=0.9.1.4
30- conduit >=1.2.8 && <1.4
30- conduit >=1.2.8 && <1.4
31- resourcet >=0.3 && <1.4
31- resourcet >=0.3 && <1.4
libyaml/src/Text/Libyaml.hs+1−1
@@ -776,7 +776,7 @@ encodeWith opts =
776 close _ fbuf = withForeignPtr fbuf $ \b -> do
776 close _ fbuf = withForeignPtr fbuf $ \b -> do
777 ptr' <- c_get_buffer_buff b
777 ptr' <- c_get_buffer_buff b
778 len <- c_get_buffer_used b
778 len <- c_get_buffer_used b
779− fptr <- newForeignPtr_ $ castPtr ptr'
779+ fptr <- newForeignPtr finalizerFree $ castPtr ptr'
780 return $ B.fromForeignPtr fptr 0 $ fromIntegral len
780 return $ B.fromForeignPtr fptr 0 $ fromIntegral len
781
781
782
782
yaml/package.yaml+1−1
@@ -34,7 +34,7 @@ flags:
34 default: true
34 default: true
35
35
36dependencies:
36dependencies:
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
38- bytestring >=0.9.1.4
38- bytestring >=0.9.1.4
39- transformers >=0.1
39- transformers >=0.1
40- mtl
40- mtl
yaml/src/Data/Yaml/Config.hs+6−1
@@ -5,7 +5,7 @@
5-- In particular, merging environment variables with yaml values
5-- In particular, merging environment variables with yaml values
6--
6--
7-- 'loadYamlSettings' is a high-level API for loading YAML and merging environment variables.
7-- '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@.
9--
9--
10-- On a historical note, this code was taken directly from the yesod web framework's configuration module.
10-- On a historical note, this code was taken directly from the yesod web framework's configuration module.
11module Data.Yaml.Config
11module Data.Yaml.Config
@@ -185,6 +185,11 @@ requireCustomEnv = RequireCustomEnv
185--
185--
186-- > loadYamlSettings ["config/foo.yaml"] [] useEnv
186-- > loadYamlSettings ["config/foo.yaml"] [] useEnv
187--
187--
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+--
188-- @since 0.8.16
193-- @since 0.8.16
189loadYamlSettings
194loadYamlSettings
190 :: FromJSON settings
195 :: FromJSON settings