用于检查注释的改进推理
Improved Inference for Checking Annotations
摘要:
我们认为类型推断在Hindley/Milner系统扩展的类型注释和约束,特别侧重于Haskell风格的类型类。我们观察到,标准的推理算法是不完整的嵌套类型注释的存在。为了改善这种情况,我们引入了一个新的推理方案检查类型注释。我们的推理方案也是不完整的一般,但改善了现有的实现,如发现在格拉斯哥哈斯克尔密码(GHC)。对于某些情况(例如Haskell 98),我们的推理方案是完整的。我们的方法已经完全实现为Chameleon系统(Haskell的实验版本)的一部分。
英文摘要:
We consider type inference in the Hindley/Milner system extended with type annotations and constraints with a particular focus on Haskell-style type classes. We observe that standard inference algorithms are incomplete in the presence of nested type annotations. To improve the situation we introduce a novel inference scheme for checking type annotations. Our inference scheme is also incomplete in general but improves over existing implementations as found e.g. in the Glasgow Haskell Compiler (GHC). For certain cases (e.g. Haskell 98) our inference scheme is complete. Our approach has been fully implemented as part of the Chameleon system (experimental version of Haskell).
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。