[project @ 2000-06-12 11:04:50 by panne]
authorpanne <unknown>
Mon, 12 Jun 2000 11:04:50 +0000 (11:04 +0000)
committerpanne <unknown>
Mon, 12 Jun 2000 11:04:50 +0000 (11:04 +0000)
Undo the changes and make userStyle printing work again

ghc/compiler/basicTypes/OccName.lhs

index 76cbbb0..98eb7c1 100644 (file)
@@ -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}
 
 %************************************************************************