Skip to content

Commit 149885c

Browse files
VekhirrowanG077DigitalBrains1
authored
Support Aeson 2.2 (#2578)
Update nixpkgs to the latest unstable Co-authored-by: rowanG077 <[email protected]> Co-authored-by: Peter Lebbing <[email protected]>
1 parent bf71dcd commit 149885c

12 files changed

+39
-43
lines changed

.ci/stack-8.10.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ extra-deps:
1919
- prettyprinter-interp-0.2.0.0@sha256:45299b61bd6c27d594c1a72b5a8dd5734e791a59828725e4f4e420f3cc37232b,2016
2020
- infinite-list-0.1@sha256:4de250517ce75e128c766fbc1f23b5a778ea964e695e47f8e83e0f3b293091bf,2383
2121
- tasty-1.5@sha256:c62c96da1e9d65bf61ce583e9f7085eed1daeb62a45f3106ca252bf9ef87025b,2763
22+
- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154

.ci/stack-8.6.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ extra-deps:
3131
- prettyprinter-interp-0.2.0.0@sha256:45299b61bd6c27d594c1a72b5a8dd5734e791a59828725e4f4e420f3cc37232b,2016
3232
- infinite-list-0.1@sha256:4de250517ce75e128c766fbc1f23b5a778ea964e695e47f8e83e0f3b293091bf,2383
3333
- tasty-1.5@sha256:c62c96da1e9d65bf61ce583e9f7085eed1daeb62a45f3106ca252bf9ef87025b,2763
34+
- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154

.ci/stack-8.8.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ extra-deps:
2626
- prettyprinter-interp-0.2.0.0@sha256:45299b61bd6c27d594c1a72b5a8dd5734e791a59828725e4f4e420f3cc37232b,2016
2727
- infinite-list-0.1@sha256:4de250517ce75e128c766fbc1f23b5a778ea964e695e47f8e83e0f3b293091bf,2383
2828
- tasty-1.5@sha256:c62c96da1e9d65bf61ce583e9f7085eed1daeb62a45f3106ca252bf9ef87025b,2763
29+
- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154

.ci/stack-9.0.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ extra-deps:
1616
- prettyprinter-interp-0.2.0.0@sha256:45299b61bd6c27d594c1a72b5a8dd5734e791a59828725e4f4e420f3cc37232b,2016
1717
- infinite-list-0.1@sha256:4de250517ce75e128c766fbc1f23b5a778ea964e695e47f8e83e0f3b293091bf,2383
1818
- tasty-1.5@sha256:c62c96da1e9d65bf61ce583e9f7085eed1daeb62a45f3106ca252bf9ef87025b,2763
19+
- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154

.ci/stack-9.2.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ extra-deps:
1717
- prettyprinter-interp-0.2.0.0@sha256:7072e659fb902cbcab790c9cca2b0739f9f4b81b666a63f2140139950f05025d,2086
1818
- infinite-list-0.1@sha256:4de250517ce75e128c766fbc1f23b5a778ea964e695e47f8e83e0f3b293091bf,2383
1919
- tasty-1.5@sha256:c62c96da1e9d65bf61ce583e9f7085eed1daeb62a45f3106ca252bf9ef87025b,2763
20+
- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154

clash-lib/clash-lib.cabal

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ Library
140140
RecordWildCards
141141
TemplateHaskell
142142

143-
Build-depends: aeson >= 0.6.2.0 && < 2.2,
143+
Build-depends: aeson >= 0.6.2.0 && < 2.3,
144+
attoparsec-aeson >= 2.1 && < 2.3,
144145
aeson-pretty >= 0.8 && < 0.9,
145146
ansi-terminal >= 0.8.0.0 && < 1.1,
146147
array,
@@ -337,6 +338,7 @@ executable v16-upgrade-primitives
337338
Build-Depends:
338339
base,
339340
aeson,
341+
attoparsec-aeson,
340342
deepseq,
341343
yaml,
342344
bytestring,
@@ -404,6 +406,7 @@ test-suite unittests
404406
ghc-typelits-knownnat,
405407

406408
aeson,
409+
attoparsec-aeson,
407410
aeson-pretty,
408411
base,
409412
base16-bytestring,

clash-lib/src/Data/Aeson/Extra.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ import Data.List (intercalate)
2525
import Data.List.NonEmpty (NonEmpty (..))
2626
import qualified Data.List.NonEmpty as NE
2727
import Data.Tuple.Extra (second, first)
28-
import Data.Aeson (FromJSON, Result (..), fromJSON, json)
28+
import Data.Aeson (FromJSON, Result (..), fromJSON)
29+
import Data.Aeson.Parser (json)
2930
import Data.Attoparsec.Lazy (Result (..), parse)
3031
import Data.ByteString.Lazy (ByteString)
3132
import qualified Data.ByteString.Lazy as BS

flake.lock

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@
3636
# The versions of GHC that we want to be able to build / develop against
3737
# within the nix environment. Since nix is lazy, only derivations for
3838
# versions of GHC which are used are actually evaluated.
39-
ghcVersions = [ "ghc902" "ghc961" ];
39+
ghcVersions = [ "ghc902" "ghc962" ];
4040

4141
# We pick a single version of GHC to use by default within nix. This is
4242
# probably cleaner than always having N copies of each package / app and
4343
# being forced to refer to them by their GHC version.
44-
defaultGhcVersion = "ghc961";
44+
defaultGhcVersion = "ghc962";
4545

4646
# Overlays are not per-system, so let's only compute them once.
4747
# For each version of GHC we produce a `pkgs.clashPackages-ghcVER`, e.g.
48-
# `pkgs.clashPackages-ghc961`.
48+
# `pkgs.clashPackages-ghc962`.
4949
overlays =
5050
let
5151
makeOverlay =

nix/overlay-ghc902.nix

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,9 @@ in
88
# is basically abandonware it catches fire with brick 1.0+.
99
brick = doJailbreak prev.brick_0_70_1;
1010

11-
# Marked as broken in nixpkgs since it needs a newer hashable than the one
12-
# in the .cabal file uplodaed to hackage.
13-
concurrent-supply = doJailbreak (markUnbroken prev.concurrent-supply);
14-
1511
# Marked as broken in nixpkgs for this version of GHC.
1612
docopt = markUnbroken prev.docopt;
1713

18-
# The doctests crash for this package, but the main testsuite passes.
19-
generic-lens = dontCheck prev.generic-lens;
20-
21-
# For some reason, lens 5.1.1 didn't build properly.
22-
lens = prev.lens_5_2_2;
23-
2414
# Marked as broken in nixpkgs, since it specifies much older dependencies
2515
# than the defaults in nixpkgs.
2616
rewrite-inspector = doJailbreak (markUnbroken prev.rewrite-inspector);

nix/overlay-ghc961.nix renamed to nix/overlay-ghc962.nix

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ in
1212
# .cabal file currently uploaded to hackage.
1313
concurrent-supply = doJailbreak (markUnbroken prev.concurrent-supply);
1414

15-
# Use a newer version than the default in nixpkgs.
16-
doctest-parallel = prev.doctest-parallel_0_3_0_1;
17-
1815
# Use a branch with changes to support GHC 9.6.1.
1916
hint =
2017
prev.hint.overrideAttrs (_: {
@@ -27,16 +24,10 @@ in
2724
};
2825
});
2926

