toHuman - xarvh/squarepants GitHub Wiki
Problem: Debug.toHuman/Debug.log output is, ironically, unfit for human consumption.
The two functions are meant to be used only when debugging, so they don't need to be super consistent/reliable... But they need to be easy to use and have a readable, meaningful and possibly cut&pasteable output.
Implementation
-
It needs to take a value and produce a FA.Expression, then feed that to the formatter.
-
In order to properly display values, the two functions must access the Modulesfile.
-
For consistency and simplicity, it's probably better that they use the main project's Modulesfile.
-
-> This will create problems with distinguishing two values from two different libraries that have similar names.
-
It needs to be able to check UMR aliases and USR globals.
-
-
Probably needs to be done by MakeEmittable?
-
Until we have monomorphization, the generation function should complain if the type is not complete