Stream: beginners

Topic: Parsing roc in roc


view this post on Zulip Damian Reeves (May 18 2024 at 15:22):

I'm curious, does roc have any package that allows you to parse roc?

view this post on Zulip Barend Venter (May 18 2024 at 15:49):

Doesn't look like it, the compiler is in Rust. I could perhaps typecheck the expression to see if the issue is with parsing the expression? But looking at :help in the REPL, there doesn't seem to be any equivalent of :t for Roc?

I tried this: four = \_ -> (((((\f -> \x -> f (f x))(\f -> \x -> f (f x))))(\x -> x + 1))(0))

This also overflows the stack, even though it really shouldn't be getting evaluated. Probably a hint that this is a bug?

view this post on Zulip Damian Reeves (May 18 2024 at 15:51):

Oops sorry, didn't mean to ask that question in this thread. I'm new here.

view this post on Zulip Damian Reeves (May 18 2024 at 15:52):

Does roc have any module that allows you to parse roc, I'm interested if I can get an AST or something equivalent to emit my own structure


Last updated: Jul 06 2025 at 12:14 UTC