Pretty-printing EncodedStrings, next try...
pprEncodedFS :: EncodedFS -> SDoc
pprEncodedFS fs
= getPprStyle $ \ sty ->
- if userStyle sty then
- let
- s = decode (_UNPK_ fs)
- c = head s
- in
- if startsVarSym c || startsConSym c then
- parens (text s)
- else
- text s
- else
- ptext fs
+ if userStyle sty
+ -- ptext (decodeFS fs) would needlessly pack the string again
+ then text (decode (_UNPK_ fs))
+ else ptext fs
\end{code}
%************************************************************************