Compiler-Level Static Checks: Enforcing Safe Functional Dev Patterns
summary
A GHC typechecker plugin enforces concrete rules across a codebase of 600k lines and hundreds of developers, rejecting patterns that caused real incidents. Two plugins are deployed: Domain Checker forbids marking enums as failed without validation, and Sheriff flags unsafe calls (head, show), rejects DB queries lacking index columns, and heuristically detects non‑terminating recursion. Rules live in YAML so teams configure checks per module; the plugins run at compile time and prevent regressions rather than catching them at runtime.
AI-written summary · about
chapters (7)
- 0:00Compiler static checks intro
- 2:17Domain safety in FP
- 6:12Preventing recurring code issues
- 15:20Scalable compiler solutions
- 18:07Compiler plugins enforce rules
- 20:32Domain Checker & Sheriff plugins
- 26:36Q&A
related talks
16mTailored static tooling using Clang: Clazy
20mDeveloping a Monadic Type Checker for an Object-Oriented Language
34mLiquid Haskell: Verification with Refinement Types
25mIncremental Type-Checking for Free: Using Scope Graphs to Derive Incremental Type-Checkers
55mIntroducing Hack
15mPermchecker: A Toolchain for Debugging Memory Managers with Typestate
27muser-defined statically-checked call graph constraints in C++
46mRefinement Types from Light to Deep Verification
