matching with ""

This commit is contained in:
aarne
2005-11-18 14:24:12 +00:00
parent 524c4829f9
commit 7c6210d6e6

View File

@@ -59,6 +59,7 @@ tryMatch (p,t) = do
(PV IW, _) | isInConstantForm t -> return [] -- optimization with wildcard
(PV x, _) | isInConstantForm t -> return [(x,t)]
(PString s, ([],K i,[])) | s==i -> return []
(PString "",([],Empty,[])) -> return [] -- because "" = [""] = []
(PInt s, ([],EInt i,[])) | s==i -> return []
(PC p pp, ([], Con f, tt)) |
p `eqStrIdent` f && length pp == length tt ->