Skip to content

Commit

Permalink
Merge pull request #599 from IntersectMBO/erikd/ghc-9.10
Browse files Browse the repository at this point in the history
Make it build with ghc-9.10
  • Loading branch information
erikd authored Aug 5, 2024
2 parents 42ca722 + 73e3adc commit 3d000e0
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 75 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}' }
Expand Down
15 changes: 13 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
2 changes: 1 addition & 1 deletion cardano-api-gen/cardano-api-gen.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions cardano-api/cardano-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions cardano-api/internal/Cardano/Api/ValueParser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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.
Expand Down
118 changes: 57 additions & 61 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# see flake `variants` below for alternative compilers
defaultCompiler = "ghc982";
haddockShellCompiler = defaultCompiler;
mingwCompiler = "ghc965";
mingwCompiler = "ghc966";

cabalHeadOverlay = final: prev: {
cabal-head =
Expand Down

0 comments on commit 3d000e0

Please sign in to comment.