val x = 12345. Your interpreted language is the language with the primitives defined as
AssignmentTo, interpreted by the function in the fold -- only when you give
AssignmentTothe meaning of being a program, then the mutability shows up.
CompilationUnitas an argument? In this case, what does the
typerphase do? Does it mutate this value and add typing information? Is there any static guarantee that certain phases initialise certain fields?
I see your exmple, but what you did was show that you can interpret an impure language in a pure interpreter. Just because you can use pure programming to write an interpreter to interpret an impure program doesn't make the interpreter impure.
So, in the example, neither the language or the interpreter are impure, at all
Treesubclasses don't show up before or after certain phases.