【24h】

Pointwise Generalized Algebraic Data Types

机译:点向广义代数数据类型

获取原文
获取原文并翻译 | 示例

摘要

In the GADT (Generalized Algebraic Data Types) type system, a pattern-matching branch can draw type information from both the scrutinee type and the data constructor type. Even though the type system can handle complex interactions between the two types, most programs require only simple interactions in the form of parametric instantiation and type indexing. To explore the tradeoffs related to GADT patterns, we define the Pointwise GADT type system, which restricts GADTs to the common case of parametric instantiation and type indexing. The Pointwise GADT type system still accepts a wide range of GADT programs, while rejecting a pathological function whose pattern-matching branches can make arbitrarily different assumptions about the type environment. We also state and prove several properties of the type system, which we speculate might be useful in helping researchers design better type inference algorithms.
机译:在GADT(通用代数数据类型)类型系统中,模式匹配分支可以从scrutinee类型和数据构造函数类型中提取类型信息。即使类型系统可以处理两种类型之间的复杂交互,但大多数程序仅需要以参数化实例化和类型索引的形式进行简单的交互。为了探索与GADT模式相关的权衡,我们定义了Pointwise GADT类型系统,该系统将GADT限制为参数化实例化和类型索引的常见情况。 Pointwise GADT类型系统仍然接受广泛的GADT程序,同时拒绝了一种病理函数,其模式匹配分支可以对类型环境做出任意不同的假设。我们还陈述并证明类型系统的几个属性,我们认为这些属性可能有助于帮助研究人员设计更好的类型推断算法。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号