From a77815e35a4fea1ba5ad5c0613706f7bef835aef Mon Sep 17 00:00:00 2001 From: krasimir Date: Sun, 20 Jun 2010 08:30:00 +0000 Subject: [PATCH] removed debugging code in GeneratePMCFG.hs --- src/compiler/GF/Compile/GeneratePMCFG.hs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/compiler/GF/Compile/GeneratePMCFG.hs b/src/compiler/GF/Compile/GeneratePMCFG.hs index b0f566cea..3e5249af5 100644 --- a/src/compiler/GF/Compile/GeneratePMCFG.hs +++ b/src/compiler/GF/Compile/GeneratePMCFG.hs @@ -129,7 +129,7 @@ convertRule gr opts grammarEnv (PFRule fun args res ctypes ctype term) = do return $! grammarEnv2 where addRule lins (newCat', newArgs') env0 = - let [newCat] = getFCatsX env0 newCat' + let [newCat] = getFCats env0 newCat' (env1, newArgs) = List.mapAccumL (\env -> addFCoercion env . getFCats env) env0 newArgs' (env2,funid) = addCncFun env1 (PGF.Data.CncFun (i2i fun) (mkArray lins)) @@ -590,17 +590,6 @@ getFCats (GrammarEnv last_id catSet seqSet funSet crcSet prodSet) (PFCat n cat s variants (CPar (m,values)) = do (value,index) <- member values return (m*index) -getFCatsX :: GrammarEnv -> ProtoFCat -> [FId] -getFCatsX (GrammarEnv last_id catSet seqSet funSet crcSet prodSet) (PFCat n cat schema) = - case IntMap.lookup n catSet >>= Map.lookup cat of - Just (start,end,_) -> reverse (solutions (fmap (start +) $ variants schema) ()) - where - variants (CRec rs) = fmap sum $ mapM (\(lbl,Identity t) -> variants t) rs - variants (CTbl _ cs) = fmap sum $ mapM (\(trm,Identity t) -> variants t) cs - variants (CStr _) = return 0 - variants (CPar (m,values)) = do (value,index) <- member values - return (m*index) - ------------------------------------------------------------ -- updating the MCF rule