1
0
forked from GitHub/gf-core

fix the generation of warnings in CheckGrammar. They are printed even in quiet mode and the prefix "Warning" is added automatically

This commit is contained in:
krasimir
2009-05-20 17:05:58 +00:00
parent 880665ad0f
commit 6de94f5300
5 changed files with 20 additions and 15 deletions

View File

@@ -194,7 +194,7 @@ compileOne opts env@(_,srcgr,_) file = do
compileSourceModule :: Options -> CompileEnv -> SourceModule -> IOE (Int,SourceModule)
compileSourceModule opts env@(k,gr,_) mo@(i,mi) = do
let putp = putPointE Normal opts
let puts = putPointE Quiet opts
putpp = putPointE Verbose opts
mo1 <- ioeErr $ rebuildModule gr mo
@@ -213,7 +213,7 @@ compileSourceModule opts env@(k,gr,_) mo@(i,mi) = do
intermOut opts DumpRename (ppModule Qualified mo2)
(mo3:_,warnings) <- putpp " type checking" $ ioeErr $ showCheckModule mos mo2
if null warnings then return () else putp warnings $ return ()
if null warnings then return () else puts warnings $ return ()
intermOut opts DumpTypeCheck (ppModule Qualified mo3)
(k',mo3r:_) <- putpp " refreshing " $ ioeErr $ refreshModule (k,mos) mo3