since now we don't do common subexpression elimination for PGF we could simplify the PMCFG generation

This commit is contained in:
krasimir
2010-05-26 09:37:32 +00:00
parent b1441f2807
commit 6eda1118fc
6 changed files with 45 additions and 147 deletions

View File

@@ -137,14 +137,6 @@ lintype pgf lang fun = case typeSkeleton (lookFun pgf fun) of
vlinc (i,c) = case linc c of
R ts -> R (ts ++ replicate i str)
inline :: PGFSig -> CId -> Term -> Term
inline pgf lang t = case t of
F c -> inl $ look c
_ -> composSafeOp inl t
where
inl = inline pgf lang
look = lookLin pgf lang
composOp :: Monad m => (Term -> m Term) -> Term -> m Term
composOp f trm = case trm of
R ts -> liftM R $ mapM f ts