首页> 外文会议>International Symposium on Trends in Functional Programming >Type Class Instances for Type-Level Lambdas in Haskell
【24h】

Type Class Instances for Type-Level Lambdas in Haskell

机译:Haskell中类型Lambdas的类型实例

获取原文

摘要

Haskell 2010 lacks flexibility in creating instances of type classes for type constructors with multiple type arguments. We would like to make the order of type arguments to a type constructor irrelevant to how type class instances can be specified. None of the currently available techniques in Haskell allows to do this in a satisfactory way. To flexibly create type-class instances we have added the concept of type-level lambdas as anonymous type synonyms to Haskell. As higher-order unification of lambda terms in general is undecidable, we take a conservative approach to equality between type-level lambdas. We propose a number of small changes to the constraint solver that will allow type-level lambdas to be used in type class instances. We show that this satisfies our goal, while having only minor impact on existing Haskell code.
机译:Haskell 2010缺乏灵活性在为具有多种类型参数的类型构造函数创建类型的类别方面的灵活性。我们希望将类型参数的顺序与类型构造函数无关指定如何指定类实例的类型。 Haskell中的目前任何可用的技术都没有允许以满意的方式执行此操作。为了灵活地创建类型类实例,我们已添加类型Lype Lambdas的概念作为匿名类型对Haskell的同义词。随着LABDA术语的高阶统一一般是不可判定的,我们采取保守方法在级别的Lambdas之间的平等。我们为约束求解器提出了许多小型更改,允许在类型类实例中使用类型级Lambdas。我们表明这满足了我们的目标,同时只对现有Haskell代码进行了微小的影响。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号