[project @ 2002-12-12 14:35:57 by simonmar]
[ghc-hetmet.git] / ghc / compiler / usageSP / UsageSPLint.lhs
index 6fb6b05..387fb8d 100644 (file)
@@ -9,10 +9,11 @@ September 1998 .. May 1999.
 Keith Wansbrough 1998-09-04..1999-06-25
 
 \begin{code}
-module UsageSPLint ( doLintUSPAnnotsBinds,
+module UsageSPLint ( {- SEE BELOW:  -- KSW 2000-10-13
+                     doLintUSPAnnotsBinds,
                      doLintUSPConstBinds,
                      doLintUSPBinds,
-                     doCheckIfWorseUSP,
+                     doCheckIfWorseUSP, -}
                    ) where
 
 #include "HsVersions.h"
@@ -20,7 +21,7 @@ module UsageSPLint ( doLintUSPAnnotsBinds,
 import UsageSPUtils
 import CoreSyn
 import TypeRep          ( Type(..), TyNote(..) )  -- friend
-import Type             ( UsageAnn(..), isUsgTy, tyUsg )
+import Type             ( )
 import TyCon            ( isAlgTyCon, isPrimTyCon, isSynTyCon, isFunTyCon )
 import Var              ( Var, varType )
 import Id              ( idLBVarInfo )
@@ -29,6 +30,13 @@ import ErrUtils         ( ghcExit )
 import Util             ( zipWithEqual )
 import Bag
 import Outputable
+
+{- ENTIRE FILE COMMENTED OUT FOR NOW  -- KSW 2000-10-13
+
+   This monomorphic version of the analysis is outdated.  I'm
+   currently ripping out the old one and inserting the new one.  For
+   now, I'm simply commenting out this entire file.
+
 \end{code}
 
 ======================================================================
@@ -66,7 +74,7 @@ doCheckIfWorseUSP :: [CoreBind] -> [CoreBind] -> IO ()
 doCheckIfWorseUSP binds binds'
   = case checkIfWorseUSP binds binds' of
       Nothing    -> return ()
-      Just warns -> printErrs warns
+      Just warns -> printDump warns
 \end{code}
 
 ======================================================================
@@ -120,7 +128,7 @@ lintTyUSPAnnotsN fom fex = lintN
                                           do { let thelint = if isFunTyCon tc
                                                              then lintTyUSPAnnots fom fex
                                                              else lintN
-                                             ; mapM thelint tys
+                                             ; mapM_ thelint tys
                                              ; return ()
                                              }
     lintN     (FunTy ty1 ty2)           = do { lintTyUSPAnnots fom fex ty1
@@ -202,9 +210,7 @@ lintTyUSPConst (TyVarTy _)                         = do { return () }
 lintTyUSPConst (AppTy ty1 ty2)                     = do { lintTyUSPConst ty1
                                                         ; lintTyUSPConst ty2
                                                         }
-lintTyUSPConst (TyConApp tc tys)                   = do { mapM lintTyUSPConst tys
-                                                        ; return ()
-                                                        }
+lintTyUSPConst (TyConApp tc tys)                   = mapM_ lintTyUSPConst tys
 lintTyUSPConst (FunTy ty1 ty2)                     = do { lintTyUSPConst ty1
                                                         ; lintTyUSPConst ty2
                                                         }
@@ -419,6 +425,8 @@ runULM m = case (unULintM m) (panic "runULM: no location") of
              (_,errs) -> if isEmptyBag errs
                          then Nothing
                          else Just (vcat (map pprULintErr (bagToList errs)))
+
+END OF ENTIRELY-COMMENTED-OUT FILE   -- KSW 2000-10-13 -}
 \end{code}
 
 ======================================================================