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
TLDR
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
TLDR
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
  • U. Norell
  • Computer Science
    Advanced Functional Programming
  • 2008
TLDR
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
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
TLDR
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
TLDR
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?
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
TLDR
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
  • Conor McBride
  • Computer Science
    Journal of Functional Programming
  • 2002
TLDR
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
TLDR
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.
...
1
2
3
...