Skip to content

Commit

Permalink
Remove a whole set of redundant constraints.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanknowles authored and erikd committed Mar 16, 2023
1 parent cf4cfbc commit 6db084b
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 31 deletions.
8 changes: 0 additions & 8 deletions lib/wallet/integration/src/Test/Integration/Framework/DSL.hs
Expand Up @@ -1306,7 +1306,6 @@ restoreWalletFromPubKey
, Show w
, FromJSON w
, MonadIO m
, MonadUnliftIO m
)
=> Context
-> Text
Expand Down Expand Up @@ -1576,7 +1575,6 @@ fixtureMultiAssetRandomWallet
( DecodeAddress n
, DecodeStakeAddress n
, EncodeAddress n
, MonadIO m
, MonadUnliftIO m
)
=> Context
Expand Down Expand Up @@ -1622,7 +1620,6 @@ fixtureMultiAssetIcarusWallet
( DecodeAddress n
, DecodeStakeAddress n
, EncodeAddress n
, MonadIO m
, MonadUnliftIO m
)
=> Context
Expand Down Expand Up @@ -1964,7 +1961,6 @@ fixtureRandomWallet = fmap fst . fixtureRandomWalletMws
fixtureRandomWalletAddrs
:: forall (n :: NetworkDiscriminant) m.
( PaymentAddress n ByronKey 'CredFromKeyK
, MonadIO m
, MonadUnliftIO m
)
=> Context
Expand All @@ -1986,7 +1982,6 @@ fixtureRandomWalletWith
, DecodeAddress n
, DecodeStakeAddress n
, PaymentAddress n ByronKey 'CredFromKeyK
, MonadIO m
, MonadUnliftIO m
)
=> Context
Expand Down Expand Up @@ -2024,7 +2019,6 @@ fixtureIcarusWallet = fmap fst . fixtureIcarusWalletMws
fixtureIcarusWalletAddrs
:: forall (n :: NetworkDiscriminant) m.
( PaymentAddress n IcarusKey 'CredFromKeyK
, MonadIO m
, MonadUnliftIO m
)
=> Context
Expand All @@ -2046,7 +2040,6 @@ fixtureIcarusWalletWith
, DecodeAddress n
, DecodeStakeAddress n
, PaymentAddress n IcarusKey 'CredFromKeyK
, MonadIO m
, MonadUnliftIO m
)
=> Context
Expand Down Expand Up @@ -2115,7 +2108,6 @@ fixtureWalletWith
( EncodeAddress n
, DecodeAddress n
, DecodeStakeAddress n
, MonadIO m
, MonadUnliftIO m
)
=> Context
Expand Down
Expand Up @@ -21,7 +21,7 @@ module Test.Integration.Framework.Request
import Prelude

import Control.Monad.IO.Class
( MonadIO, liftIO )
( liftIO )
import Control.Monad.IO.Unlift
( MonadUnliftIO (..) )
import Data.Aeson
Expand Down Expand Up @@ -154,8 +154,7 @@ rawRequest = baseRequest mempty handleResponse

baseRequest
:: forall a m s.
( MonadIO m
, MonadUnliftIO m
( MonadUnliftIO m
, HasType (URI, Manager) s
)
=> RequestHeaders
Expand Down Expand Up @@ -197,7 +196,6 @@ baseRequest defaultHeaders handleResponse ctx (verb, path) headers payload = do
unsafeRequest
:: forall a m.
( FromJSON a
, MonadIO m
, MonadUnliftIO m
)
=> Context
Expand Down
16 changes: 7 additions & 9 deletions lib/wallet/integration/src/Test/Integration/Plutus.hs
Expand Up @@ -46,8 +46,6 @@ import Codec.Serialise
( serialise )
import Control.Arrow
( left )
import Control.Monad.IO.Unlift
( MonadUnliftIO (..) )
import Crypto.Hash.Utils
( blake2b224 )
import Data.Aeson
Expand Down Expand Up @@ -114,7 +112,7 @@ pingPong_1 = [aesonQQ|{
"inputs": []
}|]

pingPong_2 :: (MonadUnliftIO m, MonadFail m) => Aeson.Value -> m Aeson.Value
pingPong_2 :: MonadFail m => Aeson.Value -> m Aeson.Value
pingPong_2 =
renderMustacheThrow template
where
Expand Down Expand Up @@ -156,7 +154,7 @@ game_1 = [aesonQQ|{
"redeemers": []
}|]

game_2 :: (MonadUnliftIO m, MonadFail m) => Aeson.Value -> m Aeson.Value
game_2 :: MonadFail m => Aeson.Value -> m Aeson.Value
game_2 =
renderMustacheThrow template
where
Expand Down Expand Up @@ -192,7 +190,7 @@ game_2 =
]
}|]

