File tree 2 files changed +4
-8
lines changed
2 files changed +4
-8
lines changed 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 }
@@ -40,7 +40,6 @@ common text { build-depends: text
40
40
common time { build-depends : time >= 1.9.1 }
41
41
common transformers { build-depends : transformers }
42
42
common unliftio { build-depends : unliftio }
43
- common unordered-containers { build-depends : unordered-containers }
44
43
common yaml { build-depends : yaml }
45
44
common zlib { build-depends : zlib }
46
45
@@ -84,7 +83,6 @@ library
84
83
time,
85
84
transformers,
86
85
unliftio,
87
- unordered-containers,
88
86
Win32,
89
87
yaml,
90
88
zlib,
Original file line number Diff line number Diff line change @@ -4,18 +4,16 @@ module Hedgehog.Extras.Stock.Aeson
4
4
) where
5
5
6
6
import Data.Aeson
7
+ import Data.Aeson.KeyMap (KeyMap )
7
8
import Data.Functor
8
- import Data.HashMap.Lazy
9
- import Data.Text
10
- import Prelude (($) , (.) )
11
9
12
10
import qualified Data.Aeson.KeyMap as KM
13
11
14
12
-- | Rewrite a JSON object to another JSON object using the function 'f'.
15
13
--
16
14
-- All other JSON values are preserved.
17
- rewriteObject :: (HashMap Text Value -> HashMap Text Value ) -> Value -> Value
18
- rewriteObject f (Object hm) = Object (KM. fromHashMapText . f . KM. toHashMapText $ hm)
15
+ rewriteObject :: (KeyMap Value -> KeyMap Value ) -> Value -> Value
16
+ rewriteObject f (Object hm) = Object (f hm)
19
17
rewriteObject _ v = v
20
18
21
19
-- | Rewrite each element of a JSON array using the function 'f'.
You can’t perform that action at this time.
0 commit comments