Parametricity

Types are documentation

Credit goes to Tony Morris

Fast and loose reasoning is morally correct

Danielsson, Hughes, Jansson & Gibbons [DHJG06]


Functional programmers often reason about programs as if they were written in a total language, expecting the results to carry over to non-total (partial) languages. We justify such reasoning.

 
 

Theorems for Free!

Philip Wadler [Wad89]

 

Write down the definition of a polymorphic function on a piece of paper. Tell me its type, but be careful not to let me see the function’s definition. I will tell you a theorem that the function satisfies. The purpose of this paper is to explain the trick.

 
Made with Slides.com