You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider borrowing the idea of how variables are treated from GHC. A variable is record of a string (what the user wrote) that doesn't really carry any meaning and a unique identifier that is the sole identification of the variable. When fresh variables are created from old variables they simply get a new unique identifier but keep their string, so the user (or compiler developer) can figure out that meanVal274 is somehow related to the mean value variable inside the now inlined mean-value function.
General pretty printing would just print meanVal and let the user read the program with the scoping rules in mind. Debug pretty printing would print meanVal_274 or similar. The compiler would identify the variable by its unique, in this case 274.
This scheme allows you to use option 3 with an even nicer name without the drawback of uniqueness problems.
This could be used in the back end to identify the saved value (e.g. used as the variable name).
The text was updated successfully, but these errors were encountered: