Context-Dependent Type Error Diagnosis for Functional Languages

A. Serrano Mena, J. Hage

    Research output: Book/ReportReportAcademic

    Abstract

    Customizable type error diagnosis has been proposed as a solution to
    achieve domain-specific type error diagnosis for embedded domain
    specific languages. A proven approach is to phrase type inferencing
    as a constraint-solving problem, so that we can manipulate the order
    in which constraints are solved, and associate domain-specific type
    error messages with specific constraints to be communicated to the
    programmer in case type checking fails. A major challenge in this
    area 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 Constraint
    Handling Rules we can achieve such uniformity and generality,
    while at the same time providing the necessary type error
    customizability in a natural way. A proof-of-concept implementation
    is provided for a Haskell-like language, including support for type
    classes, GADTs and higher-ranked types. However, our approach applies
    to any language for which a constraint-based non-backtracking
    formulation of the type system is available.
    Original languageEnglish
    Place of PublicationUtrecht
    PublisherUU BETA ICS Departement Informatica
    Number of pages10
    Publication statusPublished - 2016

    Publication series

    NameTechnical Report Series
    PublisherUU Beta ICS Departement Informatica
    No.UU-CS-2016-011
    ISSN (Print)0924-3275

    Keywords

    • Constraint Handling Rules
    • domain specific languages
    • custom error messages
    • type errors

    Fingerprint

    Dive into the research topics of 'Context-Dependent Type Error Diagnosis for Functional Languages'. Together they form a unique fingerprint.

    Cite this