Goanna: Resolving Haskell Type Errors With Minimal Correction Subsets

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Fu, Shuai, Dwyer, Tim, Stuckey, Peter J., Grundy, John
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866911883284447232
author Fu, Shuai
Dwyer, Tim
Stuckey, Peter J.
Grundy, John
author_facet Fu, Shuai
Dwyer, Tim
Stuckey, Peter J.
Grundy, John
contents Statically typed languages offer significant advantages, such as bug prevention, enhanced code quality, and reduced maintenance costs. However, these benefits often come at the expense of a steep learning curve and a slower development pace. Haskell, known for its expressive and strict type system, poses challenges for inexperienced programmers in learning and using its type system, especially in debugging type errors. We introduce Goanna, a novel tool that serves as a type checker and an interactive type error debugging tool for Haskell. When encountering type errors, Goanna identifies a comprehensive list of potential causes and resolutions based on the minimum correction subsets (MCS) enumeration. We evaluated Goanna's effectiveness using 86 diverse Haskell programs from online discourse, demonstrating its ability to accurately identify and resolve type errors. Additionally, we present a collection of techniques and heuristics to enhance Goanna's suggestion-based error diagnosis and show their effectiveness from our evaluation.
format Preprint
id arxiv_https___arxiv_org_abs_2405_12697
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Goanna: Resolving Haskell Type Errors With Minimal Correction Subsets
Fu, Shuai
Dwyer, Tim
Stuckey, Peter J.
Grundy, John
Human-Computer Interaction
Programming Languages
Statically typed languages offer significant advantages, such as bug prevention, enhanced code quality, and reduced maintenance costs. However, these benefits often come at the expense of a steep learning curve and a slower development pace. Haskell, known for its expressive and strict type system, poses challenges for inexperienced programmers in learning and using its type system, especially in debugging type errors. We introduce Goanna, a novel tool that serves as a type checker and an interactive type error debugging tool for Haskell. When encountering type errors, Goanna identifies a comprehensive list of potential causes and resolutions based on the minimum correction subsets (MCS) enumeration. We evaluated Goanna's effectiveness using 86 diverse Haskell programs from online discourse, demonstrating its ability to accurately identify and resolve type errors. Additionally, we present a collection of techniques and heuristics to enhance Goanna's suggestion-based error diagnosis and show their effectiveness from our evaluation.
title Goanna: Resolving Haskell Type Errors With Minimal Correction Subsets
topic Human-Computer Interaction
Programming Languages
url https://arxiv.org/abs/2405.12697