[m-dev.] mini types

Peter Wang novalazy at gmail.com
Mon Jun 1 16:52:33 AEST 2020


On Mon, 01 Jun 2020 16:39:38 +1000 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> 
> I think I see, but lets check. Consider this module:
> 
> :- module A.
> :- interface.
> 
> :- type t4.
> :- implementation.
> 
> :- import_module bool.
> 
> :- type t4
>     --->    t4_f1(bool, bool, bool).
> 
> With my original proposal, the programmer would put a pragma into
> module A to tell the compiler, when generating A.int3, that bool fits
> into one bit, and the compiler would put a type_repn item into
> A.int3 that type t4 fits in six bits on 64 bit machines (three for a ptag
> and three for the bools).
> 
> With your proposal, the programmer would put a pragma module A
> to tell the compiler, when generating A.int3, that t4 fits in six bits,
> and the compiler would then put the same type_repn item into
> A.int3 as above.
> 
> Is my understanding correct?

Yes, that's right.

Peter


More information about the developers mailing list