A ``lint'' pass to check for Core correctness
\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 CoreLint (
lintCoreBindings,
lintUnfolding,
import StaticFlags
import DynFlags
import Outputable
-
-#ifdef DEBUG
-import Util ( notNull )
-#endif
-
+import Util
import Data.Maybe
\end{code}
else lintAndScopeId var
; scope $ \_ ->
do { -- Check the alternatives
- checkCaseAlts e scrut_ty alts
- ; mapM (lintCoreAlt scrut_ty alt_ty) alts
+ mapM (lintCoreAlt scrut_ty alt_ty) alts
+ ; checkCaseAlts e scrut_ty alts
; return alt_ty } }
where
pass_var f = f var