From: panne Date: Mon, 12 Jun 2000 11:04:50 +0000 (+0000) Subject: [project @ 2000-06-12 11:04:50 by panne] X-Git-Tag: Approximately_9120_patches~4285 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=8ab22d1daf9b6054dd1d28127706a38c572b2348;p=ghc-hetmet.git [project @ 2000-06-12 11:04:50 by panne] Undo the changes and make userStyle printing work again --- diff --git a/ghc/compiler/basicTypes/OccName.lhs b/ghc/compiler/basicTypes/OccName.lhs index 76cbbb0..98eb7c1 100644 --- a/ghc/compiler/basicTypes/OccName.lhs +++ b/ghc/compiler/basicTypes/OccName.lhs @@ -66,7 +66,19 @@ type EncodedString = String -- Encoded form pprEncodedFS :: EncodedFS -> SDoc -pprEncodedFS fs = ptext fs +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 \end{code} %************************************************************************