Decomposable Type Highlighting for Bidirectional Type and Cast System

๐Ÿ“… 2026-07-15
๐Ÿ“ˆ Citations: 0
โœจ Influential: 0
๐Ÿ“„ PDF
๐Ÿค– AI Summary
Debugging static and dynamic type errors is often hindered by the lack of intuitive explanations of type inference and coercion processes. This work proposes a decomposable type highlighting mechanism, integrated for the first time into a bidirectional type system coupled with a dynamic type coercion framework, to interactively visualize type inference paths and dynamic conversion behaviors in real time through a dedicated interface. A prototype implementation in the Hazel language demonstrates the effectiveness of this approach, significantly improving developersโ€™ ability to understand and diagnose mixed-type errors. The proposed method establishes a novel paradigm for type-level debugging, offering enhanced transparency and interactivity in reasoning about type-related program behavior.
๐Ÿ“ Abstract
We explore how to provide programmers with an interactive interface for explaining the process by which static types and dynamic casts are derived, with the goal of improving the debugging of static and dynamic type errors. To this end, we define mathematical foundations for a decomposable highlighting system within a bidirectional system and show how these can be propagated through dynamic types in a cast system. Our prototype implementation in the gradually typed Hazel language includes a web-based user interface, through which we highlight the importance of type-level debugging.
Problem

Research questions and friction points this paper is trying to address.

type debugging
interactive interface
static types
dynamic casts
bidirectional type system
Innovation

Methods, ideas, or system contributions that make the work stand out.

decomposable highlighting
bidirectional type system
dynamic casts
gradual typing
type-level debugging
๐Ÿ”Ž Similar Papers