30-
# Latest hackage revision is not yet in nixpkgs.
31-
prettyprinter-interp = doJailbreak prev.prettyprinter-interp;
32-
3327
# Marked as broken in nixpkgs, since it specifies much older dependencies
3428
# than the defaults in nixpkgs.
3529
rewrite-inspector = doJailbreak (markUnbroken prev.rewrite-inspector);
3630

37-
# Use a newer version than the default in nixpkgs.
38-
singletons = prev.singletons_3_0_2;
39-
4031
# We want a version that matches with singletons-th, but the tests in here
4132
# are also a bit flaky since GHC 9.6 isn't officially supported.
4233
singletons-base = dontCheck prev.singletons-base_3_2;
@@ -54,5 +45,10 @@ in
5445
vector-binary-instances = doJailbreak prev.vector-binary-instances;
5546

5647
# Use a newer version than the default in nixpkgs.
57-
vty = prev.vty_5_38;
48+
th-abstraction = prev.th-abstraction_0_5_0_0;
49+
50+
# We can't use newer than 1.12 here: we need singletons 3.x (due to the cabal
51+
# file of `clash-testsuite`) but the changed `DConP` constructor in 1.13
52+
# stops `singletons-th` from building.
53+
doctest = prev.callHackage "doctest" "0.21.1" { };
5854
}

stack.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ extra-deps:
1515
- prettyprinter-interp-0.2.0.0@sha256:45299b61bd6c27d594c1a72b5a8dd5734e791a59828725e4f4e420f3cc37232b,2016
1616
- infinite-list-0.1@sha256:4de250517ce75e128c766fbc1f23b5a778ea964e695e47f8e83e0f3b293091bf,2383
1717
- tasty-1.5@sha256:c62c96da1e9d65bf61ce583e9f7085eed1daeb62a45f3106ca252bf9ef87025b,2763
18+
- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154

0 commit comments

Comments
 (0)