summaryrefslogtreecommitdiff
path: root/src/GF/Compile.hs
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2009-10-02 22:52:14 +0000
committerkrasimir <krasimir@chalmers.se>2009-10-02 22:52:14 +0000
commitd64419f2f25f0fb5a28bddf198dce6ac26b75296 (patch)
treeff77790b4220eb7644c1661ed94ed96d633261b5 /src/GF/Compile.hs
parent8e799548618318c37760a2e915eb994745574748 (diff)
refactor GF.Infra.CheckM and use the CheckM monad in the renamer as well
Diffstat (limited to 'src/GF/Compile.hs')
-rw-r--r--src/GF/Compile.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/GF/Compile.hs b/src/GF/Compile.hs
index e3bdee456..0b928d430 100644
--- a/src/GF/Compile.hs
+++ b/src/GF/Compile.hs
@@ -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)