Have you considered modifying the generic function `show`to take a stream to print to instead of returning strings?