Generic level polymorphic N-ary functions

Research output: Chapter in Book/Report/Conference proceedingConference contribution book

Abstract

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.
LanguageEnglish
Title of host publicationTyDe 2019 - Proceedings of the 4th ACM SIGPLAN International Workshop on Type-Driven Development, co-located with ICFP 2019
EditorsDavid Darais, Jeremy Gibbons
Place of PublicationNew York
Pages14-26
Number of pages13
DOIs
Publication statusPublished - 18 Aug 2019
Event4th ACM SIGPLAN International Workshop on Type-Driven Development - Berlin, Germany
Duration: 18 Aug 201918 Aug 2019
https://icfp19.sigplan.org/home/tyde-2019

Workshop

Workshop4th ACM SIGPLAN International Workshop on Type-Driven Development
Abbreviated titleTyDe'19
CountryGermany
CityBerlin
Period18/08/1918/08/19
Internet address

Fingerprint

Substitution reactions
Mathematical operators

Keywords

  • dependently typed functional type
  • Agda formalization
  • arity-generic programming
  • universe polymorphism

Cite this

Allais, G. (2019). Generic level polymorphic N-ary functions. In D. Darais, & J. Gibbons (Eds.), TyDe 2019 - Proceedings of the 4th ACM SIGPLAN International Workshop on Type-Driven Development, co-located with ICFP 2019 (pp. 14-26). New York. https://doi.org/10.1145/3331554.3342604
Allais, Guillaume. / Generic level polymorphic N-ary functions. TyDe 2019 - Proceedings of the 4th ACM SIGPLAN International Workshop on Type-Driven Development, co-located with ICFP 2019. editor / David Darais ; Jeremy Gibbons. New York, 2019. pp. 14-26
@inproceedings{6ea7bf44fc6446c5a920d86e4e63cdb2,
title = "Generic level polymorphic N-ary functions",
abstract = "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.",
keywords = "dependently typed functional type, Agda formalization, arity-generic programming, universe polymorphism",
author = "Guillaume Allais",
year = "2019",
month = "8",
day = "18",
doi = "10.1145/3331554.3342604",
language = "English",
isbn = "9781450368155",
pages = "14--26",
editor = "David Darais and Jeremy Gibbons",
booktitle = "TyDe 2019 - Proceedings of the 4th ACM SIGPLAN International Workshop on Type-Driven Development, co-located with ICFP 2019",

}

Allais, G 2019, Generic level polymorphic N-ary functions. in D Darais & J Gibbons (eds), TyDe 2019 - Proceedings of the 4th ACM SIGPLAN International Workshop on Type-Driven Development, co-located with ICFP 2019. New York, pp. 14-26, 4th ACM SIGPLAN International Workshop on Type-Driven Development, Berlin, Germany, 18/08/19. https://doi.org/10.1145/3331554.3342604

Generic level polymorphic N-ary functions. / Allais, Guillaume.

TyDe 2019 - Proceedings of the 4th ACM SIGPLAN International Workshop on Type-Driven Development, co-located with ICFP 2019. ed. / David Darais; Jeremy Gibbons. New York, 2019. p. 14-26.

Research output: Chapter in Book/Report/Conference proceedingConference contribution book

TY - GEN

T1 - Generic level polymorphic N-ary functions

AU - Allais, Guillaume

PY - 2019/8/18

Y1 - 2019/8/18

N2 - 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.

AB - 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.

KW - dependently typed functional type

KW - Agda formalization

KW - arity-generic programming

KW - universe polymorphism

UR - https://github.com/gallais/nary

UR - http://www.wikicfp.com/cfp/servlet/event.showcfp?eventid=87160&copyownerid=145423

U2 - 10.1145/3331554.3342604

DO - 10.1145/3331554.3342604

M3 - Conference contribution book

SN - 9781450368155

SP - 14

EP - 26

BT - TyDe 2019 - Proceedings of the 4th ACM SIGPLAN International Workshop on Type-Driven Development, co-located with ICFP 2019

A2 - Darais, David

A2 - Gibbons, Jeremy

CY - New York

ER -

Allais G. Generic level polymorphic N-ary functions. In Darais D, Gibbons J, editors, TyDe 2019 - Proceedings of the 4th ACM SIGPLAN International Workshop on Type-Driven Development, co-located with ICFP 2019. New York. 2019. p. 14-26 https://doi.org/10.1145/3331554.3342604