Stream: beginners

Topic: Testing pure Roc builtins?


view this post on Zulip Qqwy / Marten (Jun 25 2022 at 19:53):

How/where are builtin functions which are implemented in pure Roc (e.g., those containing not only a declaration but a full definition in compiler/builtins/roc/*.roc) tested?

view this post on Zulip Folkert de Vries (Jun 25 2022 at 19:55):

cargo test-gen-llvm

view this post on Zulip Qqwy / Marten (Jun 25 2022 at 20:22):

Follow-up question: I've added some tests, but they keep complaining that the List module (in this case) does not expose the function. But I have added the new function to the exposes list in compiler/builtins/roc/List.roc.

Does it need to be added elsewhere as well for the modules in the standard library?

view this post on Zulip Ayaz Hafiz (Jun 25 2022 at 20:29):

can you see if adding the function name to this list helps? https://github.com/rtfeldman/roc/blob/8e7943eaca0041f5b0a8c770ce2fabeea89e00d9/compiler/module/src/symbol.rs#L1189

view this post on Zulip Qqwy / Marten (Jun 25 2022 at 20:35):

Thank you, that was it


Last updated: Jul 06 2025 at 12:14 UTC