summaryrefslogtreecommitdiff
path: root/src/GF/Compile/GrammarToCanon.hs
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2006-09-01 15:11:22 +0000
committeraarne <aarne@cs.chalmers.se>2006-09-01 15:11:22 +0000
commit39a31d07d5c70f490c04da0969716b4bd12bb6ae (patch)
tree2ef660f8e34a3dc8cedf9849a2249d59836868d4 /src/GF/Compile/GrammarToCanon.hs
parent04933ef3c9ad381b2d09b7882b4204f6ca53208c (diff)
the Error type; better lexer error reporting
Diffstat (limited to 'src/GF/Compile/GrammarToCanon.hs')
-rw-r--r--src/GF/Compile/GrammarToCanon.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/GF/Compile/GrammarToCanon.hs b/src/GF/Compile/GrammarToCanon.hs
index de6427e82..8ca328032 100644
--- a/src/GF/Compile/GrammarToCanon.hs
+++ b/src/GF/Compile/GrammarToCanon.hs
@@ -194,11 +194,12 @@ redCTerm t = case t of
Vr x -> checkAgain
(liftM G.Arg $ redArgvar x)
(liftM G.LI $ redIdent x) --- for parametrize optimization
- App _ _ -> do -- only constructor applications can remain
+ App _ s -> do -- only constructor applications can remain
(_,c,xx) <- termForm t
xx' <- mapM redCTerm xx
case c of
QC p c -> liftM2 G.Par (redQIdent (p,c)) (return xx')
+ Q (IC "Predef") (IC "error") -> fail $ "error: " ++ stringFromTerm s
_ -> prtBad "expected constructor head instead of" c
Q p c -> liftM G.I (redQIdent (p,c))
QC p c -> liftM2 G.Par (redQIdent (p,c)) (return [])