cogent
cogent copied to clipboard
Proposal: Extend Scope of Type Vars in antiquoted typedefs
It seems that in a .ah file in a typedef of the form
typedef b ...$id:(A tp)...
the scope of the type variable $ty:tp
is restricted to the content of b
if b
is a struct, such as in
typedef struct s { $ty:tp m1 }
I propose to extend it to arbitrary base types b
and also to type derivation steps for $id:(A tp)
, such as in
typedef $ty:tp $id:(A tp); // A is a "type marker"
typedef $ty:tp $id:(A tp)[5]; // derived array type
typedef $ty:tp $id:(A tp)($ty:tp arg); // derived function type
Do you think this would be possible?