data structures for param values with number, preparing optimized pattern matching in grammar compilation

This commit is contained in:
aarne
2008-12-08 07:15:19 +00:00
parent 87d7def438
commit ca4c63c58f
8 changed files with 35 additions and 38 deletions
+1 -1
View File
@@ -178,7 +178,7 @@ lookupValueIndex :: SourceGrammar -> Type -> Term -> Err Term
lookupValueIndex gr ty tr = do
ts <- allParamValues gr ty
case lookup tr $ zip ts [0..] of
Just i -> return $ Val ty i
Just i -> return $ Val tr ty i
_ -> Bad $ "no index for" +++ prt tr +++ "in" +++ prt ty
lookupIndexValue :: SourceGrammar -> Type -> Int -> Err Term