Improve pretty-printing of splices in HsSyn
[ghc-hetmet.git] / compiler / hsSyn / HsExpr.lhs
index 4721939..5b552c6 100644 (file)
@@ -6,11 +6,11 @@
 HsExpr: Abstract Haskell syntax: expressions
 
 \begin{code}
-{-# OPTIONS_GHC -w #-}
+{-# OPTIONS -w #-}
 -- The above warning supression flag is a temporary kludge.
 -- While working on this module you are encouraged to remove it and fix
 -- any warnings in the module. See
---     http://hackage.haskell.org/trac/ghc/wiki/WorkingConventions#Warnings
+--     http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
 -- for details
 
 module HsExpr where
@@ -875,7 +875,7 @@ instance OutputableBndr id => Outputable (HsSplice id) where
   ppr = pprSplice
 
 pprSplice :: OutputableBndr id => HsSplice id -> SDoc
-pprSplice (HsSplice n e) = char '$' <> brackets (ppr n) <> pprParendExpr e
+pprSplice (HsSplice n e) = char '$' <> ifPprDebug (brackets (ppr n)) <> pprParendExpr e
 
 
 data HsBracket id = ExpBr (LHsExpr id)         -- [|  expr  |]