Skip to content

Commit

Permalink
Add COMPLETE pragma for new patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
teodanciu committed May 30, 2023
1 parent f9ff50b commit c7d4ea7
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
19 changes: 19 additions & 0 deletions eras/conway/impl/src/Cardano/Ledger/Conway/TxCert.hs
Expand Up @@ -66,6 +66,11 @@ import Cardano.Ledger.Shelley.TxCert (
encodeShelleyDelegCert,
poolTxCertDecoder,
shelleyTxCertDelegDecoder,
pattern DelegStakeTxCert,
pattern RegPoolTxCert,
pattern RegTxCert,
pattern RetirePoolTxCert,
pattern UnRegTxCert,
)
import Cardano.Ledger.Val (Val (..))
import Control.DeepSeq (NFData)
Expand Down Expand Up @@ -216,6 +221,20 @@ pattern UnRegCommitteeHotTxCert ck <- (getUnRegCommitteeHotTxCert -> Just ck)
where
UnRegCommitteeHotTxCert ck = mkUnRegCommitteeHotTxCert ck

{-# COMPLETE
RegPoolTxCert
, RetirePoolTxCert
, RegTxCert
, UnRegTxCert
, DelegStakeTxCert
, RegDepositTxCert
, UnRegDepositTxCert
, DelegTxCert
, RegDepositDelegTxCert
, RegCommitteeHotTxCert
, UnRegCommitteeHotTxCert
#-}

-- | First type argument is the deposit
data Delegatee c
= DelegStake !(KeyHash 'StakePool c)
Expand Down
10 changes: 10 additions & 0 deletions eras/shelley/impl/src/Cardano/Ledger/Shelley/TxCert.hs
Expand Up @@ -204,6 +204,16 @@ pattern GenesisDelegTxCert genKey genDelegKey vrf <-
GenesisDelegTxCert genKey genDelegKey vrf =
mkGenesisDelegTxCert $ GenesisDelegCert genKey genDelegKey vrf

{-# COMPLETE
RegPoolTxCert
, RetirePoolTxCert
, RegTxCert
, UnRegTxCert
, DelegStakeTxCert
, MirTxCert
, GenesisDelegTxCert
#-}

-- | Genesis key delegation certificate
data GenesisDelegCert c
= GenesisDelegCert
Expand Down

0 comments on commit c7d4ea7

Please sign in to comment.