Open lehins opened 2 months ago
We have a few type class based pattern synonyms:
TxCert
NativeScript
All of these cannot have a COMPLETE pragma implemented for them, since ghc-8.10 does not support new syntax with the type. For example that is why we had to reject this RP: https://github.com/IntersectMBO/cardano-ledger/pull/4481/files
COMPLETE
Which tried to add an incorrect pattern:
{-# COMPLETE RequireSignature , RequireAllOf , RequireAnyOf , RequireMOf #-}
since it would disregard timelock's RequireTimeStart and RequireTimeExpire.
RequireTimeStart
RequireTimeExpire
Therefore, the correct way to solve this is to specify COMPELTE pragma for each era:
COMPELTE
{-# COMPLETE RequireSignature , RequireAllOf , RequireAnyOf , RequireMOf :: Shelley #-}
{-# COMPLETE RequireSignature , RequireAllOf , RequireAnyOf , RequireMOf , RequireTimeStart , RequireTimeExpire :: Allegra #-}
etc.
This could be done before we deprecate usage of GHC-8.10 with some CPP
We have a few type class based pattern synonyms:
TxCert
sNativeScript
sAll of these cannot have a
COMPLETE
pragma implemented for them, since ghc-8.10 does not support new syntax with the type. For example that is why we had to reject this RP: https://github.com/IntersectMBO/cardano-ledger/pull/4481/filesWhich tried to add an incorrect pattern:
since it would disregard timelock's
RequireTimeStart
andRequireTimeExpire
.Therefore, the correct way to solve this is to specify
COMPELTE
pragma for each era:etc.