Monadic Type Systems: Pure Type Systems for Impure Settings (Preliminary Report)

Gilles Barthe, John Hatcliff, Peter Thiemann
1998 Electronical Notes in Theoretical Computer Science  
Pure type systems and computational monads are two parameterized frameworks that have proved to be quite useful in both theoretical and practical applications. We join the foundational concepts of bothof these to obtain monadic type systems. Essentially, monadic type systems inherit the parameterized higher-order type structure of pure type systems and the monadic term and type structure used to capture computational e ects in the theory of computational monads. We demonstrate that monadic type
more » ... e that monadic type systems nicely characterize previous work and suggest how they can support several new theoretical and practical applications. A t e c hnical foundation for monadic type systems is laid by recasting and scaling up the main results from pure type systems (con uence, subject reduction, strong normalisation for particular classes of systems, etc.) and from operational presentations of computational monads (notions of operational equivalence based on applicative similarity, co-induction proof techniques). We demonstrate the use of monadic type systems with case studies of several call-by-value and call-by-name systems. Our framework allows to capture the restriction to value polymorphism in the type structure and is exible enough to accommodate extensions of the type system, e.g., with higher-order polymorphism. The theoretical foundations make monadic type systems well-suited as a typed intermediate language for compilation and specialization of higher-order,
doi:10.1016/s1571-0661(05)80691-7 fatcat:irvqqlqdxnecvf5bfx5r32july