Primitive aliases
This is a proposal for extending the syntax for external primitives, making it easier to re-bind them under a different identifier, without reiterating the entire description (type, attributes, and symbols).
(Thanks to @goldfirere for reviewing this RFC)
This seems useful and, from a distance, seems to be a straightforward change: as long as we have the info that a signature item is a primitive, I don’t see any obstacle to typechecking aliases of it.
From a distance, this looks like a nice proposal that allows avoiding the error-prone duplication of external declarations. In favor!
Thanks for the review so far. I have implemented this and opened PR #13377 against the main OCaml repo.
Have you also considered extending the signature constraint mechanism S with external t = "foo" ? From a distance (I've never used externals), it seems like use-cases for this would appear with your extension ? I can help on that topic if needed.