Skip to content

Commit 1d95907

Browse files
committed
Fix shake-bench to build with aeson 2.x
1 parent 4bfa6c1 commit 1d95907

File tree

1 file changed

+4
-2
lines changed
  • shake-bench/src/Development/Benchmark

1 file changed

+4
-2
lines changed

shake-bench/src/Development/Benchmark/Rules.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,10 @@ instance FromJSON GitCommit where
504504
parseJSON o@(Object _) = do
505505
let keymap = o ^. _Object
506506
case toList keymap of
507-
[(name, String gitName)] -> pure $ GitCommit gitName (Just name) Nothing True
508-
[(name, Object props)] ->
507+
-- excuse me for the hack to maintain compatibility with aeson 2.0
508+
[(T.pack . show -> name, String gitName)] ->
509+
pure $ GitCommit gitName (Just name) Nothing True
510+
[(T.pack . show -> name, Object props)] ->
509511
GitCommit
510512
<$> props .:? "git" .!= name
511513
<*> pure (Just name)

0 commit comments

Comments
 (0)