Skip to content

Commit

Permalink
Bump hackage.nix, haskell.nix, and index-state (IntersectMBO#4818)
Browse files Browse the repository at this point in the history
* Bump haskell.nix and hackage.nix

It's been a while

* Bump index-state

* Bump cardano-prelude

* Bump cabal

To avoid haskell/cabal#8370 which affects
3.6.2.0.

* Loosen some upper bounds

* Fixups for new versions

* New PyF is broken
  • Loading branch information
michaelpj authored and brainrake committed Dec 8, 2022
1 parent 9787f42 commit 3b13704
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 34 deletions.
4 changes: 2 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- Bump this if you need newer packages
index-state: 2022-05-12T00:00:00Z
index-state: 2022-08-31T00:00:00Z

packages: doc
plutus-benchmark
Expand Down Expand Up @@ -64,7 +64,7 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-prelude
tag: fd773f7a58412131512b9f694ab95653ac430852
tag: 533aec85c1ca05c7d171da44b89341fb736ecfe5
subdir:
cardano-prelude
cardano-prelude-test
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: 3 additions & 1 deletion nix/pkgs/haskell/extra.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ let
};
cabalInstallProject = haskell-nix.hackage-project {
name = "cabal-install";
version = "3.6.2.0";
version = "3.8.1.0";
inherit compiler-nix-name index-state;
# The test suite depends on a nonexistent package...
configureArgs = "--disable-tests";
};
cardanoRepoToolProject = haskell-nix.cabalProject' {
src = sources.cardano-repo-tool;
Expand Down
2 changes: 1 addition & 1 deletion nix/pkgs/haskell/haskell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ let
"https://github.com/Quid2/flat.git"."ee59880f47ab835dbd73bea0847dab7869fc20d8" = "1lrzknw765pz2j97nvv9ip3l1mcpf2zr4n56hwlz0rk7wq7ls4cm"; # editorconfig-checker-disable-line
"https://github.com/input-output-hk/cardano-base"."cc049d7c9b9a0129c15b1355fd1dff9e1a1a551c" = "sha256-Ckbl3QkKOuMkIuTsSIWxWly6NNuhGP53q+nwYyBXzz8="; # editorconfig-checker-disable-line
"https://github.com/input-output-hk/cardano-crypto.git"."07397f0e50da97eaa0575d93bee7ac4b2b2576ec" = "06sdx5ndn2g722jhpicmg96vsrys89fl81k8290b3lr6b1b0w4m3"; # editorconfig-checker-disable-line
"https://github.com/input-output-hk/cardano-prelude"."fd773f7a58412131512b9f694ab95653ac430852" = "02jddik1yw0222wd6q0vv10f7y8rdgrlqaiy83ph002f9kjx7mh6"; # editorconfig-checker-disable-line
"https://github.com/input-output-hk/cardano-prelude"."533aec85c1ca05c7d171da44b89341fb736ecfe5" = "0z2y3wzppc12bpn9bl48776ms3nszw8j58xfsdxf97nzjgrmd62g"; # editorconfig-checker-disable-line
"https://github.com/input-output-hk/Win32-network"."3825d3abf75f83f406c1f7161883c438dac7277d" = "19wahfv726fa3mqajpqdqhnl9ica3xmf68i254q45iyjcpj1psqx"; # editorconfig-checker-disable-line
};
# Configuration settings needed for cabal configure to work when cross compiling
Expand Down
4 changes: 2 additions & 2 deletions plutus-core/executables/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ printBudgetStateBudget model b =
putStrLn $ "CPU budget: " ++ show cpu
putStrLn $ "Memory budget: " ++ show mem

printBudgetStateTally :: (Eq fun, Cek.Hashable fun, Show fun)
printBudgetStateTally :: (Cek.Hashable fun, Show fun)
=> UPLC.Term UPLC.Name PLC.DefaultUni PLC.DefaultFun () -> CekModel -> Cek.CekExTally fun -> IO ()
printBudgetStateTally term model (Cek.CekExTally costs) = do
putStrLn $ "Const " ++ pbudget (Cek.BStep Cek.BConst)
Expand Down Expand Up @@ -204,7 +204,7 @@ class PrintBudgetState cost where
instance PrintBudgetState Cek.CountingSt where
printBudgetState _term model (Cek.CountingSt budget) = printBudgetStateBudget model budget

instance (Eq fun, Cek.Hashable fun, Show fun) => PrintBudgetState (Cek.TallyingSt fun) where
instance (Cek.Hashable fun, Show fun) => PrintBudgetState (Cek.TallyingSt fun) where
printBudgetState term model (Cek.TallyingSt tally budget) = do
printBudgetStateBudget model budget
putStrLn ""
Expand Down
10 changes: 5 additions & 5 deletions plutus-core/plutus-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ library

