Skip to content
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
28 changes: 14 additions & 14 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ repository cardano-haskell-packages
-- update either of these.
index-state:
-- Bump both the following dates if you need newer packages from Hackage
, hackage.haskell.org 2026-05-19T01:33:52Z
, hackage.haskell.org 2026-06-22T23:30:49Z
-- Bump this if you need newer packages from CHaP
, cardano-haskell-packages 2026-05-18T18:23:40Z
, cardano-haskell-packages 2026-06-18T17:45:00Z

active-repositories:
, :rest
Expand All @@ -31,7 +31,7 @@ packages: cardano-constitution
plutus-metatheory
plutus-tx
plutus-tx-plugin
doc/docusaurus/docusaurus-examples.cabal
doc/docusaurus

-- We never, ever, want this.
write-ghc-environment-files: never
Expand Down Expand Up @@ -93,9 +93,15 @@ allow-newer:
, inline-r:containers
, inline-r:primitive

-- https://github.com/IntersectMBO/plutus/pull/7236
constraints: setup.optparse-applicative >=0.19.0.0
allow-newer: turtle:optparse-applicative
constraints:
-- https://github.com/IntersectMBO/plutus/pull/7236
, setup.optparse-applicative >=0.19.0.0

allow-newer:
, deriving-aeson:aeson
, microstache:aeson
, turtle:containers
, turtle:optparse-applicative

if impl (ghc >= 9.14)
-- https://github.com/snowleopard/alga/issues/322
Expand All @@ -104,24 +110,18 @@ if impl (ghc >= 9.14)
location: https://github.com/snowleopard/alga
tag: d4e43fb42db05413459fb2df493361d5a666588a

-- cabal-allow-newer begin
if impl(ghc >= 9.14)
allow-newer:
, binary:containers
, canonical-json:containers
, cborg:base
, cborg:containers
, config-ini:containers
, dependent-map:containers
, dependent-sum:some
, dictionary-sharing:containers
, hedgehog-quickcheck:QuickCheck
, monad-control:transformers-compat
, ordered-containers:containers
, serialise:base
, serialise:containers
, serialise:time
, tree-diff:time
, turtle:containers
, turtle:time
, with-utf8:base
-- cabal-allow-newer end

2 changes: 1 addition & 1 deletion cardano-constitution/cardano-constitution.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ library
PlutusTx.NonCanonicalRational

build-depends:
, aeson
, aeson >=2.3
, base >=4.9 && <5
, containers
, filepath
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 plutus-benchmark/plutus-benchmark.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ executable uplc-evaluator
hs-source-dirs: uplc-evaluator
ghc-options: -rtsopts -with-rtsopts=-I0
build-depends:
, aeson >=2.0
, aeson >=2.3
, base >=4.9 && <5
, bytestring
, containers
Expand All @@ -952,7 +952,7 @@ test-suite uplc-evaluator-integration-tests
ghc-options: -threaded -rtsopts -with-rtsopts=-N1
build-tool-depends: plutus-benchmark:uplc-evaluator
build-depends:
, aeson >=2.0
, aeson >=2.3
, base >=4.9 && <5
, bytestring
, directory
Expand Down
2 changes: 1 addition & 1 deletion plutus-conformance/plutus-conformance.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ test-suite agda-conformance
hs-source-dirs: agda test-cases
other-modules:
build-depends:
, aeson
, aeson >=2.3
, base >=4.9 && <5
, plutus-conformance
, plutus-core ^>=1.65
Expand Down
14 changes: 9 additions & 5 deletions plutus-core/plutus-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ library
-- * This bound also includes support for the bls12-381 msm primitives (see CIP-133)
-- * The bound on 'dependent-sum' is needed to avoid https://github.com/obsidiansystems/dependent-sum/issues/72
build-depends:
, aeson
, aeson >=2.3
, array
, barbies
, base >=4.9 && <5
Expand Down Expand Up @@ -398,10 +398,11 @@ test-suite plutus-core-test

