projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a warning for tabs in source files
[ghc-hetmet.git]
/
compiler
/
cmm
/
CmmParse.y
diff --git
a/compiler/cmm/CmmParse.y
b/compiler/cmm/CmmParse.y
index
20edd51
..
8679ff2
100644
(file)
--- a/
compiler/cmm/CmmParse.y
+++ b/
compiler/cmm/CmmParse.y
@@
-46,8
+46,9
@@
import Panic
import Constants
import Outputable
import Constants
import Outputable
-import Control.Monad ( when )
+import Control.Monad
import Data.Char ( ord )
import Data.Char ( ord )
+import System.Exit
#include "HsVersions.h"
}
#include "HsVersions.h"
}
@@
-918,9
+919,12
@@
parseCmmFile dflags filename = do
-- in there we don't want.
case unP cmmParse init_state of
PFailed span err -> do printError span err; return Nothing
-- in there we don't want.
case unP cmmParse init_state of
PFailed span err -> do printError span err; return Nothing
- POk _ code -> do
+ POk pst code -> do
cmm <- initC dflags no_module (getCmm (unEC code initEnv [] >> return ()))
cmm <- initC dflags no_module (getCmm (unEC code initEnv [] >> return ()))
- dumpIfSet_dyn dflags Opt_D_dump_cmm "Cmm" (pprCmms [cmm])
+ let ms = getMessages pst
+ printErrorsAndWarnings dflags ms
+ when (errorsFound dflags ms) $ exitWith (ExitFailure 1)
+ dumpIfSet_dyn dflags Opt_D_dump_cmm "Cmm" (pprCmms [cmm])
return (Just cmm)
where
no_module = panic "parseCmmFile: no module"
return (Just cmm)
where
no_module = panic "parseCmmFile: no module"