• Home
  • Search
  • Compositional explanation of types and algorithmic debugging of type errors
  • Open Access IconOpen Access
  • Cite Icon11
  • https://doi.org/10.1145/507669.507659Copy DOI Icon

Compositional explanation of types and algorithmic debugging of type errors

Show More
  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

The type systems of most typed functional programming languages are based on the Hindley-Milner 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 Hindley-Milner type system that defines a compositional type explanation graph of principal typing. 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, semi-automatic 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.

Similar Papers
  • Research Article
  • Citations41

Monadic encapsulation of effects: a revised approach (extended version)

  • Nov 01, 2001
  • Journal of Functional Programming
  • E Moggi +1
  • Research Article

Let Generalization, Polymorphic Recursion, and Variable Minimization in Boolean-Kinded Type Systems

  • Jan 08, 2026
  • Proceedings of the ACM on Programming Languages
  • Joseph Zullo
  • Research Article
  • Citations3

Relating typability and expressiveness in finite-rank intersection type systems (extended abstract)

  • Sep 01, 1999
  • ACM SIGPLAN Notices
  • Assaf J Kfoury +3
  • Conference Article
  • Citations9

Typing the wild in Erlang

  • Sep 29, 2018
  • Nachiappan Valliappan +1
  • Supplementary Content

Co-Contextual Type Systems: Contextless Deductive Reasoning for Correct Incremental Type Checking

  • Mar 02, 2020
  • TUbilio (Technical University of Darmstadt)
  • Edlira Kuci
  • Research Article
  • Citations31

Programming with binders and indexed data-types

  • Jan 18, 2012
  • ACM SIGPLAN Notices
  • Andrew Cave +1
  • Research Article
  • Citations6

An Unboxed Operational Semantics for ML Polymorphism

  • Jan 01, 1997
  • LISP and Symbolic Computation
  • Atsushi Ohori +1
  • Conference Article
  • Citations6

Haskell-style overloading is NP-hard

  • May 16, 1994
  • D.M Volpano
  • Conference Article
  • Citations82

Tagless staged interpreters for typed languages

  • Sep 17, 2002
  • Emir Pašaliε +2
  • Research Article
  • Citations14

Should ML be Object-Oriented?

  • Jul 01, 2002
  • Formal Aspects of Computing
  • David Macqueen
  • Research Article

Safe typing of functional logic programs with opaque patterns and local bindings

  • Jan 17, 2014
  • Information and Computation
  • Francisco J López-Fraguas +2
  • Conference Article
  • Citations1

Efficient Counter-factual Type Error Debugging

  • Jul 01, 2019
  • Sheng Chen +1
  • Research Article
  • Citations1

An “executable” impredicative semantics for the Ada configuration

  • Mar 01, 1993
  • Formal Aspects of Computing
  • A Bucci +2
  • Research Article
  • Citations19

Relatively complete refinement type system for verification of higher-order non-deterministic programs

  • Dec 27, 2017
  • Proceedings of the ACM on Programming Languages
  • Hiroshi Unno +2
  • Research Article
  • Citations103

A practical soft type system for scheme

  • Jan 01, 1997
  • ACM Transactions on Programming Languages and Systems
  • Andrew K Wright +1
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.