summaryrefslogtreecommitdiff
path: root/compiler/cmm/CmmLint.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2011-08-23 09:14:46 +0100
committerSimon Marlow <marlowsd@gmail.com>2011-08-25 11:12:31 +0100
commit4efb0abc5b1b3d33036b640f36ed1efcb10e6cd4 (patch)
tree8c49fcc5c8cfe88d76a7f4074d8dc78e3304d5a3 /compiler/cmm/CmmLint.hs
parent190d8e13165bc21411a3357cc685a734a0f36370 (diff)
downloadhaskell-4efb0abc5b1b3d33036b640f36ed1efcb10e6cd4.tar.gz
Renaming only
CmmTop -> CmmDecl CmmPgm -> CmmGroup
Diffstat (limited to 'compiler/cmm/CmmLint.hs')
-rw-r--r--compiler/cmm/CmmLint.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/cmm/CmmLint.hs b/compiler/cmm/CmmLint.hs
index dd47c4433e..8229d33f00 100644
--- a/compiler/cmm/CmmLint.hs
+++ b/compiler/cmm/CmmLint.hs
@@ -31,12 +31,12 @@ import Data.Maybe
-- Exported entry points:
cmmLint :: (Outputable d, Outputable h)
- => Platform -> GenCmmPgm d h (ListGraph CmmStmt) -> Maybe SDoc
-cmmLint platform tops = runCmmLint platform (mapM_ lintCmmTop) tops
+ => Platform -> GenCmmGroup d h (ListGraph CmmStmt) -> Maybe SDoc
+cmmLint platform tops = runCmmLint platform (mapM_ lintCmmDecl) tops
cmmLintTop :: (Outputable d, Outputable h)
- => Platform -> GenCmmTop d h (ListGraph CmmStmt) -> Maybe SDoc
-cmmLintTop platform top = runCmmLint platform lintCmmTop top
+ => Platform -> GenCmmDecl d h (ListGraph CmmStmt) -> Maybe SDoc
+cmmLintTop platform top = runCmmLint platform lintCmmDecl top
runCmmLint :: PlatformOutputable a
=> Platform -> (a -> CmmLint b) -> a -> Maybe SDoc
@@ -48,13 +48,13 @@ runCmmLint platform l p =
nest 2 (pprPlatform platform p)])
Right _ -> Nothing
-lintCmmTop :: (GenCmmTop h i (ListGraph CmmStmt)) -> CmmLint ()
-lintCmmTop (CmmProc _ lbl (ListGraph blocks))
+lintCmmDecl :: (GenCmmDecl h i (ListGraph CmmStmt)) -> CmmLint ()
+lintCmmDecl (CmmProc _ lbl (ListGraph blocks))
= addLintInfo (text "in proc " <> pprCLabel lbl) $
let labels = foldl (\s b -> setInsert (blockId b) s) setEmpty blocks
in mapM_ (lintCmmBlock labels) blocks
-lintCmmTop (CmmData {})
+lintCmmDecl (CmmData {})
= return ()
lintCmmBlock :: BlockSet -> GenBasicBlock CmmStmt -> CmmLint ()