From 259ed52a77c203229ad693c277cbc6334e8b2f70 Mon Sep 17 00:00:00 2001 From: krangelov Date: Thu, 21 Oct 2021 10:10:04 +0200 Subject: [PATCH] fix the compilation of pre --- src/compiler/GF/Compile/GeneratePMCFG.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/GF/Compile/GeneratePMCFG.hs b/src/compiler/GF/Compile/GeneratePMCFG.hs index f32132f64..af7909acf 100644 --- a/src/compiler/GF/Compile/GeneratePMCFG.hs +++ b/src/compiler/GF/Compile/GeneratePMCFG.hs @@ -134,7 +134,10 @@ str2lin (VSymCat d r rs) = do (r, rs) <- compute r rs return (r*cnt'+r',combine cnt' rs rs') str2lin (VC vs) = fmap concat (mapM str2lin vs) str2lin (VAlts def alts) = do def <- str2lin def - return [SymKP def []] + alts <- forM alts $ \(v,VStrs vs) -> do + lin <- str2lin v + return (lin,[s | VStr s <- vs]) + return [SymKP def alts] str2lin v = do t <- value2term 0 v evalError ("the string:" <+> ppTerm Unqualified 0 t $$ "cannot be evaluated at compile time.")