[m-dev.] special treatment of undefined type_ctors in foreign_export_enum pragmas

Zoltan Somogyi zoltan.somogyi at runbox.com
Fri Apr 3 08:15:26 AEDT 2026


Normally, if any type_ctor reference in a module refers to an undefined type,
we stop compilation early, before the typecheck pass. We make an exception
for type_ctors in foreign_export_enum_pragmas: if one of *these* is undefined,
we go on with the rest of the compilation.

I am working on a change (recording the error messages for e.g. undefined types
next to the set of undefined type_ctors, with the ultimate aim of ensuring that
we never just stop due to "undefined types" without actually printing the messages
about those types) for which this is inconvenient. I *could* preserve this behavior,
but do not see any point in doing so, since this special treatment buys users
only a tiny bit of convenience, and only once in a blue moon. I therefore propose
ending this special treatment.

Does anyone object? If you do, please register this objection in the next 12 hours
or so, since I would like to work on this then.

Zoltan.


More information about the developers mailing list