[m-dev.] discussion about the implementation of compact type representations

Julien Fischer jfischer at opturion.com
Tue Oct 31 11:38:21 AEDT 2017


On Tue, 31 Oct 2017, Zoltan Somogyi wrote:

>> > - Specifying a reserve tag pragma for them should be an error.
>> Never used reserved tags myself.
> They were added for HAL and then for G12. Does G12 still use them?
> Julien?

G12 has *never* used them.  (HAL did, but that's no longer an issue.)
I would be quite happy to get rid of them.

>> > - Specifying a foreign_type tag pragma for them should be an error.
>> A small number of types in the standard library will need to be
>> trivially changed (io.file_id, dir.stream, etc.).
>> User code should be less likely to be broken by this change.
> If a type has a foreign_type pragma specified for it on *all* backends,
> then the language reference manual allows the programmer to omit
> giving a Mercury definition at all.
> If there are backends on which these types do *not* have a foreign type,
> then we should fix that omission, since a dummy Mercury type clearly
> won't work for them.

See my response you original post; to my mind there is a reasonable
use case for such types (i.e. where you have code that only has
to be functional for some target languages but compile in all of them.)


More information about the developers mailing list