-pprHsString :: FastString -> SDoc
-pprHsString fs = doubleQuotes (text (foldr showCharLit "" (unpackIntFS fs)))
-
-showCharLit :: Int -> String -> String
-showCharLit c rest
- | c == ord '\"' = "\\\"" ++ rest
- | c == ord '\'' = "\\\'" ++ rest
- | c == ord '\\' = "\\\\" ++ rest
- | c >= 0x20 && c <= 0x7E = chr c : rest
- | c == ord '\a' = "\\a" ++ rest
- | c == ord '\b' = "\\b" ++ rest
- | c == ord '\f' = "\\f" ++ rest
- | c == ord '\n' = "\\n" ++ rest
- | c == ord '\r' = "\\r" ++ rest
- | c == ord '\t' = "\\t" ++ rest
- | c == ord '\v' = "\\v" ++ rest
- | otherwise = ('\\':) $ shows (fromIntegral c :: Word32) $ case rest of
- d:_ | isDigit d -> "\\&" ++ rest
- _ -> rest
-
-#else
+When we print a binder, we often want to print its type too.
+The @OutputableBndr@ class encapsulates this idea.
+
+@BindingSite@ is used to tell the thing that prints binder what
+language construct is binding the identifier. This can be used
+to decide how much info to print.
+
+\begin{code}
+data BindingSite = LambdaBind | CaseBind | LetBind
+
+class Outputable a => OutputableBndr a where
+ pprBndr :: BindingSite -> a -> SDoc
+ pprBndr b x = ppr x
+\end{code}
+
+
+
+%************************************************************************
+%* *
+\subsection{Random printing helpers}
+%* *
+%************************************************************************
+
+\begin{code}