In the new compiler, is there any way to define a Type module, who's nominal type depends on another type, also defined within that module file?
IE:
## ModuleType.roc
ModuleType := {
field : InternalType,
}.{
InternalType := [Some, Other]
}
I'd expect this to work if you put the other type at the top level too
although I can't think of a reason why this couldn't be allowed as-is :thinking:
can you open an issue for that?
Currently doesn't work either way. Shall I open a single issue for both?
sure, thanks!
oh also I think it might work better on current main (not sure if you were on an older version?) - anyway here is a PR improving things! https://github.com/roc-lang/roc/pull/9490
(I don't think we need an issue after all haha)
thanks for reporting it!
Oh, haha! Already filed the issue! :sweat_smile:
Last updated: Jun 16 2026 at 16:19 UTC