diff --git a/lib/src/bulgarian/NumeralBul.gf b/lib/src/bulgarian/NumeralBul.gf index 6f57efcd0..ebd431f8d 100644 --- a/lib/src/bulgarian/NumeralBul.gf +++ b/lib/src/bulgarian/NumeralBul.gf @@ -77,7 +77,11 @@ lin pot3 n = { n = Pl } ; lin pot3plus n m = { - s = \\c,nf => (pot3 (n ** {lock_Sub1000=<>})).s ! NCard (CFMasc Indef NonHuman) ! nf ++ case m.i of {False => []; True => "и"} ++ m.s ! c ! nf ; + s = \\c,nf => case n.n of { + Sg => mkCardOrd100 "хиляда" "хиляден" ! NCard (CFMasc Indef NonHuman) ; + Pl => n.s ! NCard (CFFem Indef) ! nf ++ mkCardOrd100 "хиляди" "хиляден" ! NCard (CFMasc Indef NonHuman) + } + ++ case m.i of {False => []; True => "и"} ++ m.s ! c ! nf ; n = Pl } ; diff --git a/src/GF/Compile/GrammarToGFCC.hs b/src/GF/Compile/GrammarToGFCC.hs index bf854e7ac..a022d4f43 100644 --- a/src/GF/Compile/GrammarToGFCC.hs +++ b/src/GF/Compile/GrammarToGFCC.hs @@ -309,12 +309,16 @@ canon2canon opts abs cg0 = -- flatten record arguments of param constructors p2p (f,j) = case j of - ResParam (Just ps) _ -> - ResParam (Just [(c,concatMap unRec cont) | (c,cont) <- ps]) Nothing + ResParam (Just ps) (Just vs) -> + ResParam (Just [(c,concatMap unRec cont) | (c,cont) <- ps]) (Just (map unrec vs)) _ -> j unRec (bt,x,ty) = case ty of RecType fs -> [ity | (_,typ) <- fs, ity <- unRec (Explicit,identW,typ)] _ -> [(bt,x,ty)] + unrec t = case t of + App f (R fs) -> GM.mkApp (unrec f) [unrec u | (_,(_,u)) <- fs] + _ -> GM.composSafeOp unrec t + ---- trs v = traceD (render (tr v)) v diff --git a/src/GF/Compile/Optimize.hs b/src/GF/Compile/Optimize.hs index ed22cc165..f54d3b012 100644 --- a/src/GF/Compile/Optimize.hs +++ b/src/GF/Compile/Optimize.hs @@ -52,7 +52,7 @@ optimizeModule opts ms m@(name,mi) oopts = opts `addOptions` flagsModule m updateEvalInfo mi (i,info) = do - info' <- evalInfo oopts ms m i info + info' <- evalInfo oopts ms (name,mi) i info return (updateModule mi i info') evalInfo :: Options -> [SourceModule] -> SourceModule -> Ident -> Info -> Err Info