putting pattern macros in place (not properly tested yet)

This commit is contained in:
aarne
2008-03-15 21:02:59 +00:00
parent 1196bbe21f
commit 2a314b679d
13 changed files with 133 additions and 48 deletions

View File

@@ -111,13 +111,15 @@ tryMatch (p,t) = do
matches <- checks [mapM tryMatch [(p1,K s1),(p2,K s2)] | (s1,s2) <- cuts]
return (concat matches)
(PChar, ([],K [_],[])) -> return []
(PRep p1, ([],K s, [])) -> checks [
trym (foldr (const (PSeq p1)) (PString "")
[1..n]) t' | n <- [0 .. length s]
] >>
return []
(PChar, ([],K [_], [])) -> return []
(PChars cs, ([],K [c], [])) | elem c cs -> return []
_ -> prtBad "no match in case expr for" t
isInConstantForm :: Term -> Bool