Skip to content

Commit aa06674

Browse files
committed
Make it build with ghc-9.8
Drop hw-aeson dependency on the way.
1 parent 47df6f4 commit aa06674

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

hedgehog-extras.cabal

+1-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ source-repository head
1919
common aeson { build-depends: aeson >= 2.1.0.0 }
2020
common aeson-pretty { build-depends: aeson-pretty >= 0.8.5 }
2121
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 }
2323
common bytestring { build-depends: bytestring }
2424
common deepseq { build-depends: deepseq }
2525
common Diff { build-depends: Diff }
@@ -40,7 +40,6 @@ common text { build-depends: text
4040
common time { build-depends: time >= 1.9.1 }
4141
common transformers { build-depends: transformers }
4242
common unliftio { build-depends: unliftio }
43-
common unordered-containers { build-depends: unordered-containers }
4443
common yaml { build-depends: yaml }
4544
common zlib { build-depends: zlib }
4645

@@ -84,7 +83,6 @@ library
8483
time,
8584
transformers,
8685
unliftio,
87-
unordered-containers,
8886
Win32,
8987
yaml,
9088
zlib,

src/Hedgehog/Extras/Stock/Aeson.hs

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@ module Hedgehog.Extras.Stock.Aeson
44
) where
55

66
import Data.Aeson
7+
import Data.Aeson.KeyMap (KeyMap)
78
import Data.Functor
8-
import Data.HashMap.Lazy
9-
import Data.Text
10-
import Prelude (($), (.))
119

1210
import qualified Data.Aeson.KeyMap as KM
1311

1412
-- | Rewrite a JSON object to another JSON object using the function 'f'.
1513
--
1614
-- 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)
1917
rewriteObject _ v = v
2018

2119
-- | Rewrite each element of a JSON array using the function 'f'.

0 commit comments

Comments
 (0)