计算机科学 > 程序设计语言
[提交于 2018年8月17日]
标题:Proving Type Class Laws for Haskell
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Type classes in Haskell are used to implement ad-hoc polymorphism, i.e. a way to ensure both to the programmer and the compiler that a set of functions are defined for a specific data type. All instances of such type classes are expected to behave in a certain way and satisfy laws associated with the respective class. These are however typically just stated in comments and as such, there is no real way to enforce that they hold. In this paper we describe a system which allows the user to write down type class laws which are then automatically instantiated and sent to an inductive theorem prover when declaring a new instance of a type class.
提交历史
来自:Moa Johansson[v1] 2018年8月17日 星期五 08:19:37 UTC