you can control which name is assigned to the type once monomorphized, and
provided that this module comes early enough in the topological sort of all your files, you also control where this type abbreviation should be inserted.
This allows you to do stuff like this: https://github.com/hacl-star/hacl-star/blob/main/dist/gcc-compatible/Hacl_Streaming_Types.h where a dedicated H file holds all the type aliases used by other files, with palatable names.
I would like to have the same kind of support in Eurydice, once the upstream Charon fix lands.
Once https://github.com/AeneasVerif/charon/pull/216 lands, we will gain the ability to extract type aliases to eurydice, and use that to guide monomorphization.
Right now, in Low*, if you write a type abbreviation whose body is the application of a generic type to concrete arguments (e.g. https://github.com/hacl-star/hacl-star/blob/main/code/streaming/Hacl.Streaming.MD.fst#L192), then you control two things:
I would like to have the same kind of support in Eurydice, once the upstream Charon fix lands.
This would allow us, for instance, to write in Rust the definition of these types: https://github.com/cryspen/libcrux/blob/lucas/extract-intrinsics/libcrux-ml-kem/c.yaml#L143-L151 in, say,
libcrux_mlkem::types
, and then we could get rid of those.Generally speaking, we could do the same with every other entry of the form
monomorphizations_exact
in config.yml