Stream: contributing

Topic: Finishing the Try builtins (#9596)


view this post on Zulip Dzmitry Misiuk (Jul 17 2026 at 10:42):

List.join aside, the ## Try Builtins section of #9596 is fully open — nine entries. If nobody's on them, I'd like to take the section:

Try.map_both / map_both!    Try.map2 / map2!
Try.on_err   / on_err!      Try.catch / catch!      Try.collapse

All pure Roc with an inline match, mirroring the existing map_ok / map_ok! / map_err / map_err! — no new low-level op. collapse is just catch with identity functions, so those two want to land together.

One note on the signatures: the issue writes map_both : Try(ok1, err1), (ok1 -> ok2), …, but map2 in the same list uses a/b/c, and Builtin.roc doesn't number type variables anywhere. I'd follow the existing convention — map_err : Try(ok, a), (a -> b) -> Try(ok, b) — and write e.g. on_err : Try(ok, a), (a -> Try(ok, b)) -> Try(ok, b). Shout if you'd rather keep the issue's spelling.

Is anyone already on these, and is the whole section one PR, or would you rather have it split?

view this post on Zulip Luke Boswell (Jul 17 2026 at 10:57):

Whole section PR is fine. I dont think anyone has mentioned working on those.

If you wanted to split them across commits that would be nice.

view this post on Zulip Dzmitry Misiuk (Jul 17 2026 at 11:33):

Thanks! One PR, one commit per pair — each ! variant with its sibling.

view this post on Zulip Dzmitry Misiuk (Jul 18 2026 at 06:21):

#10188 is green on all three platforms and marked ready for review. :folded_hands:


Last updated: Jul 23 2026 at 13:15 UTC