Designing Walrus: Relational Programming with Rich Types, On-Demand Laziness, and Structured Traces
Programming Languages
2025-10-30 v2
Abstract
We present Walrus, a functional relational programming language embedded in Haskell that extends the miniKanren model with type-polymorphic unification, on-demand laziness, and a range of usability features aimed at practical development. These include use of Haskell Generics for boilerplate reduction, structured debugging traces, and ergonomic support for product types. We describe the design and implementation of Walrus through the lens of our experience developing bidirectional compilers, and reflect on key design decisions and recurring usability challenges encountered in practice.
Keywords
Cite
@article{arxiv.2510.02579,
title = {Designing Walrus: Relational Programming with Rich Types, On-Demand Laziness, and Structured Traces},
author = {Santiago Cuéllar and Naomi Spargo and Jonathan Daugherty and David Darais},
journal= {arXiv preprint arXiv:2510.02579},
year = {2025}
}
Comments
20 pages, miniKanren 2025