Show existential types as $a and name their constructor
Why
An existential type of a GADT constructor is an abstract type named $Any_'a internally, and that name was printed as is in errors and hover. It is now printed $a, as in OCaml 5, and the escape error says which constructor binds it instead of calling it a type constructor.
modifiedDiagnostic existential escape
type rec any = Any('a): any let get = (Any(x)) => x
diagnostic
Review
- Why decode the name instead of recording the constructor? The name already holds both parts, so printing needs no table that would have to be reset between compilations in one process.