Haskell Type Constraints Unleashed
Haskell Type Constraints Unleashed
复制标题
释放 Haskell 类型约束
DOI:
--
复制
发表时间:
2010
期刊:
影响因子:
--
通讯作者:
Tom Schrijvers
中科院分区:
文献类型:
--
作者:
Dominic A. Orchard;Tom Schrijvers
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.