I've been working on a parser combinator library: file Parser.roc
in ./examples/parser
of the branch jim-parser
. There is are two test files of interest: ParserTest.roc
and ManyTest.roc
. The latter contains test of code that causes a panic, so progress is stalled at the moment.
There are some open PRs to fix some of those problems, but I keep uncovering more
Thanks Folkert, good to know!
Just an FYI: the file examples/parser/ParserTest.roc
in branch jim-parser
panics after the latest merge with trunk
. File is unchanged.
➜ roc git:(jim-parser) cargo run examples/parser/ParserTest.roc
Compiling roc_gen_wasm v0.1.0 (/Users/jxxcarlson/dev/roc/roc/compiler/gen_wasm)
Compiling roc_build v0.1.0 (/Users/jxxcarlson/dev/roc/roc/compiler/build)
Compiling roc_linker v0.1.0 (/Users/jxxcarlson/dev/roc/roc/linker)
Compiling roc_cli v0.1.0 (/Users/jxxcarlson/dev/roc/roc/cli)
Finished dev [unoptimized + debuginfo] target(s) in 21.03s
Running `target/debug/roc examples/parser/ParserTest.roc`
thread 'main' panicked at 'internal error: entered unreachable code: symbol/layout `fx.Effect.map` ProcLayout { arguments: [LambdaSet(LambdaSet { set: [(`fx.Effect.effect_closure_putLine`, [Builtin(Str)])], representation: Struct([Builtin(Str)]) }), LambdaSet(LambdaSet { set: [(`base.Task.6`, [])], representation: Struct([]) })], result: LambdaSet(LambdaSet { set: [(`fx.Effect.effect_map_inner`, [LambdaSet(LambdaSet { set: [(`fx.Effect.effect_closure_putLine`, [Builtin(Str)])], representation: Struct([Builtin(Str)]) }), LambdaSet(LambdaSet { set: [(`base.Task.6`, [])], representation: Struct([]) })])], representation: Struct([LambdaSet(LambdaSet { set: [(`fx.Effect.effect_closure_putLine`, [Builtin(Str)])], representation: Struct([Builtin(Str)]) }), LambdaSet(LambdaSet { set: [(`base.Task.6`, [])], representation: Struct([]) })]) }) } combo must be in DeclarationToIndex', compiler/mono/src/borrow.rs:227:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
^C
do you remember when you ran it last?
September 30 for sure. I haven't changed it in a good while -- am waiting for ManyTest.roc
to pass before I proceed
@Folkert de Vries , good news, doing the below in the jim-parser
branch now succeeds.
cargo run examples/parser/ParserTest.roc
((after merging a few minutes ago with trunk))
nice!
Last updated: Jul 05 2025 at 12:14 UTC