Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it build with ghc-9.8 #438

Merged
merged 2 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ repository cardano-haskell-packages
d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee

-- The hackage index-state
index-state: 2023-07-31T10:10:32Z
index-state: 2023-10-05T21:19:55Z
-- The CHaP index-state
index-state: cardano-haskell-packages 2023-08-08T14:32:15Z
index-state: cardano-haskell-packages 2023-10-05T20:34:14Z

packages:
base-deriving-via
Expand All @@ -37,3 +37,26 @@ benchmarks: true

program-options
ghc-options: -Werror

if impl(ghc >= 9.8)
allow-newer:
, *:base
, *:deepseq
, *:ghc-prim
, *:template-haskell
, aeson:th-abstraction

constraints:
, aeson >= 2.0.0.0
, bytestring >= 0.11
, hastache >= 0.6.1
, monad-par >= 0.3.5
, statistics >= 0.16.2.0
, th-abstraction >= 0.6.0.0

-- Git head compiles with `ghc-9.8`, but Hackage version does not.
source-repository-package
type: git
location: https://github.com/recursion-schemes/recursion-schemes
tag: cc2e88c3400a6548e975830c9addb12ab087545f
--sha256: 06shyihy6cpblv3pf18xgdfjgxqw2y2awvpcy33r76fr642gdvgn
2 changes: 1 addition & 1 deletion cardano-binary/cardano-binary.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build-type: Simple
extra-source-files: README.md
CHANGELOG.md

common base { build-depends: base >= 4.14 && < 4.19 }
common base { build-depends: base >= 4.14 && < 5 }
tdammers marked this conversation as resolved.
Show resolved Hide resolved

common project-config
default-language: Haskell2010
Expand Down
2 changes: 1 addition & 1 deletion cardano-binary/test/cardano-binary-test.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ category: Currency
build-type: Simple
extra-source-files: CHANGELOG.md

common base { build-depends: base >= 4.14 && < 4.19 }
common base { build-depends: base >= 4.14 && < 5 }

common project-config
default-language: Haskell2010
Expand Down
2 changes: 1 addition & 1 deletion cardano-crypto-class/cardano-crypto-class.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ flag secp256k1-support
default: True
manual: True

common base { build-depends: base >= 4.14 && < 4.19 }
common base { build-depends: base >= 4.14 && < 5 }

common project-config
default-language: Haskell2010
Expand Down
2 changes: 1 addition & 1 deletion cardano-crypto-class/src/Cardano/Crypto/KES/Mock.hs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ instance KnownNat t => KESAlgorithm (MockKES t) where

data SigKES (MockKES t) =
SigMockKES !(Hash ShortHash ()) !(SignKeyKES (MockKES t))
deriving stock (Show, Eq, Ord, Generic)
deriving stock (Show, Eq, Generic)
erikd marked this conversation as resolved.
Show resolved Hide resolved
deriving anyclass (NoThunks)

--
Expand Down
7 changes: 5 additions & 2 deletions cardano-crypto-class/src/Cardano/Crypto/PinnedSizedBytes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,12 @@ ptrPsbToSizedPtr = SizedPtr . castPtr
-- then this throws an exception.
pinnedByteArrayFromListN :: forall a. Prim.Prim a => Int -> [a] -> ByteArray
pinnedByteArrayFromListN 0 _ =
die "pinnedByteArrayFromListN" "list length zero"
die "pinnedByteArrayFromListN" "list length zero #1"
pinnedByteArrayFromListN n ys = runST $ do
marr <- newPinnedByteArray (n * Prim.sizeOf (head ys))
let headYs = case ys of
[] -> die "pinnedByteArrayFromListN" "list length zero #2"
(y:_) -> y
marr <- newPinnedByteArray (n * Prim.sizeOf headYs)
erikd marked this conversation as resolved.
Show resolved Hide resolved
let go !ix [] = if ix == n
then return ()
else die "pinnedByteArrayFromListN" "list length less than specified size"
Expand Down
2 changes: 1 addition & 1 deletion cardano-crypto-praos/cardano-crypto-praos.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ flag external-libsodium-vrf
default: True
manual: True

common base { build-depends: base >= 4.14 && < 4.19 }
common base { build-depends: base >= 4.14 && < 5 }

common project-config
default-language: Haskell2010
Expand Down
4 changes: 2 additions & 2 deletions cardano-crypto-tests/cardano-crypto-tests.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ flag secp256k1-support
default: True
manual: True

common base { build-depends: base >= 4.14 && < 4.19 }
common base { build-depends: base >= 4.14 && < 5 }

common project-config
default-language: Haskell2010
Expand Down Expand Up @@ -66,7 +66,7 @@ library
build-depends: base
, bytestring >=0.10.12.0
, cardano-binary
, cardano-crypto-class >= 2.2
, cardano-crypto-class >= 2.1
, cardano-crypto-praos
, cborg
, containers
Expand Down
2 changes: 1 addition & 1 deletion cardano-slotting/cardano-slotting.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ copyright: IOHK
build-type: Simple
extra-source-files: CHANGELOG.md

common base { build-depends: base >= 4.14 && < 4.19 }
common base { build-depends: base >= 4.14 && < 5 }

common project-config
default-language: Haskell2010
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

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

4 changes: 2 additions & 2 deletions strict-checked-vars/strict-checked-vars.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ library

default-language: Haskell2010
build-depends:
, base >=4.9 && <4.19
, base >=4.9 && <5
, io-classes ^>=1.2
, strict-mvar ^>=1.2
, strict-stm ^>=1.2
Expand Down Expand Up @@ -79,7 +79,7 @@ test-suite test

default-language: Haskell2010
build-depends:
, base >=4.9 && <4.19
, base
, io-classes
, io-sim
, nothunks
Expand Down