pull from argggh

... when pretty-printing certain structures.  Move generator instantiation outwards to allow pretty-printing to maintain correct indentation prefix for nested structures.