Refined typing to localize the impact of forced strictness on free theorems

Daniel Seidel, Janis Voigtländer
2011 Acta Informatica  
Free theorems establish interesting properties of parametrically polymorphic functions, solely from their types, and serve as a nice proof tool. For pure and lazy functional programming languages, they can be used with very few preconditions. Unfortunately, in the presence of selective strictness, as provided in languages like Haskell, their original strength is reduced. In this paper we present an approach for overcoming this weakness in specific situations. Employing a refined type system
more » ... h tracks the use of enforced strict evaluation, we rule out unnecessary restrictions that otherwise emerge. Additionally, we provide (and implement) an algorithm determining all refined types for a given term.
doi:10.1007/s00236-011-0136-9 fatcat:57kf6rwho5eyvdope4govtr2ta