Results 1 
2 of
2
Compositional Explanation of Types and Algorithmic Debugging of Type Errors
, 2001
"... The type systems of most typed functional programming languages are based on the HindleyMilner type system. A practical problem with these type systems is that it is often hard to understand why a program is not type correct or a function does not have the intended type. We suggest that at the core ..."
Abstract

Cited by 30 (0 self)
 Add to MetaCart
The type systems of most typed functional programming languages are based on the HindleyMilner type system. A practical problem with these type systems is that it is often hard to understand why a program is not type correct or a function does not have the intended type. We suggest that at the core of this problem is the difficulty of explaining why a given expression has a certain type. The type system is not defined compositionally. We propose to explain types using a variant of the HindleyMilner type system that defines a compositional type explanation graph of principal typings. We describe how the programmer understands types by interactive navigation through the explanation graph. Furthermore, the explanation graph can be the foundation for algorithmic debugging of type errors, that is, semiautomatic localisation of the source of a type error without even having to understand the type inference steps. We implemented a prototype of a tool to explore the usefulness of the proposed methods.
ABSTRACT Compositional Explanation of Types and Algorithmic Debugging of Type Errors
"... The type systems of most typed functional programming languages are based on the HindleyMilner type system. A practical problem with these type systems is that it is often hard to understand why a program is not type correct or a function does not have the intended type. We suggest that at the core ..."
Abstract
 Add to MetaCart
(Show Context)
The type systems of most typed functional programming languages are based on the HindleyMilner type system. A practical problem with these type systems is that it is often hard to understand why a program is not type correct or a function does not have the intended type. We suggest that at the core of this problem is the difficulty of explaining why a given expression has a certain type. The type system is not defined compositionally. We propose to explain types using a variant of the HindleyMilner type system that defines a compositional type explanation graph of principal typings. We describe how the programmer understands types by interactive navigation through the explanation graph. Furthermore, the explanation graph can be the foundation for algorithmic debugging of type errors, that is, semiautomatic localisation of the source of a type error without even having to understand the type inference steps. We implemented a prototype of a tool to explore the usefulness of the proposed methods. 1.