accepting + patterns in pre expressions

This commit is contained in:
aarne
2009-06-20 08:39:30 +00:00
parent 19a1cd392d
commit ddd6902e7d
2 changed files with 8 additions and 6 deletions

View File

@@ -414,6 +414,10 @@ computeTermOpt rec gr = comput True where
getPatts p = case p of
PAlt a b -> liftM2 (++) (getPatts a) (getPatts b)
PString s -> return [K s]
PSeq a b -> do
as <- getPatts a
bs <- getPatts b
return [K (s ++ t) | K s <- as, K t <- bs]
_ -> fail $ "not valid pattern in pre expression" +++ prt p
{- ----