Intensional Functions
summary
Adds a language feature that makes runtime closures visible: functions carry a definition-site ID and an environment and offer three destructors — application, identify, and inspect — enabling conservative equality, comparison, hashing, and serialization without manual defunctionalization. Implements a lambda calculus and proves soundness via an encoding to an extensional GADT language, establishes closure consistency, and ships a GHC 9.2.2 proof-of-concept that works but is slower because the GADTs encoding prevents common inlinings.
AI-written summary · about
