# Generic Level Polymorphic N-ary Functions

@inproceedings{Allais2021GenericLP, title={Generic Level Polymorphic N-ary Functions}, author={Guillaume Allais}, year={2021} }

Agda’s standard library struggles in various places with nary 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…

## References

SHOWING 1-10 OF 22 REFERENCES

A new approach to generic functional programming

- Computer SciencePOPL '00
- 2000

A new approach to generic functional programming is described, which allows us to define functions generically for all datatypes expressible in Haskell, to model types by terms of the simply typed λ-calculus augmented by a family of recursion operators.

Arity-generic datatype-generic programming

- Computer SciencePLPV '10
- 2010

This paper defines arity-generic datatype-generic programs by building a framework for Generic Haskell-style generic programming in the dependently-typed programming language Agda 2.0.

Dependently Typed Programming in Agda

- Computer ScienceAdvanced Functional Programming
- 2008

The rest of these notes are structured as follows: Section 2 introduces the dependently typed language Agda and its basic features, and Section 3 explains a couple of programming techniques made possible by the introduction of dependent types.

Proofs for free Parametricity for dependent types JEAN -P HILIPPE B ERNARDY and P ATRIK J ANSSON

- Mathematics
- 2012

Reynolds’ abstraction theorem (Reynolds, J. C. (1983) Types, abstraction and parametric polymorphism, Inf. Process. 83(1), 513–523) shows how a typing judgement in System F can be translated into a…

Higher-Order Dynamic Pattern Unification for Dependent Types and Records

- Computer ScienceTLCA
- 2011

A constraint-based unification algorithm for λΠΣ-calculus which solves a richer class of patterns than currently possible; in particular it takes into account type isomorphisms to translate unification problems containing Σ-types into problems only involving Π-types.

Towards Certified Meta-Programming with Typed Template-Coq

- Computer ScienceITP
- 2018

This work generalizes Template-Coq to handle the entire Calculus of Inductive Constructions (CIC), as implemented by Coq, including the kernel's declaration structures for definitions and inductives, and implement a monad for general manipulation of Coq's logical environment.

Do we need dependent types?

- Computer ScienceJournal of Functional Programming
- 2000

This pearl is about some functions whose definitions seem to require a language with dependent types. We describe a technique for defining them in Haskell or ML, which are languages without dependent…

Functional un|unparsing

- Computer ScienceHigh. Order Symb. Comput.
- 2011

On one hand, the solutions show how the Hindley-Milner type system, unextended, permits accessing heterogeneous sequences with the static assurance of type safety, and on the other hand the use of control operators is demonstrated.

Faking it Simulating dependent types in Haskell

- Computer ScienceJournal of Functional Programming
- 2002

This paper may simulate some aspects of dependent typing by making counterfeit type-level copies of data, with type constructors simulating data constructors and type classes simulating datatypes.

Applicative programming with effects

- Computer ScienceJ. Funct. Program.
- 2008

An abstract characterisation of an applicative style of effectful programming, weaker than Monads and hence more widespread, is introduced and a bracket notation is introduced that interprets the normal application syntax in the idiom of an Applicative functor.