Improve pretty-printing of splices in HsSyn
[ghc-hetmet.git] / compiler / hsSyn / HsExpr.lhs
index 8830155..5b552c6 100644 (file)
@@ -6,6 +6,13 @@
 HsExpr: Abstract Haskell syntax: expressions
 
 \begin{code}
+{-# 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/Commentary/CodingStyle#Warnings
+-- for details
+
 module HsExpr where
 
 #include "HsVersions.h"
@@ -868,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  |]