I don't think this is written down anywhere, so I wanted to write it down here!
I think we've talked in other threads about how:
however, this is not completely true
really, type-checking our module is only blocked on the other module until we have annotations for its exposed types
one way we can get those is to wait until the other module is done being type-checked
however, it's also true that if the other module happens to have full type annotations (with no _
in them) for every single one of its exposed values, then we don't need to actually type-check that module to be able to annotate its imports - because we can basically just copy/paste the annotations it explicitly wrote down!
obviously the other module still needs to be type-checked eventually in order to confirm that its types agree with one another internally, but that type-checking can be done in parallel with type-checking the module that imports them
so essentially, any module where every exposed value has a type annotation with no _
in it is a "non-global module" in that it doesn't require global type inference in order to have fully-annotated exposed types
this distinction doesn't matter until we're actually doing parallelization, but once we are, I suspect it allows for a good deal more parallelization in practice
actually it might have caching implications too, come to think of it :thinking:
because if I'm one of these non-global modules, and a module I import changes its types...I need to have my type-checking redone, but nobody who imports me does
because my exposed types haven't changed
they're still the same annotations as before
anyway, this seems like something we should definitely try at some point, because it should be cheap to check, and in large code bases it will probably apply to 100% of modules in practice
Especially with the roc format annotate
action, all exposed values should be annotated in healthy codebases
Last updated: Jul 06 2025 at 12:14 UTC