This document discusses various rules of thumb and general trivia, aiming to make life as a Plutarch user or auditor easier.
Note: If you spot any mistakes/have any related questions that this guide lacks the answer to, please don't hesitate to raise an issue. The goal is to have high quality documentation for Plutarch users!
- Plutarch functions are strict
- Don't duplicate work
- Prefer Plutarch level functions
- When to use Haskell level functions?
- The difference between
PlutusType
/PCon
andPLift
'spconstant
- Let Haskell level functions take responsibility of evaluation
- The isomorphism between
makeIsDataIndexed
, Haskell ADTs, andPIsDataRepr
- Prefer statically building constants whenever possible
- Figuring out the representation of a Plutarch type
- Prefer pattern matching on the result of
pmatch
immediately - Working with bound fields yielded by
pletFields