Haskell Type Constraints Unleashed

Haskell Type Constraints Unleashed
复制标题

释放 Haskell 类型约束

DOI:
--
复制
发表时间:
2010
期刊:
Fuji International Symposium on Functional and Logic Programming
影响因子:
--
通讯作者:
Tom Schrijvers
Tom Schrijvers
中科院分区:
--
文献类型:
--
作者:
Dominic A. Orchard;Tom Schrijvers

文献摘要

被引文献

相似文献

流行的Glasgow Haskell Compiler用几个强大的特性扩展了Haskell 98类型系统,形成了一种表达类型术语的语言。相比之下,对类型的约束受到的关注要少得多,这在类型系统的表达性方面造成了不平衡。在本文中,我们纠正了这种不平衡,将熟悉的类型级结构,同义词和家族转移到约束语言中,在类型级和约束级提供了一组对称的特征。我们介绍了约束同义词和约束族,并举例说明了它们增强的表达能力,以提高Haskell中多态edsl的实用性。我们讨论了新特性相对于现有类型系统特性和类似建议的语义,包括终止的细节。
The popular Glasgow Haskell Compiler extends the Haskell 98 type system with several powerful features, leading to an expressive language of type terms. In contrast, constraints over types have received much less attention, creating an imbalance in the expressivity of the type system. In this paper, we rectify the imbalance, transferring familiar type-level constructs, synonyms and families, to the language of constraints, providing a symmetrical set of features at the type-level and constraint-level. We introduce constraint synonyms and constraint families, and illustrate their increased expressivity for improving the utility of polymorphic EDSLs in Haskell, amongst other examples. We provide a discussion of the semantics of the new features relative to existing type system features and similar proposals, including details of termination.