diff --git a/.ci/stack-8.10.yaml b/.ci/stack-8.10.yaml index 82065e0edf..fda404426f 100644 --- a/.ci/stack-8.10.yaml +++ b/.ci/stack-8.10.yaml @@ -19,3 +19,4 @@ extra-deps: - prettyprinter-interp-0.2.0.0@sha256:45299b61bd6c27d594c1a72b5a8dd5734e791a59828725e4f4e420f3cc37232b,2016 - infinite-list-0.1@sha256:4de250517ce75e128c766fbc1f23b5a778ea964e695e47f8e83e0f3b293091bf,2383 - tasty-1.5@sha256:c62c96da1e9d65bf61ce583e9f7085eed1daeb62a45f3106ca252bf9ef87025b,2763 +- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154 diff --git a/.ci/stack-8.6.yaml b/.ci/stack-8.6.yaml index 02670cb3c2..9bff45bf12 100644 --- a/.ci/stack-8.6.yaml +++ b/.ci/stack-8.6.yaml @@ -31,3 +31,4 @@ extra-deps: - prettyprinter-interp-0.2.0.0@sha256:45299b61bd6c27d594c1a72b5a8dd5734e791a59828725e4f4e420f3cc37232b,2016 - infinite-list-0.1@sha256:4de250517ce75e128c766fbc1f23b5a778ea964e695e47f8e83e0f3b293091bf,2383 - tasty-1.5@sha256:c62c96da1e9d65bf61ce583e9f7085eed1daeb62a45f3106ca252bf9ef87025b,2763 +- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154 diff --git a/.ci/stack-8.8.yaml b/.ci/stack-8.8.yaml index 48ce93a3a8..821630b930 100644 --- a/.ci/stack-8.8.yaml +++ b/.ci/stack-8.8.yaml @@ -26,3 +26,4 @@ extra-deps: - prettyprinter-interp-0.2.0.0@sha256:45299b61bd6c27d594c1a72b5a8dd5734e791a59828725e4f4e420f3cc37232b,2016 - infinite-list-0.1@sha256:4de250517ce75e128c766fbc1f23b5a778ea964e695e47f8e83e0f3b293091bf,2383 - tasty-1.5@sha256:c62c96da1e9d65bf61ce583e9f7085eed1daeb62a45f3106ca252bf9ef87025b,2763 +- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154 diff --git a/.ci/stack-9.0.yaml b/.ci/stack-9.0.yaml index c947f28cef..c659d8db16 100644 --- a/.ci/stack-9.0.yaml +++ b/.ci/stack-9.0.yaml @@ -16,3 +16,4 @@ extra-deps: - prettyprinter-interp-0.2.0.0@sha256:45299b61bd6c27d594c1a72b5a8dd5734e791a59828725e4f4e420f3cc37232b,2016 - infinite-list-0.1@sha256:4de250517ce75e128c766fbc1f23b5a778ea964e695e47f8e83e0f3b293091bf,2383 - tasty-1.5@sha256:c62c96da1e9d65bf61ce583e9f7085eed1daeb62a45f3106ca252bf9ef87025b,2763 +- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154 diff --git a/.ci/stack-9.2.yaml b/.ci/stack-9.2.yaml index 25e98735cb..0dab4a2e28 100644 --- a/.ci/stack-9.2.yaml +++ b/.ci/stack-9.2.yaml @@ -17,3 +17,4 @@ extra-deps: - prettyprinter-interp-0.2.0.0@sha256:7072e659fb902cbcab790c9cca2b0739f9f4b81b666a63f2140139950f05025d,2086 - infinite-list-0.1@sha256:4de250517ce75e128c766fbc1f23b5a778ea964e695e47f8e83e0f3b293091bf,2383 - tasty-1.5@sha256:c62c96da1e9d65bf61ce583e9f7085eed1daeb62a45f3106ca252bf9ef87025b,2763 +- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154 diff --git a/clash-lib/clash-lib.cabal b/clash-lib/clash-lib.cabal index a96450218a..f4cfe61029 100644 --- a/clash-lib/clash-lib.cabal +++ b/clash-lib/clash-lib.cabal @@ -140,7 +140,8 @@ Library RecordWildCards TemplateHaskell - Build-depends: aeson >= 0.6.2.0 && < 2.2, + Build-depends: aeson >= 0.6.2.0 && < 2.3, + attoparsec-aeson >= 2.1 && < 2.3, aeson-pretty >= 0.8 && < 0.9, ansi-terminal >= 0.8.0.0 && < 1.1, array, @@ -337,6 +338,7 @@ executable v16-upgrade-primitives Build-Depends: base, aeson, + attoparsec-aeson, deepseq, yaml, bytestring, @@ -404,6 +406,7 @@ test-suite unittests ghc-typelits-knownnat, aeson, + attoparsec-aeson, aeson-pretty, base, base16-bytestring, diff --git a/clash-lib/src/Data/Aeson/Extra.hs b/clash-lib/src/Data/Aeson/Extra.hs index cf53fba75e..f7628754c3 100644 --- a/clash-lib/src/Data/Aeson/Extra.hs +++ b/clash-lib/src/Data/Aeson/Extra.hs @@ -25,7 +25,8 @@ import Data.List (intercalate) import Data.List.NonEmpty (NonEmpty (..)) import qualified Data.List.NonEmpty as NE import Data.Tuple.Extra (second, first) -import Data.Aeson (FromJSON, Result (..), fromJSON, json) +import Data.Aeson (FromJSON, Result (..), fromJSON) +import Data.Aeson.Parser (json) import Data.Attoparsec.Lazy (Result (..), parse) import Data.ByteString.Lazy (ByteString) import qualified Data.ByteString.Lazy as BS diff --git a/flake.lock b/flake.lock index 51fa489ccf..d6b09d79fb 100644 --- a/flake.lock +++ b/flake.lock @@ -21,11 +21,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1681202837, - "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "owner": "numtide", "repo": "flake-utils", - "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", "type": "github" }, "original": { @@ -37,11 +37,11 @@ "ghc-tcplugins-extra": { "flake": false, "locked": { - "lastModified": 1676923737, - "narHash": "sha256-DFVr8yioVhuvPdLZbBUTXZZiYIBM1sy+6uFpVOZE7GA=", + "lastModified": 1690791784, + "narHash": "sha256-RG9UpAYOjH276sFC+XrX847WR26qVhr/KHTsEOkw3rs=", "owner": "clash-lang", "repo": "ghc-tcplugins-extra", - "rev": "c2007b347c9cff4637709907010d309f68401f2a", + "rev": "92b5215273bc219da9550799e0869ea6934648f0", "type": "github" }, "original": { @@ -53,11 +53,11 @@ "ghc-typelits-extra": { "flake": false, "locked": { - "lastModified": 1676929195, - "narHash": "sha256-WzFofC0C0d5DDk9928URozxq9eTPTM0woMbDf+nfMyQ=", + "lastModified": 1690794410, + "narHash": "sha256-Q8zXP9ZcVBkUrniBOM00tYqgGipDhbbPqkVTCrs7vYo=", "owner": "clash-lang", "repo": "ghc-typelits-extra", - "rev": "d4a66e64944b7ab84d18450f2c9130a36e2c5917", + "rev": "bbe2a40d6bc640ab065dd87db74ba59e584aa9f2", "type": "github" }, "original": { @@ -69,11 +69,11 @@ "ghc-typelits-knownnat": { "flake": false, "locked": { - "lastModified": 1676927967, - "narHash": "sha256-juaNJVyuPFSCaexapRdFfazp53PzkMkUtFbQ0gzcI2A=", + "lastModified": 1690793234, + "narHash": "sha256-Y+Qjz8r+B0hUAhRVrxddQxnJLNVKLMAz5OLsRQ5behE=", "owner": "clash-lang", "repo": "ghc-typelits-knownnat", - "rev": "0cf1cc089db84431ecb54b5bfc6171375f1f6ec4", + "rev": "2b72c495b4158d49ef46609036b08e414bcdba5c", "type": "github" }, "original": { @@ -85,11 +85,11 @@ "ghc-typelits-natnormalise": { "flake": false, "locked": { - "lastModified": 1676926908, - "narHash": "sha256-CLcTV4IRFREdhAnURb+IQA0ZrIoa8k4Bi/hWrV44bKI=", + "lastModified": 1690792488, + "narHash": "sha256-1ZSF6FCSmh4Pd7aUEXa5VFkBibuOyE1tqbndGikO+sA=", "owner": "clash-lang", "repo": "ghc-typelits-natnormalise", - "rev": "f089f6bd91af2038cdc5b60f28d10bc8d1079a23", + "rev": "3289e1a25df3d7752d6734aa83ba04782d6e43cd", "type": "github" }, "original": { @@ -100,11 +100,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1684556264, - "narHash": "sha256-a5usTtIciLT3/A8DPe6CR2BzmX5dm2SgvLpGNpAhn9I=", + "lastModified": 1694948089, + "narHash": "sha256-d2B282GmQ9o8klc22/Rbbbj6r99EnELQpOQjWMyv0rU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7a288f777a58a0a962bdf5e03b7308f7f02fa149", + "rev": "5148520bfab61f99fd25fb9ff7bfbb50dad3c9db", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 02654bd348..5bc52cb39c 100644 --- a/flake.nix +++ b/flake.nix @@ -36,16 +36,16 @@ # The versions of GHC that we want to be able to build / develop against # within the nix environment. Since nix is lazy, only derivations for # versions of GHC which are used are actually evaluated. - ghcVersions = [ "ghc902" "ghc961" ]; + ghcVersions = [ "ghc902" "ghc962" ]; # We pick a single version of GHC to use by default within nix. This is # probably cleaner than always having N copies of each package / app and # being forced to refer to them by their GHC version. - defaultGhcVersion = "ghc961"; + defaultGhcVersion = "ghc962"; # Overlays are not per-system, so let's only compute them once. # For each version of GHC we produce a `pkgs.clashPackages-ghcVER`, e.g. - # `pkgs.clashPackages-ghc961`. + # `pkgs.clashPackages-ghc962`. overlays = let makeOverlay = diff --git a/nix/overlay-ghc902.nix b/nix/overlay-ghc902.nix index 9c0f561e41..d64138de2b 100644 --- a/nix/overlay-ghc902.nix +++ b/nix/overlay-ghc902.nix @@ -8,19 +8,9 @@ in # is basically abandonware it catches fire with brick 1.0+. brick = doJailbreak prev.brick_0_70_1; - # Marked as broken in nixpkgs since it needs a newer hashable than the one - # in the .cabal file uplodaed to hackage. - concurrent-supply = doJailbreak (markUnbroken prev.concurrent-supply); - # Marked as broken in nixpkgs for this version of GHC. docopt = markUnbroken prev.docopt; - # The doctests crash for this package, but the main testsuite passes. - generic-lens = dontCheck prev.generic-lens; - - # For some reason, lens 5.1.1 didn't build properly. - lens = prev.lens_5_2_2; - # Marked as broken in nixpkgs, since it specifies much older dependencies # than the defaults in nixpkgs. rewrite-inspector = doJailbreak (markUnbroken prev.rewrite-inspector); diff --git a/nix/overlay-ghc961.nix b/nix/overlay-ghc962.nix similarity index 83% rename from nix/overlay-ghc961.nix rename to nix/overlay-ghc962.nix index 9b152e87cc..ca6fde522a 100644 --- a/nix/overlay-ghc961.nix +++ b/nix/overlay-ghc962.nix @@ -12,9 +12,6 @@ in # .cabal file currently uploaded to hackage. concurrent-supply = doJailbreak (markUnbroken prev.concurrent-supply); - # Use a newer version than the default in nixpkgs. - doctest-parallel = prev.doctest-parallel_0_3_0_1; - # Use a branch with changes to support GHC 9.6.1. hint = prev.hint.overrideAttrs (_: { @@ -27,16 +24,10 @@ in }; }); - # Latest hackage revision is not yet in nixpkgs. - prettyprinter-interp = doJailbreak prev.prettyprinter-interp; - # Marked as broken in nixpkgs, since it specifies much older dependencies # than the defaults in nixpkgs. rewrite-inspector = doJailbreak (markUnbroken prev.rewrite-inspector); - # Use a newer version than the default in nixpkgs. - singletons = prev.singletons_3_0_2; - # We want a version that matches with singletons-th, but the tests in here # are also a bit flaky since GHC 9.6 isn't officially supported. singletons-base = dontCheck prev.singletons-base_3_2; @@ -54,5 +45,10 @@ in vector-binary-instances = doJailbreak prev.vector-binary-instances; # Use a newer version than the default in nixpkgs. - vty = prev.vty_5_38; + th-abstraction = prev.th-abstraction_0_5_0_0; + + # We can't use newer than 1.12 here: we need singletons 3.x (due to the cabal + # file of `clash-testsuite`) but the changed `DConP` constructor in 1.13 + # stops `singletons-th` from building. + doctest = prev.callHackage "doctest" "0.21.1" { }; } diff --git a/stack.yaml b/stack.yaml index 45dee205be..f856403514 100644 --- a/stack.yaml +++ b/stack.yaml @@ -15,3 +15,4 @@ extra-deps: - prettyprinter-interp-0.2.0.0@sha256:45299b61bd6c27d594c1a72b5a8dd5734e791a59828725e4f4e420f3cc37232b,2016 - infinite-list-0.1@sha256:4de250517ce75e128c766fbc1f23b5a778ea964e695e47f8e83e0f3b293091bf,2383 - tasty-1.5@sha256:c62c96da1e9d65bf61ce583e9f7085eed1daeb62a45f3106ca252bf9ef87025b,2763 +- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154