build-depends:
, aeson
, algebraic-graphs >=0.3
, algebraic-graphs >=0.7
, array
, barbies
, base >=4.9 && <5
Expand Down Expand Up @@ -305,7 +305,7 @@ library
, semigroupoids
, semigroups >=0.19.1
, serialise
, some <1.0.3
, some
, template-haskell
, text
, th-compat
Expand Down Expand Up @@ -364,7 +364,7 @@ library plutus-core-testlib
, prettyprinter >=1.1.0.1
, prettyprinter-configurable
, size-based
, some <1.0.3
, some
, Stream
, tasty
, tasty-golden
Expand Down Expand Up @@ -737,7 +737,7 @@ library index-envs
, containers
, extra
, nonempty-vector
, ral ==0.1
, ral ^>=0.2
, vector

-- broken for ral-0.2 conflicts with cardano-binary:recursion-schemes
Expand All @@ -752,7 +752,7 @@ benchmark index-envs-bench
, criterion >=1.5.9.0
, index-envs
, nonempty-vector
, ral ==0.1
, ral ^>=0.2
, random >=1.2.0

-- broken for ral-0.2 conflicts with cardano-binary:recursion-schemes
Expand Down
13 changes: 1 addition & 12 deletions plutus-core/plutus-ir/src/PlutusIR/Core/Plated.hs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import PlutusIR.Core.Type

import Control.Lens hiding (Strict, (<.>))
import Data.Functor.Apply
import Data.Functor.Bind.Class

infixr 6 <^>

Expand Down Expand Up @@ -105,18 +106,6 @@ bindingIds f = \case
<.*> traverse1Maybe ((PLC.tyVarDeclName . PLC.theUnique) f) tvdecls
<.> PLC.theUnique f n
<.*> traverse1Maybe ((PLC.varDeclName . PLC.theUnique) f) vdecls)
where
-- | Traverse using 'Apply', but getting back the result in 'MaybeApply f' instead of in 'f'.
traverse1Maybe :: (Apply f, Traversable t) => (a -> f b) -> t a -> MaybeApply f (t b)
traverse1Maybe f' = traverse (MaybeApply . Left . f')

-- | Apply a non-empty container of functions to a possibly-empty-with-unit container of values.
-- Taken from: <https://github.com/ekmett/semigroupoids/issues/66#issue-271899630>
(<.*>) :: (Apply f) => f (a -> b) -> MaybeApply f a -> f b
ff <.*> MaybeApply (Left fa) = ff <.> fa
ff <.*> MaybeApply (Right a) = ($ a) <$> ff
infixl 4 <.*>


{-# INLINE termSubkinds #-}
-- | Get all the direct child 'Kind's of the given 'Term'.
Expand Down
2 changes: 1 addition & 1 deletion plutus-core/plutus-ir/src/PlutusIR/Transform/DeadCode.hs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ calculateLiveness ver t =
let
depGraph :: G.Graph Deps.Node
depGraph = fst $ Deps.runTermDeps ver t
in Set.fromList $ T.reachable Deps.Root depGraph
in Set.fromList $ T.reachable depGraph Deps.Root

live :: (MonadReader Liveness m, PLC.HasUnique n unique) => n -> m Bool
live n =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ instance (Show fun, Ord fun) => Pretty (TallyingSt fun) where
]

-- | For a detailed report on what costs how much + the same overall budget that 'Counting' gives.
tallying :: (Eq fun, Hashable fun) => ExBudgetMode (TallyingSt fun) uni fun
tallying :: (Hashable fun) => ExBudgetMode (TallyingSt fun) uni fun
tallying =
monoidalBudgeting $ \key budgetToSpend ->
TallyingSt (CekExTally $ singleton key budgetToSpend) budgetToSpend
Expand Down
4 changes: 2 additions & 2 deletions plutus-errors/plutus-errors.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ library
, plutus-tx-plugin ^>=1.0
, prettyprinter >=1.1.0.1
, template-haskell >=2.16
, th-abstraction <0.4
, th-abstraction <0.5

executable plutus-errors-next
import: lang
Expand All @@ -84,4 +84,4 @@ executable plutus-errors-bootstrap
, plutus-core
, plutus-errors
, template-haskell >=2.16
, th-abstraction <0.4
, th-abstraction <0.5
4 changes: 3 additions & 1 deletion plutus-tx-plugin/plutus-tx-plugin.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ library
PlutusTx.PIRTypes
PlutusTx.PLCTypes

-- this comment should be by the dep, but cabal-fmt moves it :(
-- Newer PyF is mysteriously broken, hence the bound: https://github.com/guibou/PyF/issues/111
build-depends:
, array
, base >=4.9 && <5
Expand All @@ -82,7 +84,7 @@ library
, plutus-core ^>=1.0
, plutus-tx ^>=1.0
, prettyprinter
, PyF
, PyF <0.11
, template-haskell
, text
, transformers
Expand Down

0 comments on commit 3b13704

Please sign in to comment.