Support for -fwarn-unused-do-bind and -fwarn-wrong-do-bind, as per #3263
[ghc-hetmet.git] / compiler / cprAnalysis / CprAnalyse.lhs
index d772508..f28336b 100644 (file)
@@ -4,13 +4,6 @@
 constructed product result}
 
 \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
-
 #ifndef OLD_STRICTNESS
 module CprAnalyse ( ) where
 
@@ -106,10 +99,10 @@ data AbsVal = Top                -- Not a constructed product
 
 -- For pretty debugging
 instance Outputable AbsVal where
-  ppr Top       = ptext SLIT("Top")
-  ppr (Fun r)   = ptext SLIT("Fun->") <> (parens.ppr) r
-  ppr Tuple     = ptext SLIT("Tuple ")
-  ppr Bot       = ptext SLIT("Bot")
+  ppr Top       = ptext (sLit "Top")
+  ppr (Fun r)   = ptext (sLit "Fun->") <> (parens.ppr) r
+  ppr Tuple     = ptext (sLit "Tuple ")
+  ppr Bot       = ptext (sLit "Bot")
 
 
 -- lub takes the lowest upper bound of two abstract values, standard.
@@ -150,6 +143,7 @@ cprAnalyse dflags binds
         let { binds_plus_cpr = do_prog binds } ;
         endPass dflags "Constructed Product analysis"
                 Opt_D_dump_cpranal binds_plus_cpr
+        return binds_plus_cpr
     }
   where
     do_prog :: [CoreBind] -> [CoreBind]