X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FCmmLint.hs;h=4b63346c0bfd127299bb26a4e750b019118ae72f;hb=16dc208aaad7aadaea970e47b8055d7d7f8781e5;hp=7069457a40e6d35e6d57d68256ba11161b21193c;hpb=bb66ce578f2ef5cbeb35de9719f0839a32fbeb35;p=ghc-hetmet.git diff --git a/compiler/cmm/CmmLint.hs b/compiler/cmm/CmmLint.hs index 7069457..4b63346 100644 --- a/compiler/cmm/CmmLint.hs +++ b/compiler/cmm/CmmLint.hs @@ -1,3 +1,10 @@ +{-# 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 + ----------------------------------------------------------------------------- -- -- (c) The University of Glasgow 2004-2006 @@ -25,10 +32,10 @@ import Control.Monad -- ----------------------------------------------------------------------------- -- Exported entry points: -cmmLint :: GenCmm d h CmmStmt -> Maybe SDoc +cmmLint :: GenCmm d h (ListGraph CmmStmt) -> Maybe SDoc cmmLint (Cmm tops) = runCmmLint $ mapM_ lintCmmTop tops -cmmLintTop :: GenCmmTop d h CmmStmt -> Maybe SDoc +cmmLintTop :: GenCmmTop d h (ListGraph CmmStmt) -> Maybe SDoc cmmLintTop top = runCmmLint $ lintCmmTop top runCmmLint :: CmmLint a -> Maybe SDoc @@ -37,7 +44,7 @@ runCmmLint l = Left err -> Just (ptext SLIT("Cmm lint error:") $$ nest 2 err) Right _ -> Nothing -lintCmmTop (CmmProc _ lbl _ blocks) +lintCmmTop (CmmProc _ lbl _ (ListGraph blocks)) = addLintInfo (text "in proc " <> pprCLabel lbl) $ mapM_ lintCmmBlock blocks lintCmmTop _other