Hi all!
I think the tag union idea that Roc uses is very interesting.
Are there papers or other kinds of resources that introduce this kind of typing? (and/or compare it with more traditional type systems?)
yes! our tag unions are known as "polymorphic variants" in other languages, e.g. OCaml. They are the dual of row polymorphism.
https://www.cl.cam.ac.uk/teaching/1415/L28/rows.pdf and https://caml.inria.fr/pub/papers/garrigue-polymorphic_variants-ml98.pdf are good introductions to this kind of typing
Thank you!
Last updated: Jun 16 2026 at 16:19 UTC