Skip to content

Commit 39b15b8

Browse files
committed
Change function names to avoid clashes between modules
1 parent e2b52b4 commit 39b15b8

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

cardano-wasm/src-lib/Cardano/Wasm/Api/Certificate/StakeCertificate.hs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
module Cardano.Wasm.Api.Certificate.StakeCertificate
1111
( StakeCertificateObject (..)
1212
, createStakeKeyCertificateImpl
13-
, asStakeRegistrationImpl
14-
, asStakeUnregistrationImpl
15-
, asDelegateOnlyImpl
16-
, withDepositImpl
17-
, withoutDepositImpl
18-
, withDelegationImpl
19-
, withoutDelegationImpl
20-
, toCborImpl
13+
, stakeCertAsStakeRegistrationImpl
14+
, stakeCertAsStakeUnregistrationImpl
15+
, stakeCertAsDelegateOnlyImpl
16+
, stakeCertWithDepositImpl
17+
, stakeCertWithoutDepositImpl
18+
, stakeCertWithDelegationImpl
19+
, stakeCertWithoutDelegationImpl
20+
, stakeCertToCborImpl
2121
)
2222
where
2323

@@ -138,46 +138,46 @@ createStakeKeyCertificateImpl skHashStr = do
138138
readHash = rightOrError . Api.deserialiseFromRawBytesHex . Text.encodeUtf8 . Text.pack
139139

140140
-- | Marks the certificate as a stake registration certificate.
141-
asStakeRegistrationImpl :: StakeCertificateObject -> StakeCertificateObject
142-
asStakeRegistrationImpl certObj =
141+
stakeCertAsStakeRegistrationImpl :: StakeCertificateObject -> StakeCertificateObject
142+
stakeCertAsStakeRegistrationImpl certObj =
143143
certObj{action = RegisterStake}
144144

145145
-- | Marks the certificate as a stake un-registration certificate.
146-
asStakeUnregistrationImpl :: StakeCertificateObject -> StakeCertificateObject
147-
asStakeUnregistrationImpl certObj =
146+
stakeCertAsStakeUnregistrationImpl :: StakeCertificateObject -> StakeCertificateObject
147+
stakeCertAsStakeUnregistrationImpl certObj =
148148
certObj{action = UnregisterStake}
149149

150150
-- | Marks the certificate as a delegation-only certificate (not registration nor un-registration).
151-
asDelegateOnlyImpl :: StakeCertificateObject -> StakeCertificateObject
152-
asDelegateOnlyImpl certObj =
151+
stakeCertAsDelegateOnlyImpl :: StakeCertificateObject -> StakeCertificateObject
152+
stakeCertAsDelegateOnlyImpl certObj =
153153
certObj{action = DelegateOnly}
154154

155155
-- | Sets the deposit for the stake certificate. This only has effect for stake registration
156156
-- and unregistration certificates. The amount must match the expected deposit amount specified by
157157
-- 'ppKeyDepositL' in the protocol parameters for registration certificates and the amount
158158
-- depositted for unregistration certificates.
159-
withDepositImpl :: Coin -> StakeCertificateObject -> StakeCertificateObject
160-
withDepositImpl dep certObj =
159+
stakeCertWithDepositImpl :: Coin -> StakeCertificateObject -> StakeCertificateObject
160+
stakeCertWithDepositImpl dep certObj =
161161
certObj{mDeposit = Just dep}
162162

163163
-- | Resets the deposit for the stake certificate.
164-
withoutDepositImpl :: StakeCertificateObject -> StakeCertificateObject
165-
withoutDepositImpl certObj =
164+
stakeCertWithoutDepositImpl :: StakeCertificateObject -> StakeCertificateObject
165+
stakeCertWithoutDepositImpl certObj =
166166
certObj{mDeposit = Nothing}
167167

168168
-- | Sets the pool to which the stake key will be delegated.
169-
withDelegationImpl :: PoolId -> StakeCertificateObject -> StakeCertificateObject
170-
withDelegationImpl poolId certObj =
169+
stakeCertWithDelegationImpl :: PoolId -> StakeCertificateObject -> StakeCertificateObject
170+
stakeCertWithDelegationImpl poolId certObj =
171171
certObj{mDelegatee = Just (DelegStake $ unStakePoolKeyHash poolId)}
172172

173173
-- | Resets the delegation for the stake certificate.
174-
withoutDelegationImpl :: StakeCertificateObject -> StakeCertificateObject
175-
withoutDelegationImpl certObj =
174+
stakeCertWithoutDelegationImpl :: StakeCertificateObject -> StakeCertificateObject
175+
stakeCertWithoutDelegationImpl certObj =
176176
certObj{mDelegatee = Nothing}
177177

178178
-- | Convert a StakeCertificateObject to the base16 encoding of its CBOR representation.
179-
toCborImpl :: MonadThrow m => StakeCertificateObject -> m String
180-
toCborImpl
179+
stakeCertToCborImpl :: MonadThrow m => StakeCertificateObject -> m String
180+
stakeCertToCborImpl
181181
( StakeCertificateObject
182182
{ era
183183
, stakeCredential

0 commit comments

Comments
 (0)