Practical Generic Programming over a Universe of Native Datatypes
summary
Library for Agda implements a universe-of-descriptions approach and exposes regular Agda functions that specialize to native datatypes with a one-liner specialization. It provides a terminating, computable generic eliminator, derived decidable equality and proofs that distinct constructors differ, all built without reflection except a single encoding macro (no reflection except encoding macro). Implementation uses conversion functions and an accessibility predicate to satisfy Agda’s termination checker. Limitations: no nested, mutually recursive, or induction-recursion datatypes yet; artifacts available.
AI-written summary · about
