plutus-tx-1.40.0.0: Libraries for Plutus Tx and its prelude
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusTx.IsData.TH

Synopsis

Documentation

unstableMakeIsDataNameQ [Dec] Source #

Generate a FromData and a ToData instance for a type. This may not be stable in the face of constructor additions, renamings, etc. Use makeIsDataIndexed if you need stability.

makeIsDataIndexedName → [(Name, Int)] → Q [Dec] Source #

Generate a ToData, 'FromData and a UnsafeFromData instances for a type, using an explicit mapping of constructor names to indices. Use this for types where you need to keep the representation stable.

mkAsDataMatchingFunction Source #

Arguments

Name

The name of the type

→ [Name]

Type variables of the type

Name

The name of the constructor

→ [Type]

Types of the fields

→ [Name]

The names of the fields

Q (Dec, Dec) 

Generate a function that matches on a BuiltinData value and decodes it as a product type.