### Abstract

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.

Language | English |
---|---|

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

Editors | David Darais, Jeremy Gibbons |

Place of Publication | New York |

Pages | 14-26 |

Number of pages | 13 |

DOIs | |

Publication status | Published - 18 Aug 2019 |

Event | 4th ACM SIGPLAN International Workshop on Type-Driven Development - Berlin, Germany Duration: 18 Aug 2019 → 18 Aug 2019 https://icfp19.sigplan.org/home/tyde-2019 |

### Workshop

Workshop | 4th ACM SIGPLAN International Workshop on Type-Driven Development |
---|---|

Abbreviated title | TyDe'19 |

Country | Germany |

City | Berlin |

Period | 18/08/19 → 18/08/19 |

Internet address |

### Fingerprint

### Keywords

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

### Cite this

*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

}

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

Research output: Chapter in Book/Report/Conference proceeding › Conference 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©ownerid=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 -