1
0
forked from GitHub/gf-core

matching empty string fixed

This commit is contained in:
aarne
2006-01-09 09:22:39 +00:00
parent 316802e52c
commit 7fbaae3350

View File

@@ -56,10 +56,10 @@ tryMatch (p,t) = do
where
trym p t' =
case (p,t') of
(_,(x,Empty,y)) -> trym p (x,K [],y) -- because "" = [""] = []
(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 []
(PFloat s,([],EFloat i,[])) | s==i -> return [] --- rounding?
(PC p pp, ([], Con f, tt)) |