oneChar :: Char -> Doc
oneChar c = case lookup c simpleEscapes of
              Just r -> text r
              Nothing | mustEscape -> hexEscape c
                      | otherwise  -> char c
    where mustEscape = c < ' ' || c == '\x7f' || c > '\xff'
oneChar :: Char -> Doc
oneChar c = case lookup c simpleEscapes of
              Just r -> text r
              Nothing | mustEscape -> hexEscape c
                      | otherwise  -> char c
    where mustEscape = c < ' ' || c == '\x7f' || c > '\xff'
oneChar c = case lookup c simpleEscapes of
              Just r -> text r
              Nothing | mustEscape -> hexEscape c
                      | otherwise  -> char c
    where mustEscape = c < ' ' || c == '\x7f' || c > '\xff'