计算机科学 > 程序设计语言
[提交于 2019年5月16日]
标题:First-Class Subtypes
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:First class type equalities, in the form of generalized algebraic data types (GADTs), are commonly found in functional programs. However, first-class representations of other relations between types, such as subtyping, are not yet directly supported in most functional programming languages. We present several encodings of first-class subtypes using existing features of the OCaml language (made more convenient by the proposed modular implicits extension), show that any such encodings are interconvertible, and illustrate the utility of the encodings with several examples.
提交历史
来自:EPTCS[v1] 2019年5月16日 星期四 06:12:14 UTC