Skip to content

Commit 4a2c1dc

Browse files
committed
Replace liftIO with liftIOAnnotated
1 parent 1333cdc commit 4a2c1dc

File tree

20 files changed

+44
-41
lines changed

20 files changed

+44
-41
lines changed

bench/locli/locli.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ test-suite test-locli
212212
build-depends: cardano-prelude
213213
, containers
214214
, hedgehog
215-
, hedgehog-extras ^>= 0.8
215+
, hedgehog-extras ^>= 0.9
216216
, locli
217217
, text
218218

cabal.project

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repository cardano-haskell-packages
1313
-- See CONTRIBUTING for information about these, including some Nix commands
1414
-- you need to run if you change them
1515
index-state:
16-
, hackage.haskell.org 2025-06-24T21:06:59Z
16+
, hackage.haskell.org 2025-06-27T07:48:39Z
1717
, cardano-haskell-packages 2025-09-18T12:21:32Z
1818

1919
packages:
@@ -60,6 +60,7 @@ package plutus-scripts-bench
6060

6161
allow-newer:
6262
, katip:Win32
63+
, hedgehog-extras
6364

6465
if impl (ghc >= 9.12)
6566
allow-newer:

cardano-node-chairman/cardano-node-chairman.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ test-suite chairman-tests
7575
, data-default-class
7676
, filepath
7777
, hedgehog
78-
, hedgehog-extras ^>= 0.8
78+
, hedgehog-extras ^>= 0.9
7979
, network
8080
, process
8181
, random

cardano-node/cardano-node.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ test-suite cardano-node-test
265265
, filepath
266266
, hedgehog
267267
, hedgehog-corpus
268-
, hedgehog-extras ^>= 0.8
268+
, hedgehog-extras ^>= 0.9
269269
, iproute
270270
, mtl
271271
, ouroboros-consensus

cardano-testnet/cardano-testnet.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ library
7171
, extra
7272
, filepath
7373
, hedgehog
74-
, hedgehog-extras ^>= 0.8
74+
, hedgehog-extras ^>= 0.9
7575
, http-conduit
7676
, lens-aeson
7777
, microlens

cardano-testnet/src/Testnet/Components/Configuration.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ createSPOGenesisAndFiles
227227
[ inputGenesisShelleyFp, inputGenesisAlonzoFp, inputGenesisConwayFp
228228
, tempAbsPath </> "byron.genesis.spec.json" -- Created by create-testnet-data
229229
]
230-
(\fp -> liftIO $ whenM (System.doesFileExist fp) (System.removeFile fp))
230+
(\fp -> liftIOAnnotated $ whenM (System.doesFileExist fp) (System.removeFile fp))
231231

232232
return genesisShelleyDir
233233
where

cardano-testnet/src/Testnet/Components/Query.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ getEpochStateView nodeConfigFile socketPath = withFrozenCallStack $ do
260260
epochStateView <- H.evalIO $ newIORef Nothing
261261
void . asyncRegister_ . runExceptT . foldEpochState nodeConfigFile socketPath QuickValidation (EpochNo maxBound) Nothing
262262
$ \epochState slotNumber blockNumber -> do
263-
liftIO . writeIORef epochStateView $ Just (epochState, slotNumber, blockNumber)
263+
liftIOAnnotated . writeIORef epochStateView $ Just (epochState, slotNumber, blockNumber)
264264
pure ConditionNotMet
265265
pure $ EpochStateView nodeConfigFile socketPath epochStateView
266266

