There is this very interesting Haskell library called Rel8 ( https://github.com/circuithub/rel8 ) which allows you to treat a SQL database essentially as if it were a list comprehension.
It does rely somewhat on higher-kindred types to reduce boilerplate (it allows table schema definitions to be re-used for different contexts) but I think the core idea is very interesting and might be something that could make sense as a relational mapper library in Roc in the future.
Regardless; the presentation about it is very much worthwhile to watch (even if you're not deep into Haskell). It is very approachable and eye-opening as to what kind of abstraction on top of SQL is possible to make a composable type-safe wrapper around it.
Last updated: Jun 16 2026 at 16:19 UTC