1
0
forked from GitHub/gf-core

refactor GF.Infra.CheckM and use the CheckM monad in the renamer as well

This commit is contained in:
krasimir
2009-10-02 22:52:14 +00:00
parent 8e79954861
commit d64419f2f2
5 changed files with 251 additions and 330 deletions

View File

@@ -24,6 +24,7 @@ import GF.Infra.Ident
import GF.Infra.Option
import GF.Infra.Modules
import GF.Infra.UseIO
import GF.Infra.CheckM
import GF.Data.Operations
@@ -205,10 +206,11 @@ compileSourceModule opts env@(k,gr,_) mo@(i,mi) = do
_ -> do
let mos = modules gr
mo2:_ <- putpp " renaming " $ ioeErr $ renameModule mos mo1b
(mo2,warnings) <- putpp " renaming " $ ioeErr $ runCheck (renameModule mos mo1b)
if null warnings then return () else puts warnings $ return ()
intermOut opts DumpRename (ppModule Qualified mo2)
(mo3:_,warnings) <- putpp " type checking" $ ioeErr $ showCheckModule mos mo2
(mo3,warnings) <- putpp " type checking" $ ioeErr $ runCheck (checkModule mos mo2)
if null warnings then return () else puts warnings $ return ()
intermOut opts DumpTypeCheck (ppModule Qualified mo3)