plutus-tx-1.0.0.0: Libraries for Plutus Tx and its prelude
Safe HaskellNone
LanguageHaskell2010

PlutusTx.IsData

Synopsis

Documentation

unstableMakeIsData :: Name -> Q [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.

makeIsDataIndexed :: Name -> [(Name, Int)] -> Q [Dec] Source #

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