summaryrefslogtreecommitdiff
path: root/src/GF/Compile/GrammarToGFCC.hs
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-08-14 20:25:52 +0000
committeraarne <aarne@cs.chalmers.se>2008-08-14 20:25:52 +0000
commit0ce04f1a6e0237c3282be737ba2f2069e318100e (patch)
tree08d68c3484b567b5914e04702558c9af3675e86a /src/GF/Compile/GrammarToGFCC.hs
parentbf7ec18141492e8c1e8fbf171e87e8e98d501f10 (diff)
forgiving names in concrete that are not in abstract, with a warning (no warning guaranteed if this is because restricted inheritance)
Diffstat (limited to 'src/GF/Compile/GrammarToGFCC.hs')
-rw-r--r--src/GF/Compile/GrammarToGFCC.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/GF/Compile/GrammarToGFCC.hs b/src/GF/Compile/GrammarToGFCC.hs
index 2b4156bec..eee95f157 100644
--- a/src/GF/Compile/GrammarToGFCC.hs
+++ b/src/GF/Compile/GrammarToGFCC.hs
@@ -103,7 +103,9 @@ canon2gfcc opts pars cgr@(M.MGrammar ((a,M.ModMod abm):cms)) =
---- then (trace "decode" D.convertStringsInTerm decodeUTF8) else id
umkTerm = utf . mkTerm
lins = Map.fromAscList
- [(i2i f, umkTerm tr) | (f,CncFun _ (Yes tr) _) <- js]
+ [(f', umkTerm tr) | (f,CncFun _ (Yes tr) _) <- js,
+ let f' = i2i f, exists f'] -- eliminating lins without fun
+ -- needed even here because of restricted inheritance
lincats = Map.fromAscList
[(i2i c, mkCType ty) | (c,CncCat (Yes ty) _ _) <- js]
lindefs = Map.fromAscList
@@ -115,6 +117,8 @@ canon2gfcc opts pars cgr@(M.MGrammar ((a,M.ModMod abm):cms)) =
[(i2i c, pars lang0 c) | (c,CncCat (Yes ty) _ _) <- js]
fcfg = Nothing
+ exists f = Map.member f funs
+
i2i :: Ident -> CId
i2i = CId . ident2bs