-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
Description
Currently the IR includes only "use" statements, which are meant to model opaque functions. It'd be nice to replace those with function prototypes. You would give a signature like:
fn foo<...>(T1..Tn) -> Tr;
then you would write:
x = foo<..>(y, z);
and we would instantiate the function signature, add the constraints that all of the types/regions must outlive this point, and create the relevant subtyping relations, all in one step.
One can still model the existing a = use(b) by something like:
fn opaque<A,B>(B) -> A
which would permit
a = opaque<TA, TB>(b)
where TA is the type of a and TB is the type of B.