1
0
forked from GitHub/gf-core

concatenation string patterns

This commit is contained in:
aarne
2006-01-06 21:49:25 +00:00
parent 3bf8e5ce6f
commit 88b09b8ae0
5 changed files with 18 additions and 6 deletions

View File

@@ -521,6 +521,8 @@ transPatts :: Patt -> Err [G.Patt]
transPatts p = case p of
PDisj p1 p2 -> liftM2 (++) (transPatts p1) (transPatts p2)
PC id patts -> liftM (map (G.PC id) . combinations) $ mapM transPatts patts
PQC q id patts -> liftM (map (G.PP q id) . combinations) (mapM transPatts patts)
PR pattasss -> do
let (lss,ps) = unzip [(ls,p) | PA ls p <- pattasss]
ls = map LIdent $ concat lss