Skip to content

Commit 11b7d7b

Browse files
committed
fix haskell compiler errors
1 parent 45e391b commit 11b7d7b

File tree

34 files changed

+106
-65
lines changed

34 files changed

+106
-65
lines changed

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/address-derivation-discovery/lib/Cardano/Wallet/Address/Derivation/SharedKey.hs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import Prelude
3333

3434
import Cardano.Address.Script
3535
( Cosigner
36-
, KeyHash
3736
, Script (..)
3837
, ScriptTemplate (..)
3938
, toScriptHash
@@ -81,7 +80,7 @@ import GHC.Stack
8180

8281
import qualified Cardano.Address as CA
8382
import qualified Cardano.Address.Derivation as CA
84-
import qualified Cardano.Address.Script as CA
83+
import qualified Cardano.Address.KeyHash as CA
8584
import qualified Cardano.Address.Style.Shelley as CA
8685
import qualified Data.Map.Strict as Map
8786

@@ -152,11 +151,11 @@ replaceCosignersWithVerKeys
152151
:: CA.Role
153152
-> ScriptTemplate
154153
-> Index 'Soft 'CredFromScriptK
155-
-> Script KeyHash
154+
-> Script CA.KeyHash
156155
replaceCosignersWithVerKeys role' (ScriptTemplate xpubs scriptTemplate) ix =
157156
replaceCosigner scriptTemplate
158157
where
159-
replaceCosigner :: Script Cosigner -> Script KeyHash
158+
replaceCosigner :: Script Cosigner -> Script CA.KeyHash
160159
replaceCosigner = \case
161160
RequireSignatureOf c -> RequireSignatureOf $ toKeyHash c
162161
RequireAllOf xs -> RequireAllOf (map replaceCosigner xs)
@@ -169,7 +168,7 @@ replaceCosignersWithVerKeys role' (ScriptTemplate xpubs scriptTemplate) ix =
169168
Index 'Soft 'CredFromScriptK -> CA.Index 'CA.Soft 'CA.PaymentK
170169
convertIndex = fromJust . CA.indexFromWord32 . fromIntegral . fromEnum
171170

172-
toKeyHash :: HasCallStack => Cosigner -> KeyHash
171+
toKeyHash :: HasCallStack => Cosigner -> CA.KeyHash
173172
toKeyHash c =
174173
case Map.lookup c xpubs of
175174
Nothing -> error "Impossible: cosigner without accXPpub."

lib/api/src/Cardano/Wallet/Api/Http/Server.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ import Servant.Server
267267
)
268268

269269
import qualified Cardano.Address.Derivation as CA
270+
import qualified Cardano.Address.KeyHash as CA
270271
import qualified Cardano.Address.Script as CA
271272
import qualified Cardano.Address.Style.Shelley as CA
272273
import qualified Cardano.Api as Cardano

lib/api/src/Cardano/Wallet/Api/Http/Shelley/Server.hs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ import Cardano.Address.Derivation
142142
)
143143
import Cardano.Address.Script
144144
( Cosigner (..)
145-
, KeyHash (KeyHash)
146-
, KeyRole (..)
147145
, Script
148146
, ScriptTemplate (..)
149147
, ValidationLevel (..)
@@ -839,6 +837,7 @@ import UnliftIO.Exception
839837
( tryAnyDeep
840838
)
841839

840+
import qualified Cardano.Address.KeyHash as CA
842841
import qualified Cardano.Address.Script as CA
843842
import qualified Cardano.Address.Style.Shelley as CA
844843
import qualified Cardano.Api as Cardano
@@ -3456,7 +3455,7 @@ decodeTransaction
34563455
$ maybe
34573456
AnyWitnessCountCtx
34583457
( ShelleyWalletCtx
3459-
. KeyHash Policy
3458+
. CA.KeyHash CA.Policy
34603459
. xpubToBytes
34613460
)
34623461
policyKeyM
@@ -3810,8 +3809,8 @@ submitSharedTransaction ctx apiw@(ApiT wid) apitx = do
38103809
isTimelock (NativeExplicitScript _ _) = True
38113810
isTimelock _ = False
38123811

3813-
isDelegationKeyHash (KeyHash CA.Delegation _) = True
3814-
isDelegationKeyHash (KeyHash _ _) = False
3812+
isDelegationKeyHash (CA.KeyHash CA.Delegation _) = True
3813+
isDelegationKeyHash (CA.KeyHash _ _) = False
38153814

38163815
hasDelegationKeyHash s =
38173816
isTimelock s && all isDelegationKeyHash (retrieveAllKeyHashes s)

lib/api/src/Cardano/Wallet/Api/Types.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,12 @@ import Cardano.Address.Derivation
262262
, xpubFromBytes
263263
, xpubToBytes
264264
)
265+
266+
import Cardano.Address.KeyHash
267+
( KeyHash (..)
268+
)
265269
import Cardano.Address.Script
266270
( Cosigner (..)
267-
, KeyHash (..)
268271
, Script
269272
, ScriptHash (..)
270273
, ScriptTemplate

lib/application-tls/test/Cardano/Wallet/Application/TlsSpec.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,7 @@ mkHttpsManagerSettings TlsConfiguration{tlsCaCert, tlsSvCert, tlsSvKey} = do
259259
sockSettings = Nothing
260260
clientParams caChain credentials =
261261
(defaultParamsClient "127.0.0.1" "")
262-
{ clientUseMaxFragmentLength = Nothing
263-
, clientUseServerNameIndication = True
262+
{ clientUseServerNameIndication = True
264263
, clientWantSessionResume = Nothing
265264
, clientShared = clientShared caChain credentials
266265
, clientHooks = clientHooks credentials

lib/balance-tx/lib/internal/Internal/Cardano/Write/Tx/Balance.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ import Text.Pretty.Simple
269269
( pShow
270270
)
271271

272+
import qualified Cardano.Address.KeyHash as CA
272273
import qualified Cardano.Address.Script as CA
273274
import qualified Cardano.CoinSelection.UTxOIndex as UTxOIndex
274275
import qualified Cardano.CoinSelection.UTxOSelection as UTxOSelection

lib/balance-tx/lib/internal/Internal/Cardano/Write/Tx/Sign.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ import Numeric.Natural
105105
( Natural
106106
)
107107

108+
import qualified Cardano.Address.KeyHash as CA
108109
import qualified Cardano.Address.Script as CA
109110
import qualified Cardano.Api as CardanoApi
110111
import qualified Cardano.Api.Shelley as CardanoApi

lib/balance-tx/lib/internal/Internal/Cardano/Write/UTxOAssumptions.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import Internal.Cardano.Write.Tx
1919
( Address
2020
)
2121

22+
import qualified Cardano.Address.KeyHash as CA
2223
import qualified Cardano.Address.Script as CA
2324

2425
-- | Assumptions about UTxOs that are needed for coin selection.

lib/integration/scenarios/Test/Integration/Scenario/API/Shared/Transactions.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ import Test.Integration.Framework.Request
213213
( RequestException
214214
)
215215

216-
import qualified Cardano.Address.Script as CA
216+
import qualified Cardano.Address.KeyHash as CA
217217
import qualified Cardano.Address.Style.Shelley as CA
218218
import qualified Cardano.Api as Cardano
219219
import qualified Cardano.Faucet.Mnemonics as Mnemonics

0 commit comments

Comments
 (0)