Skip to content

Commit 3f79f38

Browse files
erikdsgillespie
authored andcommitted
Make it build with ghc-9.10
1 parent 889f969 commit 3f79f38

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

cabal.project

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,17 @@ package snap-server
6868
flags: -openssl
6969

7070
allow-newer:
71-
swagger2:aeson
71+
, swagger2:aeson
72+
-- The version of ouroboros-consensus specified by cardano-node uses an earlier version of
73+
-- quickcheck-state-machine that does not compile with ghc-9.10 so we allow a never version
74+
-- that builds with ghc-9.10 (and earlier).
75+
, ouroboros-consensus:quickcheck-state-machine
7276

7377
constraints:
7478
-- STM 2.5.2 is broken: https://github.com/haskell/stm/issues/76
7579
, stm >= 2.5.3.1
80+
-- Earlier versions do not compile with ghc-9.10.
81+
, quickcheck-state-machine ^>= 0.10
7682

7783
-- ---------------------------------------------------------
7884

cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Generic/Tx/Alonzo.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import Cardano.DbSync.Era.Shelley.Generic.Witness
3838
import Cardano.DbSync.Types (DataHash)
3939
import qualified Cardano.Ledger.Address as Ledger
4040
import Cardano.Ledger.Allegra.Scripts (Timelock)
41-
import Cardano.Ledger.Alonzo.Scripts (AsIx (..), ExUnits (..), PlutusPurpose (..), txscriptfee, unPlutusBinary)
41+
import Cardano.Ledger.Alonzo.Scripts (AsIx (..), ExUnits (..), PlutusPurpose, txscriptfee, unPlutusBinary)
4242
import qualified Cardano.Ledger.Alonzo.Scripts as Alonzo
4343
import qualified Cardano.Ledger.Alonzo.Tx as Alonzo
4444
import Cardano.Ledger.Alonzo.TxAuxData (AlonzoTxAuxData (..), getAlonzoTxAuxDataScripts)
@@ -265,7 +265,7 @@ resolveRedeemers ioExtraPlutus mprices tx toCert =
265265

266266
mkPurpose = \case
267267
Strict.SNothing -> Nothing
268-
Strict.SJust a -> toAlonzoPurpose txBody $ hoistPlutusPurpose Alonzo.toAsItem a
268+
Strict.SJust a -> toAlonzoPurpose txBody $ Alonzo.hoistPlutusPurpose Alonzo.toAsItem a
269269

270270
handleTxInPtr :: Word64 -> Ledger.TxIn StandardCrypto -> RedeemerMaps -> (RedeemerMaps, Maybe (Either TxIn ByteString))
271271
handleTxInPtr rdmrIx txIn mps = case Map.lookup txIn (rmInps mps) of
@@ -331,7 +331,7 @@ getPlutusSizes ::
331331
( Core.EraTx era
332332
, Core.TxWits era ~ Alonzo.AlonzoTxWits era
333333
, Core.Script era ~ Alonzo.AlonzoScript era
334-
, AlonzoEraScript era
334+
, Alonzo.AlonzoEraScript era
335335
) =>
336336
Core.Tx era ->
337337
[Word64]
@@ -341,7 +341,7 @@ getPlutusSizes tx =
341341
tx ^. (Core.witsTxL . Alonzo.scriptAlonzoTxWitsL)
342342

343343
-- | Returns Nothing for non-plutus scripts.
344-
getPlutusScriptSize :: AlonzoEraScript era => Alonzo.AlonzoScript era -> Maybe Word64
344+
getPlutusScriptSize :: Alonzo.AlonzoEraScript era => Alonzo.AlonzoScript era -> Maybe Word64
345345
getPlutusScriptSize script =
346346
case script of
347347
Alonzo.TimelockScript {} -> Nothing

0 commit comments

Comments
 (0)