Stream: beginners

Topic: tag union docs


view this post on Zulip Georges Boris (Sep 27 2022 at 21:47):

hey folks -

after playing around for a while with the cli-platform and trying to understand the core libs through the current docs, I was curious about the plans for tag unions in documentation.

I understand they're created without pior declaration - therefore they don't belong to any particular module unless it is an opaque type or maybe a type alias to a tag union set? But I also understand it is super valuable to explain them sometimes in the context of a module.

e.g. I got super confused on the Num module docs because we see types like Int *, I32, etc. being used though we can't find them in the docs themselves. Maybe Num is especially tricky?

any thoughts on this?

view this post on Zulip Wolfgang Schuster (Sep 27 2022 at 21:56):

I thought a lot of the numbers are defined in Num.roc, no? I know it was fairly complex, but I though I could find them in there

view this post on Zulip Brendan Hansknecht (Sep 27 2022 at 23:07):

Yeah, they are defined in Num.roc.

view this post on Zulip Brendan Hansknecht (Sep 27 2022 at 23:07):

Maybe not exposed in the docs correctly?

view this post on Zulip Georges Boris (Sep 28 2022 at 00:30):

yeah - I think the docs are not exposing any types at least in the Num module. only functions.

view this post on Zulip Georges Boris (Sep 28 2022 at 00:33):

my curiosity is exactly that - from my current understanding, unless I define a type like an opaque type, then they are considered the same regardless of the module, right? So how could one exposed/document then properly? Or is this aiming at pushing users to only document opaque/aliased types?

view this post on Zulip Brendan Hansknecht (Sep 28 2022 at 01:55):

Sure it is the same as in other modules, but it is defined. I think the fact it is defined means it should appear in documentation. Even if I define the same thing in two different modules, I would expect it to appear in the docs for both. I think it is just that docs are still very much works in progress.


Last updated: Jul 05 2025 at 12:14 UTC