default-language: Haskell2010
build-depends:
, aeson
, aeson >=2.3
, base >=4.9 && <5
, base16-bytestring ^>=1.0
, bytestring
, cardano-base:testlib >=0.1.5
, containers
, data-default-class
, extra
Expand Down Expand Up @@ -499,6 +500,7 @@ library untyped-plutus-core-testlib
, base >=4.9 && <5
, base16-bytestring
, bytestring
, cardano-base:testlib >=0.1.5
, cardano-crypto-class
, data-default-class
, dlist
Expand Down Expand Up @@ -674,6 +676,7 @@ test-suite plutus-ir-test
build-tool-depends: tasty-discover:tasty-discover
build-depends:
, base >=4.9 && <5
, cardano-base:testlib >=0.1.5
, containers
, filepath
, hashable
Expand Down Expand Up @@ -942,7 +945,7 @@ executable print-cost-model
hs-source-dirs: cost-model/print-cost-model
other-modules: Paths_plutus_core
build-depends:
, aeson
, aeson >=2.3
, base >=4.9 && <5
, bytestring
, plutus-core ^>=1.65
Expand All @@ -957,7 +960,7 @@ library satint
exposed-modules: Data.SatInt
hs-source-dirs: satint/src
build-depends:
, aeson
, aeson >=2.3
, base >=4.9 && <5
, cassava
, deepseq
Expand All @@ -971,7 +974,8 @@ test-suite satint-test
type: exitcode-stdio-1.0
main-is: TestSatInt.hs
build-depends:
, base >=4.9 && <5
, base >=4.9 && <5
, cardano-base:testlib >=0.1.5
, HUnit
, QuickCheck
, satint
Expand Down
7 changes: 4 additions & 3 deletions plutus-core/plutus-core/test/Generators/QuickCheck/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import PlutusCore.Generators.QuickCheck.Utils

import Test.Tasty
import Test.Tasty.QuickCheck
import qualified Test.Cardano.Base.QuickCheck as BaseQC

{-| Test that both 'multiSplit1' and 'multiSplit0' produce a list such that 'concat'ing it gives
back the input. -}
Expand All @@ -21,14 +22,14 @@ test_multiSplitSound =
, ("multiSplit0", multiSplit0 0.1)
]
pure . testProperty name $ \(xs :: [Int]) ->
withMaxSuccess 10000 . forAll (split xs) $ \aSplit ->
BaseQC.withNumTests 10000 . forAll (split xs) $ \aSplit ->
xs === concat aSplit

-- | Show the distribution of lists generated by a split function for a list of the given length.
test_listDistribution :: Int -> ([()] -> Gen [[()]]) -> Int -> TestTree
test_listDistribution numRuns split n =
testProperty ("for a list of length " ++ show n) $
withMaxSuccess numRuns . forAll (split $ replicate n ()) $ \aSplit ->
BaseQC.withNumTests numRuns . forAll (split $ replicate n ()) $ \aSplit ->
label (show $ map length aSplit) True

-- | Count the number of 'I' and 'B' nodes in a 'Data' object.
Expand All @@ -48,7 +49,7 @@ length of the spine. Ensures that the 'Data' generator is not exponential in 'B'
test_arbitraryDataExpectedLeafs :: TestTree
test_arbitraryDataExpectedLeafs =
testProperty "'arbitrary @Data' has the expected number of 'B' and 'I' leaves" $
withMaxSuccess 1000 . mapSize (* 5) $ \spine ->
BaseQC.withNumTests 1000 . mapSize (* 5) $ \spine ->
forAll (genDataFromSpine spine) $ \dat ->
countIandBs dat === length spine

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import PlutusCore.Data
import PlutusCore.Generators.QuickCheck ()

import Codec.Serialise
import Test.Cardano.Base.QuickCheck qualified as BaseQC
import Test.QuickCheck

-- | This mainly tests that the `Data` generator isn't non-terminating or too slow.
prop_genData :: Property
prop_genData = withMaxSuccess 800 $ \(d :: Data) -> d === deserialise (serialise d)
prop_genData = BaseQC.withNumTests 800 $ \(d :: Data) -> d === deserialise (serialise d)
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import Data.Set qualified as Set
import Data.Set.Lens (setOf)
import Data.String

import Test.Cardano.Base.QuickCheck qualified as BaseQC
import Test.QuickCheck hiding (choose, vectorOf)

-- * Tests for unification and substitution
Expand All @@ -38,7 +39,7 @@ The statistics at the time this comment was written are as follows:
So we don't get great coverage, but given that it takes a few seconds to generate dozens of
thousands of (non-filtered) test cases, we do still get some reasonable coverage in the end. -}
prop_unify :: Property
prop_unify = withMaxSuccess 500 $
prop_unify = BaseQC.withNumTests 500 $
forAllDoc "n" arbitrary shrink $ \(NonNegative n) ->
forAllDoc "nSub" (choose (0, n)) shrink $ \nSub ->
-- See Note [Chaotic Good fresh name generation].
Expand Down Expand Up @@ -89,7 +90,7 @@ prop_unifyRename =
{-| Check that substitution eliminates from the type all free occurrences of variables present in
the domain of the substitution. -}
prop_substType :: Property
prop_substType = withMaxSuccess 1000 $
prop_substType = BaseQC.withNumTests 1000 $
-- No shrinking because every nested shrink makes properties harder to shrink (because you'd need
-- to regenerate the stuff that depends on the context, meaning you don't have the same
-- counterexample as you did before) and context minimality doesn't help readability very much.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Control.Monad
import Data.Bifunctor
import Data.Either
import Data.Map.Strict qualified as Map
import Test.Cardano.Base.QuickCheck qualified as BaseQC
import Test.QuickCheck

