So the JSON parser has grown to the size where I want to split it up in multiple files.
For instance:
- main.roc
- Parser/
- Core.roc
- Str.roc
- Json.roc
To import Parser.Core
from Parser.Str
, I started writing the following:
interface Parser.Str
exposes []
imports [Parser.Core.{fail, const, alt}]
But this makes Roc search for a non-existent Parser/Parser/Core.roc
file.
And trying to import Core
makes the compiler complain that Parser/Core.roc
is not named Core
. (Actually triggering https://github.com/rtfeldman/roc/issues/3440)
Is there a different syntax I should be using here?
probably just a bug - I bet I know what it is, too
can you open a quick issue for it? Doesn't need steps to reproduce, just mention what you mentioned here
Done! https://github.com/rtfeldman/roc/issues/3451
thanks! I should be able to fix it today
Last updated: Jul 05 2025 at 12:14 UTC