Fix debug printing mode for pretty-printed types

Previously, pretty-printing for types would override the
debug mode by bypassing normal printing. Instead, switch
the `pretty-format-type` function to a debug version when
in debug mode.
Fix a printing bug for some type results