Stream: beginners

Topic: Debug.toStr


view this post on Zulip Dillon Kearns (Dec 01 2021 at 17:43):

Hey y'all, apologies if I missed this, but is there currently a way to turn arbitrary values into strings in Roc? I was hoping to create a test assertion helper so that (1 |> Expect.equal 2) could give error messages that print the actual vs. expected values.

view this post on Zulip Richard Feldman (Dec 01 2021 at 17:45):

there isn't a way to do that at the moment, although the built-in expect keyword will be able to do this!

view this post on Zulip Dillon Kearns (Dec 01 2021 at 17:46):

Okay, makes sense, thanks for the info!


Last updated: Jul 05 2025 at 12:14 UTC