Improving Type Error Reporting for Type Classes
Debugging type errors when type inference fails is a challenging problem since there are many different ways to remove the type error, and it’s unclear which way is intended. While numerous approaches have been proposed to more precisely locate the real error causes, most of them don’t deal with popular type system extensions, such as type classes. A second problem is that most approaches don’t provide enough information for removing the type error or do so for a few error causes only.
In this work, we develop an approach called TEC to address both problems. Given an ill-typed expression that may involve type classes, TEC finds comprehensive error causes and generates for each cause an error fix with detailed information for removing the type error. TEC computes all error fixes, ranks them, and iteratively presents the most likely error fix to the user until a fix is accepted. TEC reduces the problem of finding all error fixes to variational typing, which systematically reuses typing results. Our main technical innovation is a variational context reduction algorithm that simplifies type class constraints containing variations. We have evaluated the precision of TEC and the evaluation result demonstrates that it outperforms existing approaches in locating type errors that arise from type class uses.
Tue 10 MayDisplayed time zone: Osaka, Sapporo, Tokyo change
10:30 - 11:45
Session 2FLOPS 2022
Chair(s): William E. Byrd University of Alabama at Birmingham, USA
|FOLD-R++: A Scalable Toolset for Automated Inductive Learning of Default Theories from Mixed Data|
Huaduo Wang University of Texas at Dallas, Gopal Gupta The University of Texas at Dallas
|Improving Type Error Reporting for Type Classes|
Sheng Chen University of Louisiana at Lafayette, Md Rabib Noor UL Lafayette
|System Description: Automated Generation of Control Concepts Annotation Rules Using Inductive Logic Programming|
Basel Shbita Information Sciences Institute, Abha Moitra General Electric Research