diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 94b1dfc5b4..05efcff7c1 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - ghc: ["8.10.7", "9.6", "9.8"] + ghc: ["8.10.7", "9.6", "9.8", "9.10"] cabal: ["3.12"] sys: - { os: windows-latest, shell: 'C:/msys64/usr/bin/bash.exe -e {0}' } diff --git a/cabal.project b/cabal.project index e411f88ec4..b153a635a8 100644 --- a/cabal.project +++ b/cabal.project @@ -13,8 +13,8 @@ repository cardano-haskell-packages -- See CONTRIBUTING for information about these, including some Nix commands -- you need to run if you change them index-state: - , hackage.haskell.org 2024-06-23T23:01:13Z - , cardano-haskell-packages 2024-07-02T13:27:37Z + , hackage.haskell.org 2024-07-30T01:49:10Z + , cardano-haskell-packages 2024-07-30T02:20:18Z packages: cardano-api @@ -45,6 +45,17 @@ test-show-details: direct -- Always write GHC env files, because they are needed for ghci. write-ghc-environment-files: always +constraints: + , plutus-ledger-api ^>= 1.31 + +allow-newer: + -- These are required due to the above. + , cardano-ledger-alonzo:plutus-ledger-api + , cardano-ledger-alonzo-test:plutus-ledger-api + , cardano-ledger-babbage:plutus-ledger-api + , cardano-ledger-binary:plutus-ledger-api + , cardano-ledger-conway:plutus-ledger-api + -- IMPORTANT -- Do NOT add more source-repository-package stanzas here unless they are strictly -- temporary! Please read the section in CONTRIBUTING about updating dependencies. diff --git a/cardano-api-gen/cardano-api-gen.cabal b/cardano-api-gen/cardano-api-gen.cabal index 84626b5815..13460e091f 100644 --- a/cardano-api-gen/cardano-api-gen.cabal +++ b/cardano-api-gen/cardano-api-gen.cabal @@ -24,7 +24,7 @@ extra-source-files: common project-config default-language: Haskell2010 default-extensions: OverloadedStrings - build-depends: base >=4.14 && <4.20 + build-depends: base >=4.14 && <4.21 ghc-options: -Wall -Wcompat diff --git a/cardano-api/cardano-api.cabal b/cardano-api/cardano-api.cabal index 3be948e87c..3e46a927fc 100644 --- a/cardano-api/cardano-api.cabal +++ b/cardano-api/cardano-api.cabal @@ -23,7 +23,7 @@ extra-doc-files: common project-config default-language: Haskell2010 default-extensions: OverloadedStrings - build-depends: base >=4.14 && <4.20 + build-depends: base >=4.14 && <4.21 ghc-options: -Wall -Wcompat @@ -205,10 +205,10 @@ library internal ouroboros-network-framework, ouroboros-network-protocols, parsec, - plutus-ledger-api:{plutus-ledger-api, plutus-ledger-api-testlib} ^>=1.30, + plutus-ledger-api:{plutus-ledger-api, plutus-ledger-api-testlib} ^>=1.31, prettyprinter, prettyprinter-ansi-terminal, - prettyprinter-configurable ^>=1.30, + prettyprinter-configurable ^>=1.31, random, safe-exceptions, scientific, @@ -393,8 +393,8 @@ test-suite cardano-api-golden hedgehog-extras ^>=0.6.1.0, microlens, parsec, - plutus-core ^>=1.30, - plutus-ledger-api ^>=1.30, + plutus-core ^>=1.31, + plutus-ledger-api ^>=1.31, tasty, tasty-hedgehog, text, diff --git a/cardano-api/internal/Cardano/Api/ValueParser.hs b/cardano-api/internal/Cardano/Api/ValueParser.hs index 44526e3db8..fe3163cd48 100644 --- a/cardano-api/internal/Cardano/Api/ValueParser.hs +++ b/cardano-api/internal/Cardano/Api/ValueParser.hs @@ -14,7 +14,7 @@ import Control.Applicative (many, some, (<|>)) import qualified Data.ByteString.Char8 as BSC import qualified Data.Char as Char import Data.Functor (void, ($>)) -import Data.List (foldl') +import Data.List as List (foldl') import qualified Data.Text as Text import qualified Data.Text.Encoding as Text import Data.Word (Word64) @@ -109,7 +109,7 @@ word64 = do decimal :: Parser Integer decimal = do digits <- many1 digit - return $! foldl' (\x d -> 10 * x + toInteger (Char.digitToInt d)) 0 digits + return $! List.foldl' (\x d -> 10 * x + toInteger (Char.digitToInt d)) 0 digits -- | Asset name parser. assetName :: Parser AssetName diff --git a/cardano-api/test/cardano-api-test/Test/Cardano/Api/ProtocolParameters.hs b/cardano-api/test/cardano-api-test/Test/Cardano/Api/ProtocolParameters.hs index ef492838dd..33efb853b3 100644 --- a/cardano-api/test/cardano-api-test/Test/Cardano/Api/ProtocolParameters.hs +++ b/cardano-api/test/cardano-api-test/Test/Cardano/Api/ProtocolParameters.hs @@ -22,7 +22,7 @@ import Data.Aeson (FromJSON, Object, ToJSON, eitherDecode) import qualified Data.Aeson.Key as Aeson import qualified Data.Aeson.KeyMap as Aeson import qualified Data.ByteString.Lazy as LBS -import Data.Foldable (foldl') +import Data.Foldable as Foldable (foldl') import Test.Gen.Cardano.Api.Typed (genProtocolParameters) @@ -204,7 +204,7 @@ patchProtocolParamsJSONOrFail era s = filtersForEra era' = fail $ "filtersForEra is not defined for: " <> show era' applyFilters :: [String] -> Object -> Object - applyFilters filters o = foldl' (flip Aeson.delete) o (map Aeson.fromString filters) + applyFilters filters o = Foldable.foldl' (flip Aeson.delete) o (map Aeson.fromString filters) -- Renames the key of an entry in a JSON object. -- If there already is a key with the new name in the object the function fails. diff --git a/flake.lock b/flake.lock index c0cbb7fe08..b9774bb1b3 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "CHaP": { "flake": false, "locked": { - "lastModified": 1719936624, - "narHash": "sha256-3v8X9qISCg6+ERjflj9SGMs2kDCP30knnQnOGnbp1r4=", + "lastModified": 1722231085, + "narHash": "sha256-IwLw5BCQNLIp9CJgtnGU5wrQ5dr1zZ5UhOFJTZPx3w8=", "owner": "intersectmbo", "repo": "cardano-haskell-packages", - "rev": "0040c66c26f396fd72ed837eb8ad61bdbe711018", + "rev": "843c3f288a53dd3f4f773413fc50201e003e0096", "type": "github" }, "original": { @@ -202,51 +202,14 @@ "type": "github" } }, - "ghc910X": { - "flake": false, - "locked": { - "lastModified": 1714520650, - "narHash": "sha256-4uz6RA1hRr0RheGNDM49a/B3jszqNNU8iHIow4mSyso=", - "ref": "ghc-9.10", - "rev": "2c6375b9a804ac7fca1e82eb6fcfc8594c67c5f5", - "revCount": 62663, - "submodules": true, - "type": "git", - "url": "https://gitlab.haskell.org/ghc/ghc" - }, - "original": { - "ref": "ghc-9.10", - "submodules": true, - "type": "git", - "url": "https://gitlab.haskell.org/ghc/ghc" - } - }, - "ghc911": { - "flake": false, - "locked": { - "lastModified": 1714817013, - "narHash": "sha256-m2je4UvWfkgepMeUIiXHMwE6W+iVfUY38VDGkMzjCcc=", - "ref": "refs/heads/master", - "rev": "fc24c5cf6c62ca9e3c8d236656e139676df65034", - "revCount": 62816, - "submodules": true, - "type": "git", - "url": "https://gitlab.haskell.org/ghc/ghc" - }, - "original": { - "submodules": true, - "type": "git", - "url": "https://gitlab.haskell.org/ghc/ghc" - } - }, "hackage": { "flake": false, "locked": { - "lastModified": 1719967069, - "narHash": "sha256-QQ+y+vW0TXPFhcMjOTUH+M19DuqE2KoEfp6R9SGCcqM=", + "lastModified": 1722817668, + "narHash": "sha256-J3K7hqhtwKZrMoXRsN+ENl5+REW3UlIaLsalIa0kDVE=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "c4a407c5ed49b77ab65247dabd02477153f2292c", + "rev": "ee1d3454c8fd8124c1de1fb3df18c7d8bbf8ab61", "type": "github" }, "original": { @@ -264,8 +227,6 @@ "cardano-shell": "cardano-shell", "flake-compat": "flake-compat_2", "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", - "ghc910X": "ghc910X", - "ghc911": "ghc911", "hackage": "hackage", "hls-1.10": "hls-1.10", "hls-2.0": "hls-2.0", @@ -276,6 +237,7 @@ "hls-2.6": "hls-2.6", "hls-2.7": "hls-2.7", "hls-2.8": "hls-2.8", + "hls-2.9": "hls-2.9", "hpc-coveralls": "hpc-coveralls", "hydra": "hydra", "iserv-proxy": "iserv-proxy", @@ -290,16 +252,17 @@ "nixpkgs-2211": "nixpkgs-2211", "nixpkgs-2305": "nixpkgs-2305", "nixpkgs-2311": "nixpkgs-2311", + "nixpkgs-2405": "nixpkgs-2405", "nixpkgs-unstable": "nixpkgs-unstable", "old-ghc-nix": "old-ghc-nix", "stackage": "stackage" }, "locked": { - "lastModified": 1718797200, - "narHash": "sha256-ueFxTuZrQ3ZT/Fj5sSeUWlqKa4+OkUU1xW0E+q/XTfw=", + "lastModified": 1722856218, + "narHash": "sha256-QuWe+mi0AbjRgda+jjyJS0K7F9He8InYmxNthUPXaGI=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "cb139fa956158397aa398186bb32dd26f7318784", + "rev": "b7f2b7bb50f6e9a7f8f6cff7f898218861879f50", "type": "github" }, "original": { @@ -461,6 +424,23 @@ "type": "github" } }, + "hls-2.9": { + "flake": false, + "locked": { + "lastModified": 1718469202, + "narHash": "sha256-THXSz+iwB1yQQsr/PY151+2GvtoJnTIB2pIQ4OzfjD4=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "40891bccb235ebacce020b598b083eab9dda80f1", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "2.9.0.0", + "repo": "haskell-language-server", + "type": "github" + } + }, "hpc-coveralls": { "flake": false, "locked": { @@ -673,11 +653,11 @@ }, "nixpkgs-2305": { "locked": { - "lastModified": 1701362232, - "narHash": "sha256-GVdzxL0lhEadqs3hfRLuj+L1OJFGiL/L7gCcelgBlsw=", + "lastModified": 1705033721, + "narHash": "sha256-K5eJHmL1/kev6WuqyqqbS1cdNnSidIZ3jeqJ7GbrYnQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d2332963662edffacfddfad59ff4f709dde80ffe", + "rev": "a1982c92d8980a0114372973cbdfe0a307f1bdea", "type": "github" }, "original": { @@ -689,11 +669,11 @@ }, "nixpkgs-2311": { "locked": { - "lastModified": 1701386440, - "narHash": "sha256-xI0uQ9E7JbmEy/v8kR9ZQan6389rHug+zOtZeZFiDJk=", + "lastModified": 1719957072, + "narHash": "sha256-gvFhEf5nszouwLAkT9nWsDzocUTqLWHuL++dvNjMp9I=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "293822e55ec1872f715a66d0eda9e592dc14419f", + "rev": "7144d6241f02d171d25fba3edeaf15e0f2592105", "type": "github" }, "original": { @@ -703,6 +683,22 @@ "type": "github" } }, + "nixpkgs-2405": { + "locked": { + "lastModified": 1720122915, + "narHash": "sha256-Nby8WWxj0elBu1xuRaUcRjPi/rU3xVbkAt2kj4QwX2U=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "835cf2d3f37989c5db6585a28de967a667a75fb1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-24.05-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-regression": { "locked": { "lastModified": 1643052045, @@ -721,17 +717,17 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1694822471, - "narHash": "sha256-6fSDCj++lZVMZlyqOe9SIOL8tYSBz1bI8acwovRwoX8=", + "lastModified": 1720181791, + "narHash": "sha256-i4vJL12/AdyuQuviMMd1Hk2tsGt02hDNhA0Zj1m16N8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "47585496bcb13fb72e4a90daeea2f434e2501998", + "rev": "4284c2b73c8bce4b46a6adf23e16d9e2ec8da4bb", "type": "github" }, "original": { "owner": "NixOS", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", - "rev": "47585496bcb13fb72e4a90daeea2f434e2501998", "type": "github" } }, @@ -819,11 +815,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1718756571, - "narHash": "sha256-8rL8viTbuE9/yV1of6SWp2tHmhVMD2UmkOfmN5KDbKg=", + "lastModified": 1722644486, + "narHash": "sha256-zO8MCbBHjCLCvNlFiwz9IEY0jxUtkZ2Q/R7XdEDuU8w=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "027672fb6fd45828b0e623c8152572d4058429ad", + "rev": "b677125f5fbfb41cc933ef74e4c69449d4d97121", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index c2a21b39a5..e071a1d956 100644 --- a/flake.nix +++ b/flake.nix @@ -29,7 +29,7 @@ # see flake `variants` below for alternative compilers defaultCompiler = "ghc982"; haddockShellCompiler = defaultCompiler; - mingwCompiler = "ghc965"; + mingwCompiler = "ghc966"; cabalHeadOverlay = final: prev: { cabal-head =