You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
require having the type name available right away. If the type is unknown, whether because it is defined later in the file, or in an imported module that hasn't yet been processed (e.g. if the modules depend on each other), then this causes an unrecoverable error in the compiler. The issue is that the compiler needs to know where to put the definition, i.e. what qualified name should it give to the word being defined.
It causes issues like a package that only compiles correctly if its modules are imported in a certain order. (This happens right now between mirth.type and mirth.data.)
To fix it, we should defer the resolution of the type name until we must ... or in general, defer the resolution of namespaces until they are needed. If the namespace is still unresolvable by then, it's an actual error.
The text was updated successfully, but these errors were encountered:
typeswitch-dev
changed the title
Type qualified declaration too eager.
Type qualified declaration resolve namespace too eagerly.
Apr 28, 2024
typeswitch-dev
changed the title
Type qualified declaration resolve namespace too eagerly.
Type qualified declarations resolve namespace too eagerly.
Apr 28, 2024
typeswitch-dev
changed the title
Type qualified declarations resolve namespace too eagerly.
Qualified declarations resolve namespace too eagerly.
Apr 28, 2024
Type-qualified declarations, e.g.
require having the type name available right away. If the type is unknown, whether because it is defined later in the file, or in an imported module that hasn't yet been processed (e.g. if the modules depend on each other), then this causes an unrecoverable error in the compiler. The issue is that the compiler needs to know where to put the definition, i.e. what qualified name should it give to the word being defined.
It causes issues like a package that only compiles correctly if its modules are imported in a certain order. (This happens right now between
mirth.type
andmirth.data
.)To fix it, we should defer the resolution of the type name until we must ... or in general, defer the resolution of namespaces until they are needed. If the namespace is still unresolvable by then, it's an actual error.
The text was updated successfully, but these errors were encountered: