Plinth: A Plugin-Powered Language Built on Haskell (Experience Report)
summary
Plinth is a production DSL that reuses a subset of Haskell syntax, compiles via a GHC plugin into PIR → typed Plutus Core (System Fω with iso-recursive types) → UPLC, and has run on Cardano since 2021. Compilation and lifting happen inside GHC; the runtime is a performance-tuned CK machine implemented in Haskell with an Agda spec. It delivers deterministic offchain-to-onchain execution, but demands deep GHC integration and sacrifices Haskell laziness.
AI-written summary · about
chapters (12)
- 0:00Plinth introduction
- 3:12Plinth as Haskell subset
- 7:48Advantages and drawbacks of EDSLs
- 10:03Haskell subset choice
- 12:10GHC plugin compiler
- 15:47Standalone vs GHC plugin
- 17:53Plinth runtime and CK
- 21:04Runtime predictability
- 23:15Haskell performance for blockchain
- 24:40Future work
- 26:46Plinth unique aspects
- 27:08Conclusion
related talks
28mFrom Lambda to Ledger: An Architectural Comparison of Plinth and Plutarch
45mDeveloping DSLs with FP: Exploring 3 Strategies Through Examples
25mFree without Pure: eDSL framework Plutarch
45mFunctional Smart Contracts
45mMarlowe: financial contracts on Blockchain
45mAPLicative Programming with Naperian Functors
41mThe Dialectics of Type-Level Programming
54mQ & A Session With Functional Conf Speakers
