File tree 3 files changed +9
-10
lines changed
3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 25
25
strategy :
26
26
fail-fast : false
27
27
matrix :
28
- ghc : ["8.10.7", "9.2.7", "9.6.1"]
28
+ ghc : ["8.10.7", "9.2.7", "9.6.3", "9.8. 1"]
29
29
os : [ubuntu-latest, macos-latest, windows-latest]
30
30
cabal : ["3.10.1.0"]
31
31
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ source-repository head
19
19
common aeson { build-depends : aeson >= 2.1.0.0 }
20
20
common aeson-pretty { build-depends : aeson-pretty >= 0.8.5 }
21
21
common async { build-depends : async }
22
- common base { build-depends : base >= 4.12 && < 4.19 }
22
+ common base { build-depends : base >= 4.12 && < 4.20 }
23
23
common bytestring { build-depends : bytestring }
24
24
common deepseq { build-depends : deepseq }
25
25
common Diff { build-depends : Diff }
@@ -41,7 +41,6 @@ common text { build-depends: text
41
41
common time { build-depends : time >= 1.9.1 }
42
42
common transformers { build-depends : transformers }
43
43
common unliftio { build-depends : unliftio }
44
- common unordered-containers { build-depends : unordered-containers }
45
44
common yaml { build-depends : yaml }
46
45
common zlib { build-depends : zlib }
47
46
@@ -86,7 +85,6 @@ library
86
85
time,
87
86
transformers,
88
87
unliftio,
89
- unordered-containers,
90
88
Win32,
91
89
yaml,
92
90
zlib,
Original file line number Diff line number Diff line change
1
+ {-# LANGUAGE LambdaCase #-}
2
+
1
3
module Hedgehog.Extras.Stock.Aeson
2
4
( rewriteObject
3
5
, rewriteArrayElements
4
6
) where
5
7
6
8
import Data.Aeson
7
- import Data.Functor
8
- import Data.HashMap.Lazy
9
- import Data.Text
9
+ import Data.Aeson.KeyMap (KeyMap )
10
10
import Prelude ((.) , ($) )
11
11
12
12
import qualified HaskellWorks.Data.Aeson.Compat.Map as KM
@@ -21,6 +21,7 @@ rewriteObject _ v = v
21
21
-- | Rewrite each element of a JSON array using the function 'f'.
22
22
--
23
23
-- All other JSON values are preserved.
24
- rewriteArrayElements :: (Value -> Value ) -> Value -> Value
25
- rewriteArrayElements f (Array hm) = Array (fmap f hm)
26
- rewriteArrayElements _ v = v
24
+ rewriteObject :: (KeyMap Value -> KeyMap Value ) -> Value -> Value
25
+ rewriteArrayElements f = \ case
26
+ Array hm -> Array (fmap f hm)
27
+ v -> v
You can’t perform that action at this time.
0 commit comments