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.
https://github.com/roc-lang/roc/blob/34340de60c052dc1e9f3a3a3b124b8a956edd8bf/crates/compiler/parse/src/ast.rs#L230 is probably the best starting spot
and this is the AST for types: https://github.com/roc-lang/roc/blob/34340de60c052dc1e9f3a3a3b124b8a956edd8bf/crates/compiler/parse/src/ast.rs#L590
Thanks a lot!
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).
This file may also be useful but it does not conform to the complete roc spec.
@Audrey Gao Which language did you have in mind if I may ask?
It’s a new language called Hazel, a live functional programming environment that can run incomplete programs (https://hazel.org).
oh nice! I think Cyrus mentioned you (although not by name) last time I was talking to him
you work with him, right?
Last updated: Jul 05 2025 at 12:14 UTC