Fix CodingStyle#Warnings URLs
[ghc-hetmet.git] / compiler / hsSyn / HsBinds.lhs
index 9e08cf5..a32014f 100644 (file)
@@ -7,6 +7,13 @@
 Datatype for: @BindGroup@, @Bind@, @Sig@, @Bind@.
 
 \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 HsBinds where
 
 #include "HsVersions.h"
@@ -165,7 +172,7 @@ instance OutputableBndr id => Outputable (HsValBinds id) where
 pprValBindsForUser :: (OutputableBndr id1, OutputableBndr id2)
                   => LHsBinds id1 -> [LSig id2] -> SDoc
 pprValBindsForUser binds sigs
-  = vcat (map snd (sort_by_loc decls))
+  = pprDeeperList vcat (map snd (sort_by_loc decls))
   where
 
     decls :: [(SrcSpan, SDoc)]
@@ -177,7 +184,7 @@ pprValBindsForUser binds sigs
 pprLHsBinds :: OutputableBndr id => LHsBinds id -> SDoc
 pprLHsBinds binds 
   | isEmptyLHsBinds binds = empty
-  | otherwise = lbrace <+> vcat (map ppr (bagToList binds)) <+> rbrace
+  | otherwise = lbrace <+> pprDeeperList vcat (map ppr (bagToList binds)) <+> rbrace
 
 ------------
 emptyLocalBinds :: HsLocalBinds a
@@ -242,14 +249,13 @@ ppr_monobind :: OutputableBndr id => HsBind id -> SDoc
 
 ppr_monobind (PatBind { pat_lhs = pat, pat_rhs = grhss })      = pprPatBind pat grhss
 ppr_monobind (VarBind { var_id = var, var_rhs = rhs })         = ppr var <+> equals <+> pprExpr (unLoc rhs)
-ppr_monobind (FunBind { fun_id = fun, 
+ppr_monobind (FunBind { fun_id = fun, fun_infix = inf,
                        fun_matches = matches,
                        fun_tick = tick }) = 
                           (case tick of 
                              Nothing -> empty
                              Just t  -> text "-- tick id = " <> ppr t
-                          ) $$ pprFunBind (unLoc fun) matches
-      -- ToDo: print infix if appropriate
+                          ) $$ pprFunBind (unLoc fun) inf matches
 
 ppr_monobind (AbsBinds { abs_tvs = tyvars, abs_dicts = dictvars, 
                         abs_exports = exports, abs_binds = val_binds })
@@ -292,7 +298,7 @@ data IPBind id
        (LHsExpr id)
 
 instance (OutputableBndr id) => Outputable (HsIPBinds id) where
-  ppr (IPBinds bs ds) = vcat (map ppr bs) 
+  ppr (IPBinds bs ds) = pprDeeperList vcat (map ppr bs) 
                        $$ pprLHsBinds ds
 
 instance (OutputableBndr id) => Outputable (IPBind id) where
@@ -546,3 +552,4 @@ pprPrag :: Outputable id => id -> LPrag -> SDoc
 pprPrag var (L _ (InlinePrag inl))         = ppr inl <+> ppr var
 pprPrag var (L _ (SpecPrag expr ty _ inl)) = pprSpec var ty inl
 \end{code}
+