π Oh joy, another riveting dissertation on type checkers! Because who doesn't love equational reasoning and fold fusion in their bedtime reading? π€ Let's all gather 'round for a thrilling tale of algebraic approaches and constraint-based soliloquies that absolutely no one asked for. π
https://bahr.io/pubs/entries/calctyper.html #typeCheckers #equationalReasoning #foldFusion #algebraicApproaches #constraintBased #HackerNews #ngated
https://bahr.io/pubs/entries/calctyper.html #typeCheckers #equationalReasoning #foldFusion #algebraicApproaches #constraintBased #HackerNews #ngated
Patrick Bahr - The Calculated Typer
We present a calculational approach to the design of type checkers, showing how they can be derived from behavioural specifications using equational reasoning. In addition, we show how the calculations can be simplified by taking an algebraic approach based on fold fusion, and further improved by taking a constraint-based approach to solving and composing fusion preconditions. We illustrate our methodology with three examples of increasing complexity, starting with a simple expression language, then adding support for exceptions, and finally considering a version of the lambda calculus.