It is currently possible to redefine built-in types in Rescript, for example:
type string = int
It is fair to assume that there is no real use cases for such piece of code?
Why I am proposing this is that if keep such invariant, some code optimisations should be easy to do, see this: https://github.com/rescript-lang/rescript-compiler/issues/4930
It is easy to accomplish this by just doing a check during the parsing