but why would that make printing impossible?
it’s perfectly feasible. I did a compiler variant that captured the type
info needed just for printing and injected it into the parsetree for such printing at runtime. then it turned out that the same could be achieved with a compiler plugin but plugin support was dropped from 4.0.9 so I didn’t release it.
then it became apparent to me that .cmt files could be used to
extract the type info and there is a release at GitHub - progman1/genprintlib: general value printing within compiled programs.
the downside is that it needs help finding .cmt locations via env variable setting and a ppx extension to hide the runtime lookup.
…and it only works in compiled code, not as an interpreted toplevel phrase.
so a really ugly, unappealing compromise!
that would handle most of the cases that I care about for debugging
it seems to me that such a lightweight debugging tool is a good rationale for inclusion in the compiler. my variant does it with zero slow down.
it seems incredible now but I looked for this in ML 30 years ago. what other language (high level) compiler doesn’t have this!
your mentioning '_a syntax for monomorphism has been a reminder that I can use to go back and simplify my implementation. thanks!