Stream: ideas

Topic: Tag Unions


view this post on Zulip Qqwy / Marten (Jun 13 2022 at 13:03):

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?)

view this post on Zulip Ayaz Hafiz (Jun 13 2022 at 13:05):

yes! our tag unions are known as "polymorphic variants" in other languages, e.g. OCaml. They are the dual of row polymorphism.

view this post on Zulip Ayaz Hafiz (Jun 13 2022 at 13:06):

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

view this post on Zulip Qqwy / Marten (Jun 13 2022 at 13:07):

Thank you!


Last updated: Jun 16 2026 at 16:19 UTC