cardano-testnet/src/Testnet/Ping.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pingNode :: MonadIO m
6565
=> TestnetMagic -- ^ testnet magic
6666
-> IO.Sprocket -- ^ node sprocket
6767
-> m (Either PingClientError ()) -- ^ '()' means success
68-
pingNode networkMagic sprocket = liftIO $ bracket
68+
pingNode networkMagic sprocket = liftIOAnnotated $ bracket
6969
(Socket.socket (Socket.addrFamily peer) Socket.Stream Socket.defaultProtocol)
7070
Socket.close
7171
(\sd -> handle (pure . Left . PceException) $ withTimeoutSerial $ \timeoutfn -> do
@@ -143,7 +143,7 @@ waitForSprocket :: MonadIO m
143143
-> MT.DiffTime -- ^ interval
144144
-> IO.Sprocket
145145
-> m (Either IOException ())
146-
waitForSprocket timeout interval sprocket = liftIO $ do
146+
waitForSprocket timeout interval sprocket = liftIOAnnotated $ do
147147
lastResult <- newIORef (Right ())
148148
_ <- MT.timeout timeout $ loop lastResult
149149
readIORef lastResult
@@ -158,7 +158,7 @@ waitForSprocket timeout interval sprocket = liftIO $ do
158158

159159
-- | Check if the sprocket can be connected to. Returns an exception thrown during the connection attempt.
160160
checkSprocket :: MonadIO m => IO.Sprocket -> m (Either IOException ())
161-
checkSprocket sprocket = liftIO $ do
161+
checkSprocket sprocket = liftIOAnnotated $ do
162162
let AddrInfo{addrFamily, addrSocketType, addrProtocol, addrAddress} = sprocketToAddrInfo sprocket
163163
bracket (Socket.socket addrFamily addrSocketType addrProtocol) Socket.close $ \sock -> do
164164
-- Capture only synchronous exceptions from the connection attempt.
@@ -179,10 +179,10 @@ waitForPortClosed
179179
-> MT.DiffTime -- ^ check interval
180180
-> PortNumber
181181
-> m Bool -- ^ 'True' if port is closed, 'False' if timeout was reached before that
182-
waitForPortClosed timeout interval portNumber = liftIO $ do
182+
waitForPortClosed timeout interval portNumber = liftIOAnnotated $ do
183183
let retryPolicy = R.constantDelay (round @Double $ realToFrac interval) <> R.limitRetries (ceiling $ toRational timeout / toRational interval)
184184
fmap not . R.retrying retryPolicy (const pure) $ \_ ->
185-
liftIO (IO.isPortOpen (fromIntegral portNumber))
185+
liftIOAnnotated (IO.isPortOpen (fromIntegral portNumber))
186186

187187
data PingClientError
188188
= PceDecodingError

cardano-testnet/src/Testnet/Process/Cli/DRep.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ makeActivityChangeProposal execConfig epochStateView ceo work
365365
baseDir <- H.createDirectoryIfMissing work
366366

367367
let proposalAnchorDataIpfsHash = "QmexFJuEn5RtnHEqpxDcqrazdHPzAwe7zs2RxHLfMH5gBz"
368-
proposalAnchorFile <- H.noteM $ liftIO $ makeAbsolute $ "test" </> "cardano-testnet-test" </> "files" </> "sample-proposal-anchor"
368+
proposalAnchorFile <- H.noteM $ liftIOAnnotated $ makeAbsolute $ "test" </> "cardano-testnet-test" </> "files" </> "sample-proposal-anchor"
369369

370370
proposalAnchorDataHash <- execCli' execConfig
371371
[ "hash", "anchor-data", "--file-binary", proposalAnchorFile

cardano-testnet/src/Testnet/Process/Run.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ initiateProcess
227227
-> ExceptT ProcessError m (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle, ReleaseKey)
228228
initiateProcess cp = do
229229
(mhStdin, mhStdout, mhStderr, hProcess)
230-
<- handlesExceptT resourceAndIOExceptionHandlers . liftIO $ IO.createProcess cp
230+
<- handlesExceptT resourceAndIOExceptionHandlers . liftIOAnnotated $ IO.createProcess cp
231231

232232
releaseKey <- handlesExceptT resourceAndIOExceptionHandlers
233233
. register $ IO.cleanupProcess (mhStdin, mhStdout, mhStderr, hProcess)

0 commit comments

Comments
 (0)