[m-dev.] question about types with no definitions
Julien Fischer
jfischer at opturion.com
Fri Sep 20 11:59:06 AEST 2019
On Fri, 20 Sep 2019, Zoltan Somogyi wrote:
> As we discussed in the last few weeks, I have been working on
> our system of type definitions. In doing so, I found that types
> without definitions are more common than I thought. They occur
> in the standard library not just in modules that the compiler
> considers builtin modules (in that it automatically imports them
> in some circumstances), but in other modules as well, to wit,
> type_desc.m and rtti_implementation.m. The types involved
> (type_desc, pseudo_type_desc, type_ctor_desc, type_info,
> pseudo_type_info and type_ctor_info) all completely lack
> any definitions visible to the Mercury compiler, their implementations
> being completely in foreign code.
There are definitions for type_info etc in rtti_implementation.m;
did you mean the ones in private_builtin?
> I still want to generate error messages for types that
> the source code of a module declares but does not define,
> since this is an error in all but a tiny handful of cases like this
> for implementors, and *all* cases for non-implementors.
Do we not already do such a check in
compiler/check_for_missing_type_defns.m? How is this different?
Julien.
More information about the developers
mailing list