From 5b674d1940962f03415facd0e23167af8aae5280 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Sat, 22 Jul 2017 13:29:41 -0400 Subject: [PATCH] runMany closes over the source and projection. --- src/Data/Syntax/Assignment.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Data/Syntax/Assignment.hs b/src/Data/Syntax/Assignment.hs index 3dc55bac6..0df18a56b 100644 --- a/src/Data/Syntax/Assignment.hs +++ b/src/Data/Syntax/Assignment.hs @@ -299,7 +299,7 @@ runAssignment source toNode = go _ -> [] choiceSymbols choices = (toEnum :: Int -> grammar) <$> IntMap.keys choices runMany :: forall a. Assignment ast grammar a -> AssignmentState ast grammar -> ([a], AssignmentState ast grammar) - runMany rule state = case runAssignment source toNode rule state of + runMany rule state = case go rule state of Left err -> ([], state { stateError = Just err }) Right (a, state') | ((/=) `on` stateCounter) state state' -> let (as, state'') = runMany rule state'