internal representation for param value index

This commit is contained in:
aarne
2006-11-14 19:13:33 +00:00
parent f10d657df1
commit 546e778ba8
14 changed files with 85 additions and 61 deletions

View File

@@ -56,6 +56,9 @@ tryMatch (p,t) = do
where
trym p t' =
case (p,t') of
(PVal _ i, (_,Val _ j,_))
| i == j -> return []
| otherwise -> Bad $ "no match of values"
(_,(x,Empty,y)) -> trym p (x,K [],y) -- because "" = [""] = []
(PV IW, _) | isInConstantForm t -> return [] -- optimization with wildcard
(PV x, _) | isInConstantForm t -> return [(x,t)]