TY - BOOK
T1 - Context-Dependent Type Error Diagnosis for Functional Languages
AU - Serrano, Alejandro
AU - Hage, J.
PY - 2016/11
Y1 - 2016/11
N2 - Customizable type error diagnosis has been proposed as a solution toachieve domain-specific type error diagnosis for embedded domainspecific languages. A proven approach is to phrase type inferencingas a constraint-solving problem, so that we can manipulate the orderin which constraints are solved, and associate domain-specific typeerror messages with specific constraints to be communicated to theprogrammer in case type checking fails. A major challenge in thisarea lies in scaling this idea up uniformly to a fully-featured (functional)language, that is, languages that go beyond the polymorphicλ-calculus.In this paper, we show how within the general framework ConstraintHandling Rules we can achieve such uniformity and generality,while at the same time providing the necessary type errorcustomizability in a natural way. A proof-of-concept implementationis provided for a Haskell-like language, including support for typeclasses, GADTs and higher-ranked types. However, our approach appliesto any language for which a constraint-based non-backtrackingformulation of the type system is available.
AB - Customizable type error diagnosis has been proposed as a solution toachieve domain-specific type error diagnosis for embedded domainspecific languages. A proven approach is to phrase type inferencingas a constraint-solving problem, so that we can manipulate the orderin which constraints are solved, and associate domain-specific typeerror messages with specific constraints to be communicated to theprogrammer in case type checking fails. A major challenge in thisarea lies in scaling this idea up uniformly to a fully-featured (functional)language, that is, languages that go beyond the polymorphicλ-calculus.In this paper, we show how within the general framework ConstraintHandling Rules we can achieve such uniformity and generality,while at the same time providing the necessary type errorcustomizability in a natural way. A proof-of-concept implementationis provided for a Haskell-like language, including support for typeclasses, GADTs and higher-ranked types. However, our approach appliesto any language for which a constraint-based non-backtrackingformulation of the type system is available.
KW - Constraint Handling Rules
KW - domain specific languages
KW - custom error messages
KW - type errors
M3 - Other report
T3 - Technical Report Series
BT - Context-Dependent Type Error Diagnosis for Functional Languages
PB - Department of Information and Computing Sciences, Utrecht University
ER -