arXiv · 2607.24678
All for one and none forall: Compiling polymorphic relations without monomorphization
Abstract
We present a new approach for implementing polymorphism for bottom-up relational languages that avoids monomorphization. We begin by introducing semiringKanren, a bottom-up weighted relational programming language. We extend this base language to support polymorphism. We describe a new method to compile polymorphic semiringKanren programs into non-polymorphic ones, based on equality patterns and large-enough instances of polymorphic relations. We explain the correctness of this method. Finally, we consider existing work and suggest directions for future research.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Dmitri Volkov, Yafei Yang, Chung-Chieh Shan. 2026-07-27. All for one and none forall: Compiling polymorphic relations without monomorphization. https://arxiv.org/abs/2607.24678
Cite the original work for its findings. Save a collection to share your selection of sources.