You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea is to avoid having to add pragmas by hand in the case of asData. Sometimes GHC renames the TH generated pattern synonyms or the functions from the TH generated pattern synonym records and we don't want that. This can be done in this code:
let compl =TH.PragmaD (TH.CompleteP (fmapTH.constructorName cons) Nothing)
.
I've tried to do this but for some reason GHC is fine when defining it manually in Haskell with <PatternName> but the constructor names we have access to in TH are of the form <PatternName>_<number>. Example error:
src/PlutusLedgerApi/V3/Data/Contexts.hs:515:1: error: [GHC-55017]
Illegal variable name: 'TxInfo'
When splicing a TH declaration: {-# INLINABLE TxInfo_0 #-}
|
515 | PlutusTx.asData
The text was updated successfully, but these errors were encountered:
The idea is to avoid having to add pragmas by hand in the case of
asData
. Sometimes GHC renames the TH generated pattern synonyms or the functions from the TH generated pattern synonym records and we don't want that. This can be done in this code:plutus/plutus-tx/src/PlutusTx/AsData.hs
Line 146 in e9b2583
I've tried to do this but for some reason GHC is fine when defining it manually in Haskell with
<PatternName>
but the constructor names we have access to in TH are of the form<PatternName>_<number>
. Example error:The text was updated successfully, but these errors were encountered: