internal representation for param value index

This commit is contained in:
aarne
2006-11-14 19:13:33 +00:00
parent 7fc40d2b7a
commit 4b28aa89fa
16 changed files with 89 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)]