From 8ab22d1daf9b6054dd1d28127706a38c572b2348 Mon Sep 17 00:00:00 2001 From: panne Date: Mon, 12 Jun 2000 11:04:50 +0000 Subject: [PATCH] [project @ 2000-06-12 11:04:50 by panne] Undo the changes and make userStyle printing work again --- ghc/compiler/basicTypes/OccName.lhs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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} %************************************************************************ -- 1.7.10.4