Skip to content
Draft
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
220 changes: 209 additions & 11 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 2025-09-21T21:31:06Z
, hackage.haskell.org 2025-11-04T19:45:26Z
-- Bump this if you need newer packages from CHaP
, cardano-haskell-packages 2025-09-18T12:21:32Z
, cardano-haskell-packages 2025-11-04T16:50:55Z

packages: cardano-constitution
plutus-benchmark
Expand Down Expand Up @@ -75,16 +75,214 @@ source-repository-package
tag: e814b9171398cbdfecdc6823067156a7e9fc76a3

allow-newer:
-- https://github.com/tweag/HaskellR/pull/420
, inline-r:singletons-th
, inline-r:aeson
, inline-r:text
, inline-r:template-haskell
, inline-r:deepseq
, inline-r:bytestring
, inline-r:containers
, inline-r:primitive
-- https://github.com/phadej/vec/issues/121
ral:QuickCheck,
fin:QuickCheck,
bin:QuickCheck,

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

if impl (ghc >= 9.14)
-- https://github.com/snowleopard/alga/issues/322
source-repository-package
type: git
location: https://github.com/snowleopard/alga/
tag: d4e43fb42db05413459fb2df493361d5a666588a

if impl (ghc >= 9.14)
constraints:
, nothunks ^>= 0.2
, microlens ^>= 0.4
, microlens-mtl < 0.2.1.1
, microlens-th < 0.4.3.18
-- Newest version causes Arbitrary instance clashes in quickcheck-instances.
, QuickCheck < 2.17.0.0

-- cabal-allow-newer
if impl (ghc >= 9.14)
allow-newer:
, Cabal:Cabal-syntax
, Cabal:containers
, Cabal-syntax:containers
, OneTuple:base
, QuickCheck:base
, QuickCheck:splitmix
, aeson:OneTuple
, aeson:containers
, aeson:data-fix
, aeson:ghc-prim
, aeson:indexed-traversable
, aeson:scientific
, aeson:semialign
, aeson:template-haskell
, aeson:text-iso8601
, aeson:these
, aeson:time
, aeson:time-compat
, aeson:witherable
, assoc:base
, async:base
, bifunctors:template-haskell
, bin:base
, binary:containers
, binary-orphans:base
, boring:base
, brick:base
, canonical-json:containers
, cardano-crypto-class:io-classes
, cborg:base
, cborg:containers
, cborg:ghc-prim
, concurrent-output:process
, config-ini:containers
, config-ini:text
, constraints-extras:base
, constraints-extras:template-haskell
, containers:base
, containers:template-haskell
, criterion:aeson
, data-default:containers
, data-default-class:data-default
, data-fix:base
, dec:base
, deepseq:base
, deepseq:ghc-prim
, dependent-map:containers
, deriving-compat:containers
, deriving-compat:template-haskell
, dictionary-sharing:containers
, directory:base
, directory:time
, dom-lt:containers
, fin:base
, fin:universe-base
, foldl:containers
, free:containers
, free:template-haskell
, generically:base
, ghc-heap:containers
, ghc-heap:ghc-internal
, hashable:base
, hashable:containers
, hashable:ghc-bignum
, hedgehog:containers
, hedgehog:template-haskell
, hedgehog:time
, hedgehog-fn:hedgehog
, hsc2hs:base
, indexed-traversable:base
, indexed-traversable:containers
, indexed-traversable-instances:base
, integer-conversion:base
, integer-logarithms:base
, integer-logarithms:ghc-bignum
, io-classes:base
, io-classes:time
, lens:containers
, lens:free
, lens:template-haskell
, list-t:foldl
, megaparsec:base
, megaparsec:containers
, megaparsec:transformers
, microlens-th:containers
, microlens-th:template-haskell
, microstache:aeson
, microstache:base
, microstache:containers
, microstache:unordered-containers
, microstache:vector
, monoidal-containers:base
, monoidal-containers:containers
, network-uri:th-compat
, nonempty-vector:base
, nothunks:containers
, nothunks:time
, nothunks:wherefrom-compat
, ordered-containers:containers
, os-string:template-haskell
, parallel:base
, parsec:text
, plutus-core:dependent-map
, plutus-core:microlens-th
, plutus-core:vty
, primitive:base
, process:base
, process:unix
, quickcheck-instances:QuickCheck
, quickcheck-instances:base
, quickcheck-instances:containers
, ral:base
, ral:boring
, recursion-schemes:containers
, recursion-schemes:template-haskell
, scientific:base
, scientific:containers
, scientific:integer-logarithms
, scientific:template-haskell
, semialign:base
, semialign:containers
, semigroupoids:bifunctors
, serialise:base
, serialise:containers
, serialise:ghc-prim
, serialise:time
, singletons:base
, singletons-th:base
, singletons-th:singletons
, singletons-th:template-haskell
, singletons-th:th-desugar
, singletons-th:th-orphans
, size-based:template-haskell
, some:base
, splitmix:base
, statistics:parallel
, tagged:base
, tagged:template-haskell
, tasty:base
, tasty:tagged
, tasty-golden:tasty
, tasty-hedgehog:base
, test-framework:time
, text:binary
, text:bytestring
, text:template-haskell
, text-iso8601:time
, text-short:base
, text-short:bytestring
, text-short:ghc-prim
, text-short:template-haskell
, th-abstraction:template-haskell
, th-compat:template-haskell
, th-desugar:template-haskell
, th-expand-syns:base
, th-expand-syns:containers
, th-expand-syns:template-haskell
, th-lift:template-haskell
, th-lift-instances:th-lift
, th-orphans:template-haskell
, these:base
, time-compat:base
, time-compat:deepseq
, time-compat:time
, transformers:base
, tree-diff:QuickCheck
, tree-diff:base
, tree-diff:containers
, tree-diff:time
, turtle:containers
, turtle:time
, typed-process:async
, universe-base:base
, universe-base:containers
, unix:time
, unordered-containers:hashable
, unordered-containers:template-haskell
, uuid-types:template-haskell
, vector-th-unbox:base
, vector-th-unbox:template-haskell
, wherefrom-compat:base
, wherefrom-compat:ghc-heap
, witherable:containers
12 changes: 9 additions & 3 deletions plutus-core/plutus-core/src/PlutusCore/Core/Instance/Eq.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