game_3 :: (MonadUnliftIO m, MonadFail m) => Aeson.Value -> m Aeson.Value
game_3 :: MonadFail m => Aeson.Value -> m Aeson.Value
game_3 =
renderMustacheThrow template
where
Expand Down Expand Up @@ -238,7 +236,7 @@ game_3 =
-- - policy: A base16 corresponding policy (see 'mkSignerPolicy')
-- - vkHash: The verification key hash (base16) which was used to generate the policy.
--
mintBurn_1 :: (MonadUnliftIO m, MonadFail m) => Aeson.Value -> m Aeson.Value
mintBurn_1 :: MonadFail m => Aeson.Value -> m Aeson.Value
mintBurn_1 =
renderMustacheThrow template
where
Expand All @@ -260,7 +258,7 @@ mintBurn_1 =
--
-- The template has the same three parameters as 'mintBurn_1'
--
mintBurn_2 :: (MonadUnliftIO m, MonadFail m) => Aeson.Value -> m Aeson.Value
mintBurn_2 :: MonadFail m => Aeson.Value -> m Aeson.Value
mintBurn_2 =
renderMustacheThrow template
where
Expand Down Expand Up @@ -288,7 +286,7 @@ mintBurn_2 =
-- This however requires to pass a `Rewarding` type of redeemer, which is quite
-- exotic :)
--
withdrawScript_1 :: (MonadUnliftIO m, MonadFail m) => m Aeson.Value
withdrawScript_1 :: MonadFail m => m Aeson.Value
withdrawScript_1 =
renderMustacheThrow template $ Aeson.object
[ "script" .= script
Expand Down Expand Up @@ -425,7 +423,7 @@ mkCurrencyPolicy input = (script, hashScript script)
------------------------------------------------------------------------------}

renderMustacheThrow
:: forall m. (MonadUnliftIO m, MonadFail m)
:: forall m. MonadFail m
=> Mustache.Template
-> Aeson.Value
-> m Aeson.Value
Expand Down
Expand Up @@ -959,7 +959,7 @@ spec = describe "SHELLEY_CLI_TRANSACTIONS" $ do
c `shouldBe` ExitFailure 1
where
postTxViaCLI
:: (MonadIO m, MonadUnliftIO m)
:: MonadUnliftIO m
=> Context
-> ApiWallet
-> ApiWallet
Expand All @@ -977,7 +977,7 @@ spec = describe "SHELLEY_CLI_TRANSACTIONS" $ do
expectValidJSON (Proxy @(ApiTransaction n)) out

postTxArgs
:: (MonadIO m, MonadUnliftIO m)
:: MonadUnliftIO m
=> Context
-> ApiWallet
-> ApiWallet
Expand Down
Expand Up @@ -36,8 +36,6 @@ import Cardano.Wallet.Primitive.Types
( getWalletName, walletNameMaxLength, walletNameMinLength )
import Control.Monad
( forM_ )
import Control.Monad.IO.Class
( MonadIO )
import Control.Monad.IO.Unlift
( MonadUnliftIO (..) )
import Control.Monad.Trans.Resource
Expand Down Expand Up @@ -828,16 +826,16 @@ spec = describe "SHELLEY_CLI_WALLETS" $ do
T.unpack err `shouldContain` expErr

emptyRandomWallet'
:: (MonadIO m, MonadUnliftIO m)
:: MonadUnliftIO m
=> Context
-> ResourceT m String
emptyRandomWallet' = fmap (T.unpack . view walletId) . emptyRandomWallet

emptyWallet' :: (MonadIO m, MonadUnliftIO m) => Context -> ResourceT m String
emptyWallet' :: MonadUnliftIO m => Context -> ResourceT m String
emptyWallet' = fmap (T.unpack . view walletId) . emptyWallet

emptyWalletWith'
:: (MonadIO m, MonadUnliftIO m)
:: MonadUnliftIO m
=> Context -> (Text, Text, Int) -> ResourceT m String
emptyWalletWith' ctx (name, pass, pg) =
fmap (T.unpack . view walletId) (emptyWalletWith ctx (name, pass, pg))
Expand Down
2 changes: 1 addition & 1 deletion lib/wallet/src/Cardano/Wallet/DB/Layer.hs
Expand Up @@ -991,7 +991,7 @@ deleteDelegationCertificates wid filters = do
-- for /outgoing/ payments, but less so for /ingoing/ payments.

selectTransactionInfo
:: (Monad m, MonadIO m)
:: MonadIO m
=> TimeInterpreter IO
-> W.BlockHeader
-> (TxId -> m (Maybe TxRelation))
Expand Down
2 changes: 1 addition & 1 deletion lib/wallet/src/Cardano/Wallet/DB/Store/QueryStore.hs
Expand Up @@ -62,7 +62,7 @@ class Query qa where
query :: qa b -> World qa -> b

queryStoreProperty
:: (Monad m, Eq b, Query qa, MonadFail m, Base da ~ World qa)
:: (Eq b, Query qa, MonadFail m, Base da ~ World qa)
=> QueryStore m qa da
-> qa b
-> m Bool
Expand Down
2 changes: 1 addition & 1 deletion lib/wallet/src/Ouroboros/Network/Client/Wallet.hs
Expand Up @@ -312,7 +312,7 @@ data LocalRollbackResult block
-- *------*
--
chainSyncWithBlocks
:: forall m block. (Monad m, MonadSTM m, MonadThrow m, HasHeader block)
:: forall m block. (MonadThrow m, HasHeader block)
=> Tracer m (ChainSyncLog block (Point block))
-> PipeliningStrategy block
-> ChainFollower m (Point block) (Tip block) (NonEmpty block)
Expand Down

0 comments on commit 6db084b

Please sign in to comment.