Issue 3488

Needs tests.
Needs to fix the pretty printer. (Help appreciated.)