Stream: beginners

Topic: abstract syntax tree in Roc


view this post on Zulip Audrey Gao (Feb 21 2023 at 18:20):

Hi, I'm trying to translate from another functional programming language to Roc. Since the codebase of Roc is so big, I am confused about which files I should look into to get a general idea about the datatypes and structure of the AST in Roc.

view this post on Zulip Ayaz Hafiz (Feb 21 2023 at 18:22):

https://github.com/roc-lang/roc/blob/34340de60c052dc1e9f3a3a3b124b8a956edd8bf/crates/compiler/parse/src/ast.rs#L230 is probably the best starting spot

view this post on Zulip Ayaz Hafiz (Feb 21 2023 at 18:23):

and this is the AST for types: https://github.com/roc-lang/roc/blob/34340de60c052dc1e9f3a3a3b124b8a956edd8bf/crates/compiler/parse/src/ast.rs#L590

view this post on Zulip Audrey Gao (Feb 21 2023 at 18:25):

Thanks a lot!

view this post on Zulip Joshua Warner (Feb 21 2023 at 18:25):

I'm trying to translate from another functional programming language to Roc.

@Audrey Gao I'd actually be very interested in helping out in this area. I'm also pretty knowledgeable in this area of roc (the parser/formatter/ast).

view this post on Zulip Anton (Feb 21 2023 at 18:26):

This file may also be useful but it does not conform to the complete roc spec.

view this post on Zulip Martin Stewart (Feb 21 2023 at 19:44):

@Audrey Gao Which language did you have in mind if I may ask?

view this post on Zulip Audrey Gao (Feb 27 2023 at 15:18):

It’s a new language called Hazel, a live functional programming environment that can run incomplete programs (https://hazel.org).

view this post on Zulip Richard Feldman (Feb 27 2023 at 18:06):

oh nice! I think Cyrus mentioned you (although not by name) last time I was talking to him

view this post on Zulip Richard Feldman (Feb 27 2023 at 18:06):

you work with him, right?


Last updated: Jul 05 2025 at 12:14 UTC