summaryrefslogtreecommitdiff
path: root/src/compiler/GFI.hs
diff options
context:
space:
mode:
authoraarne <aarne@chalmers.se>2011-02-25 17:01:10 +0000
committeraarne <aarne@chalmers.se>2011-02-25 17:01:10 +0000
commit445a3aafebe02c415c76392399bdf77a00e680f5 (patch)
treedc8a3350f1dc2ebd90eb35d632273c629f2b97c3 /src/compiler/GFI.hs
parent77b02544fb91a658346f25019cbf2a21b79f9081 (diff)
Predef.error surfaces as error message in compilation and cc command
Diffstat (limited to 'src/compiler/GFI.hs')
-rw-r--r--src/compiler/GFI.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/GFI.hs b/src/compiler/GFI.hs
index 53784ec10..665d843cb 100644
--- a/src/compiler/GFI.hs
+++ b/src/compiler/GFI.hs
@@ -12,7 +12,7 @@ import GF.Grammar hiding (Ident)
import GF.Grammar.Parser (runP, pExp)
import GF.Grammar.ShowTerm
import GF.Compile.Rename
-import GF.Compile.Compute.Concrete (computeConcrete)
+import GF.Compile.Compute.Concrete (computeConcrete,checkPredefError)
import GF.Compile.TypeCheck.Concrete (inferLType)
import GF.Infra.Dependencies
import GF.Infra.CheckM
@@ -124,7 +124,8 @@ loop opts gfenv0 = do
mo <- maybe (Bad "no source grammar in scope") return $ greatestResource gr
((t,_),_) <- runCheck $ do t <- renameSourceTerm gr mo t
inferLType gr [] t
- computeConcrete sgr t
+ t1 <- computeConcrete sgr t
+ checkPredefError sgr t1
case runP pExp (encodeUnicode utf8 s) of
Left (_,msg) -> putStrLn msg