计算机科学 > 程序设计语言
[提交于 2021年10月12日]
标题:Generic Level Polymorphic N-ary Functions
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Agda's standard library struggles in various places with n-ary functions and relations. It introduces congruence and substitution operators for functions of arities one and two, and provides users with convenient combinators for manipulating indexed families of arity exactly one. After a careful analysis of the kinds of problems the unifier can easily solve, we design a unifier-friendly representation of n-ary functions. This allows us to write generic programs acting on n-ary functions which automatically reconstruct the representation of their inputs' types by unification. In particular, we can define fully level polymorphic n-ary versions of congruence, substitution and the combinators for indexed families, all requiring minimal user input.
提交历史
来自:Guillaume Allais[v1] 2021年10月12日 星期二 15:54:35 UTC