{-# OPTIONS_GHC -fno-warn-orphans #-}

{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeApplications #-}
Expand Down Expand Up @@ -51,9 +52,14 @@ deriving stock instance
(GEq uni, Closed uni, uni `Everywhere` Eq, Eq ann) =>
Eq (Type TyDeBruijn uni ann)

deriving stock instance (GEq uni, Closed uni, uni `Everywhere` Eq, Eq fun, Eq ann,
Eq (Term tyname name uni fun ann)
) => Eq (Program tyname name uni fun ann)
deriving stock instance (
#if __GLASGOW_HASKELL__ < 914
-- These constraints are REQUIRED for ghc < 9.14 but REDUNDANT for ghc >= 9.14
-- See https://gitlab.haskell.org/ghc/ghc/-/issues/26381#note_637863
GEq uni, Closed uni, Eq fun,
#endif
uni `Everywhere` Eq, Eq ann,
Eq (Term tyname name uni fun ann) ) => Eq (Program tyname name uni fun ann)

type EqRenameOf ren a = HasUniques a => a -> a -> EqRename ren

Expand Down
34 changes: 29 additions & 5 deletions plutus-core/plutus-core/src/PlutusCore/Error.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
Expand Down Expand Up @@ -84,8 +85,13 @@ deriving stock instance
deriving stock instance
( Eq (Term tyname name uni fun ann)
, Eq (Type tyname uni ann)
, GEq uni, Closed uni, uni `Everywhere` Eq
, Eq fun, Eq ann
#if __GLASGOW_HASKELL__ < 914
-- These constraints are REQUIRED for ghc < 9.14 but REDUNDANT for ghc >= 9.14
-- See https://gitlab.haskell.org/ghc/ghc/-/issues/26381#note_637863
, GEq uni, Closed uni
, Eq fun
#endif
, uni `Everywhere` Eq, Eq ann
) => Eq (NormCheckError tyname name uni fun ann)

-- | This is needed for nice kind/type checking error messages. In some cases the type checker knows
Expand Down Expand Up @@ -151,15 +157,33 @@ data Error uni fun ann
deriving stock (Generic, Functor)

deriving stock instance
(Eq fun, Eq ann, Closed uni, Everywhere uni Eq, GEq uni, Eq ParserError) =>
(Eq fun, Eq ann, Closed uni, Everywhere uni Eq, GEq uni
#if __GLASGOW_HASKELL__ < 914
-- These constraints are REQUIRED for ghc < 9.14 but REDUNDANT for ghc >= 9.14
-- See https://gitlab.haskell.org/ghc/ghc/-/issues/26381#note_637863
, Eq ParserError
#endif
) =>
Eq (Error uni fun ann)

deriving anyclass instance
(NFData fun, NFData ann, Closed uni, Everywhere uni NFData, NFData ParserError) =>
(NFData fun, NFData ann, Closed uni, Everywhere uni NFData
#if __GLASGOW_HASKELL__ < 914
-- These constraints are REQUIRED for ghc < 9.14 but REDUNDANT for ghc >= 9.14
-- See https://gitlab.haskell.org/ghc/ghc/-/issues/26381#note_637863
, NFData ParserError
#endif
) =>
NFData (Error uni fun ann)

deriving stock instance
(Show fun, Show ann, Closed uni, Everywhere uni Show, GShow uni, Show ParserError) =>
(Show fun, Show ann, Closed uni, Everywhere uni Show, GShow uni
#if __GLASGOW_HASKELL__ < 914
-- These constraints are REQUIRED for ghc < 9.14 but REDUNDANT for ghc >= 9.14
-- See https://gitlab.haskell.org/ghc/ghc/-/issues/26381#note_637863
, Show ParserError
#endif
) =>
Show (Error uni fun ann)

instance Pretty SourcePos where
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-- editorconfig-checker-disable-file
{-# OPTIONS_GHC -fno-warn-orphans #-}

{-# LANGUAGE CPP #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeOperators #-}
Expand Down Expand Up @@ -65,7 +66,13 @@ deriving stock instance

instance HashableTermConstraints uni fun ann => Hashable (Term DeBruijn uni fun ann)

deriving stock instance (GEq uni, Closed uni, uni `Everywhere` Eq, Eq fun, Eq ann,
deriving stock instance (
#if __GLASGOW_HASKELL__ < 914
-- These constraints are REQUIRED for ghc < 9.14 but REDUNDANT for ghc >= 9.14
-- See https://gitlab.haskell.org/ghc/ghc/-/issues/26381#note_637863
GEq uni, Closed uni, Eq fun,
#endif
uni `Everywhere` Eq, Eq ann,
Eq (Term name uni fun ann)
) => Eq (Program name uni fun ann)

Expand Down
12 changes: 9 additions & 3 deletions plutus-tx/src/PlutusTx/BuiltinList.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{-# LANGUAGE CPP #-}

{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}

{-# HLINT ignore "Redundant if" #-}
Expand Down Expand Up @@ -285,9 +287,13 @@ reverse xs = revAppend xs empty

-- | Plutus Tx version of 'Data.List.zip' for 'BuiltinList'.
_zip
:: forall a b
. (MkNil a, MkNil b)
=> BuiltinList a
:: forall a b .
#if __GLASGOW_HASKELL__ < 914
-- These constraints are REQUIRED for ghc < 9.14 but REDUNDANT for ghc >= 9.14
-- See https://gitlab.haskell.org/ghc/ghc/-/issues/26381#note_637863
(MkNil a, MkNil b) =>
#endif
BuiltinList a
-> BuiltinList b
-> BuiltinList (BuiltinPair a b)
_zip = zipWith (curry BI.BuiltinPair)
Expand Down
18 changes: 16 additions & 2 deletions plutus-tx/src/PlutusTx/Builtins/HasOpaque.hs
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,22 @@ instance MkNil BuiltinData
instance MkNil BuiltinValue
instance MkNil BuiltinBLS12_381_G1_Element
instance MkNil BuiltinBLS12_381_G2_Element
instance (MkNil a) => MkNil (BuiltinList a)
instance (MkNil a, MkNil b) => MkNil (BuiltinPair a b)

instance
#if __GLASGOW_HASKELL__ < 914
-- This constraint is REQUIRED for ghc < 9.14 but REDUNDANT for ghc >= 9.14
-- See https://gitlab.haskell.org/ghc/ghc/-/issues/26381#note_637863
(MkNil a) =>
#endif
MkNil (BuiltinList a)

instance
#if __GLASGOW_HASKELL__ < 914
-- These constraints are REQUIRED for ghc < 9.14 but REDUNDANT for ghc >= 9.14
-- See https://gitlab.haskell.org/ghc/ghc/-/issues/26381#note_637863
(MkNil a, MkNil b) =>
#endif
MkNil (BuiltinPair a b)

instance (HasToOpaque a arep, MkNil arep) => HasToOpaque [a] (BuiltinList arep) where
toOpaque = goList
Expand Down
Loading