migrate pretty printer use to src-gen