Interactive visualization of type class resolution is feasible and with few interactions facilitates localization. This chapter presents Argus; a tool to facilitate interactive exploration of trait resolution in Rust. Argus does not provide error diagnostics in the traditional sense, but features that satisfy our criteria for a good diagnostic: access to the root cause of a trait error, and its full provenance. The interactive interface facilitates exploring an error in the way a static compiler diagnostic cannot.
In
Reinterpreting diagnostics as an interface problem introduces the challenges and drawbacks of visualizing large data. Not only does Argus provide an exploratory interface of proof trees, but also a set of simple heuristics to suggest developers where to start in the debugging process. The Rust community has created a set of confusing trait errors, and for 80% of tests developers using Argus will encounter the root cause within 20 cognitive steps. This chapter outlines our design and development of Argus and how a generalized tool of this nature could benefit all languages with class—type class.