prop_genKindCorrect :: Property
Expand All @@ -21,7 +22,7 @@ prop_genKindCorrect = p_genKindCorrect False
See Note [Debugging generators that don't generate well-typed/kinded terms/types]
and see the utility tests below when this property fails. -}
p_genKindCorrect :: Bool -> Property
p_genKindCorrect debug = withMaxSuccess 1000 $
p_genKindCorrect debug = BaseQC.withNumTests 1000 $
-- Context minimality doesn't help readability, so no shrinking here
forAllDoc "ctx" genCtx (const []) $ \ctx ->
-- Note, no shrinking here because shrinking relies on well-kindedness.
Expand All @@ -30,7 +31,7 @@ p_genKindCorrect debug = withMaxSuccess 1000 $

-- | Check that shrinking types maintains kinds.
prop_shrinkTypeSound :: Property
prop_shrinkTypeSound = withMaxSuccess 500 $
prop_shrinkTypeSound = BaseQC.withNumTests 500 $
forAllDoc "ctx" genCtx (const []) $ \ctx ->
forAllDoc "k,ty" (genKindAndTypeWithCtx ctx) (shrinkKindAndType ctx) $ \(k, ty) ->
-- See discussion about the same trick in 'prop_shrinkTermSound'.
Expand All @@ -45,7 +46,7 @@ prop_shrinkTypeSound = withMaxSuccess 500 $

-- | Test that shrinking a type results in a type of a smaller kind. Useful for debugging shrinking.
prop_shrinkTypeSmallerKind :: Property
prop_shrinkTypeSmallerKind = withMaxSuccess 3000 $
prop_shrinkTypeSmallerKind = BaseQC.withNumTests 3000 $
forAllDoc "k,ty" genKindAndType (shrinkKindAndType Map.empty) $ \(k, ty) ->
assertNoCounterexamples
[ (k', ty')
Expand All @@ -55,13 +56,13 @@ prop_shrinkTypeSmallerKind = withMaxSuccess 3000 $

-- | Test that shrinking kinds generates smaller kinds.
prop_shrinkKindSmaller :: Property
prop_shrinkKindSmaller = withMaxSuccess 30000 $
prop_shrinkKindSmaller = BaseQC.withNumTests 30000 $
forAllDoc "k" arbitrary shrink $ \k ->
assertNoCounterexamples [k' | k' <- shrink k, not $ leKind k' k]

-- | Test that fixKind actually gives you something of the right kind.
prop_fixKind :: Property
prop_fixKind = withMaxSuccess 10000 $
prop_fixKind = BaseQC.withNumTests 10000 $
forAllDoc "ctx" genCtx (const []) $ \ctx ->
forAllDoc "k,ty" genKindAndType (shrinkKindAndType ctx) $ \(k, ty) ->
-- Note, fixKind only works on smaller kinds, so we use shrink to get a definitely smaller kind
Expand All @@ -74,7 +75,7 @@ prop_fixKind = withMaxSuccess 10000 $

-- | Check that 'normalizeType' returns a normal type.
prop_normalizedTypeIsNormal :: Property
prop_normalizedTypeIsNormal = withMaxSuccess 1000 $
prop_normalizedTypeIsNormal = BaseQC.withNumTests 1000 $
forAllDoc "k,ty" genKindAndType (shrinkKindAndType Map.empty) $ \(_, ty) ->
unless (isNormalType . unNormalized . runQuote $ normalizeType ty) $
Left "'normalizeType' returned a non-normal type"
3 changes: 2 additions & 1 deletion plutus-core/plutus-ir/test/PlutusIR/Compiler/Let/Tests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import PlutusIR.Compiler qualified as PIR
import PlutusIR.Compiler.Let
import PlutusIR.Pass.Test
import PlutusIR.Test
import Test.Cardano.Base.QuickCheck qualified as BaseQC
import Test.QuickCheck
import Test.Tasty
import Test.Tasty.ExpectedFailure (ignoreTest)
Expand All @@ -36,7 +37,7 @@ test_lets =
test_propLets :: TestTree
test_propLets =
ignoreTest $ testProperty "lets" $ \letKind ->
withMaxSuccess 40000 $
BaseQC.withNumTests 40000 $
testPassProp' @_ @_ @_ @(Provenance ())
(Original ())
(\t -> fmap Original t)
Expand Down
Loading
Loading