+%************************************************************************
+%* *
+\subsection{Other helper functions}
+%* *
+%************************************************************************
+
+\begin{code}
+printDoc :: Mode -> Handle -> Doc -> IO ()
+printDoc mode hdl doc
+ = fullRender mode 100 1.5 put done doc
+ where
+ put (Chr c) next = hPutChar hdl c >> next
+ put (Str s) next = hPutStr hdl s >> next
+ put (PStr s) next = hPutFS hdl s >> next
+
+ done = hPutChar hdl '\n'
+\end{code}
+
+
+\begin{code}
+interppSP :: Outputable a => PprStyle -> [a] -> Doc
+interppSP sty xs = hsep (map (ppr sty) xs)
+
+interpp'SP :: Outputable a => PprStyle -> [a] -> Doc
+interpp'SP sty xs
+ = hsep (punctuate comma (map (ppr sty) xs))
+\end{code}
+
+
+
+
+%************************************************************************
+%* *
+\subsection{Printing numbers verbally}
+%* *
+%************************************************************************