arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1502.04772cs.PL
收藏

轻型子结构类型的类型类

Type Classes for Lightweight Substructural Types

Edward Gan, Jesse A. Tov, Greg Morrisett

摘要:

线性和子结构类型是强大的工具,但是将它们添加到标准函数式程序设计语言中通常意味着引入额外的注释和类型机制。我们提出了一个轻量级的子结构类型系统的设计,重铸的结构规则的削弱和收缩类型类,我们证明了这种设计的原型语言,钳。Clamp支持多态子结构类型以及可变引用的表达系统。与此同时,它几乎没有增加额外的开销到一个标准的Damas-Hindley-Milner类型系统中,该系统使用了丰富的类型类。我们为核心模型建立了类型安全机制,并在Haskell中实现了一个具有类型推断的类型检查器。

英文摘要:

Linear and substructural types are powerful tools, but adding them to standard functional programming languages often means introducing extra annotations and typing machinery. We propose a lightweight substructural type system design that recasts the structural rules of weakening and contraction as type classes; we demonstrate this design in a prototype language, Clamp. Clamp supports polymorphic substructural types as well as an expressive system of mutable references. At the same time, it adds little additional overhead to a standard Damas-Hindley-Milner type system enriched with type classes. We have established type safety for the core model and implemented a type checker with type inference in Haskell.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