cda-group / arc

Programming Language for Continuous Deep Analytics
https://cda-group.github.io/arc/
44 stars 6 forks source link

Support nested extern types #398

Closed segeljakt closed 2 years ago

segeljakt commented 2 years ago

I do not think it is currently possible to have an extern type that has extern type parameters. For example, this MLIR:

!arc.adt<"Vec<!arc.adt<"Vec<i32>">">

Will in the worst case not parse, since the inner quotes are not escaped. In the best case, it will generate this Rust which does not compile:

Vec<!arc.adt<"Vec<i32>">

I think a solution is to separate the type name from the type parameters:

!arc.adt<"Vec", [!arc.adt<"Vec", [i32]>]>

This will make it easier to generate this Rust:

Vec<Vec<i32>>

@frej Is it possible?