Typeview: A Tool for Understanding Type Errors

Typeview: A Tool for Understanding Type Errors
复制标题

Typeview:理解类型错误的工具

DOI:
--
复制
发表时间:
2000
期刊:
--
影响因子:
--
通讯作者:
F. Huch
F. Huch
中科院分区:
--
文献类型:
--
作者:
A. Simon;O. Chitil;F. Huch

文献摘要

被引文献

相似文献

在现代静态类型函数式语言中,类型推断用于自动确定每个函数的类型。每当此操作失败时,编译器就会发出一条通常非常复杂的错误消息。有时,类型错误消息中提到的表达式并不是错误的表达式。因此,我们实现了一个交互式工具,它允许程序员浏览程序的源代码并查询每个表达式的类型。如果变量不能输入类型,我们希望提供一组可能的类型,用户可以从中判断哪个是错误的。这将有助于找到类型错误的根源,而无需详细了解用户端的类型推断。
In modern statically typed functional languages, type inference is used to determine the type of each function automatically. Whenever this fails, the compiler emits an error message that is often very complex. Sometimes the expression mentioned in the type error message is not the one that is wrong. We therefore implement an interactive tool that allows programmers to browse through the source code of their program and query the types of each expression. If a variable cannot be typed, we would like to present a set of possible types from which the user can decide which is wrong. This should help finding the origin of type errors without detailed knowledge of type inference on the user side.