mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-07-08 14:42:46 -06:00
data structures for param values with number, preparing optimized pattern matching in grammar compilation
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user