diff --git a/cabal.project b/cabal.project index 6fe3a68f5..b2813aa5b 100644 --- a/cabal.project +++ b/cabal.project @@ -12,7 +12,7 @@ repository cardano-haskell-packages -- The hackage index-state index-state: 2023-07-31T10:10:32Z -- The CHaP index-state -index-state: cardano-haskell-packages 2023-07-31T10:10:32Z +index-state: cardano-haskell-packages 2023-08-28T22:23:10Z packages: base-deriving-via @@ -41,7 +41,34 @@ program-options if impl(ghc >= 9.6) allow-newer: , *:base - , protolude:ghc-prim - , protolude:binary - , protolude:bytestring - , protolude:text + , *:deepseq + , *:ghc-prim + , aeson:template-haskell + , hedgehog:template-haskell + , recursion-schemes:template-haskell + , scientific:template-haskell + , text-short:template-haskell + , uuid-types:template-haskell + , vector-th-unbox:template-haskell + + constraints: + , aeson >= 2.0.0.0 + , hastache >= 0.6.1 + , monad-par >= 0.3.5 + , statistics >= 0.16.2.0 + +-- `aeson` has a whole bunch of dependencies (and sometimes the dependency's dependency) which do +-- not compile with `ghc-9.8`. Easier to just do this. +source-repository-package + type: git + location: https://github.com/input-output-hk/aeson + tag: 2cb7304e91f17583fc12026762fc5ae6ba9aa1b6 + subdir: + . + text-iso8601 + +source-repository-package + type: git + -- Git head compiles with `ghc-9.8`, but Hackage version does not. + location: https://github.com/recursion-schemes/recursion-schemes + tag: cc2e88c3400a6548e975830c9addb12ab087545f diff --git a/cardano-binary/cardano-binary.cabal b/cardano-binary/cardano-binary.cabal index 940910f6e..959cc093f 100644 --- a/cardano-binary/cardano-binary.cabal +++ b/cardano-binary/cardano-binary.cabal @@ -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 } common project-config default-language: Haskell2010 diff --git a/cardano-binary/test/cardano-binary-test.cabal b/cardano-binary/test/cardano-binary-test.cabal index 240b88e88..7bf67858f 100644 --- a/cardano-binary/test/cardano-binary-test.cabal +++ b/cardano-binary/test/cardano-binary-test.cabal @@ -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 diff --git a/cardano-crypto-class/cardano-crypto-class.cabal b/cardano-crypto-class/cardano-crypto-class.cabal index 79870ac34..76f88de60 100644 --- a/cardano-crypto-class/cardano-crypto-class.cabal +++ b/cardano-crypto-class/cardano-crypto-class.cabal @@ -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 diff --git a/cardano-crypto-class/src/Cardano/Crypto/KES/Mock.hs b/cardano-crypto-class/src/Cardano/Crypto/KES/Mock.hs index ed0d7480d..ae9b1b82c 100644 --- a/cardano-crypto-class/src/Cardano/Crypto/KES/Mock.hs +++ b/cardano-crypto-class/src/Cardano/Crypto/KES/Mock.hs @@ -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) deriving anyclass (NoThunks) -- diff --git a/cardano-crypto-class/src/Cardano/Crypto/PinnedSizedBytes.hs b/cardano-crypto-class/src/Cardano/Crypto/PinnedSizedBytes.hs index 283b70f55..1eaabe2cd 100644 --- a/cardano-crypto-class/src/Cardano/Crypto/PinnedSizedBytes.hs +++ b/cardano-crypto-class/src/Cardano/Crypto/PinnedSizedBytes.hs @@ -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) let go !ix [] = if ix == n then return () else die "pinnedByteArrayFromListN" "list length less than specified size" diff --git a/cardano-crypto-praos/cardano-crypto-praos.cabal b/cardano-crypto-praos/cardano-crypto-praos.cabal index 2b1f53e04..40342bbc8 100644 --- a/cardano-crypto-praos/cardano-crypto-praos.cabal +++ b/cardano-crypto-praos/cardano-crypto-praos.cabal @@ -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 diff --git a/cardano-crypto-tests/cardano-crypto-tests.cabal b/cardano-crypto-tests/cardano-crypto-tests.cabal index ad8acf63d..12e0c11b3 100644 --- a/cardano-crypto-tests/cardano-crypto-tests.cabal +++ b/cardano-crypto-tests/cardano-crypto-tests.cabal @@ -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 diff --git a/cardano-slotting/cardano-slotting.cabal b/cardano-slotting/cardano-slotting.cabal index 75c9070ea..e48157734 100644 --- a/cardano-slotting/cardano-slotting.cabal +++ b/cardano-slotting/cardano-slotting.cabal @@ -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 diff --git a/strict-checked-vars/strict-checked-vars.cabal b/strict-checked-vars/strict-checked-vars.cabal index 6334a0f9f..122539e1c 100644 --- a/strict-checked-vars/strict-checked-vars.cabal +++ b/strict-checked-vars/strict-checked-vars.cabal @@ -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 @@ -77,7 +77,7 @@ test-suite test default-language: Haskell2010 build-depends: - , base >=4.9 && <4.19 + , base , io-sim , QuickCheck , strict-checked-vars