From fd20883532080aca95f287274efb243a82da44ec Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Sat, 22 Jul 2017 14:09:13 -0400 Subject: [PATCH] :memo: stateError. --- src/Data/Syntax/Assignment.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Data/Syntax/Assignment.hs b/src/Data/Syntax/Assignment.hs index c49d410b6..fac253448 100644 --- a/src/Data/Syntax/Assignment.hs +++ b/src/Data/Syntax/Assignment.hs @@ -312,11 +312,11 @@ advanceState toNode state@AssignmentState{..} -- | State kept while running 'Assignment's. data AssignmentState ast grammar = AssignmentState - { stateOffset :: Int -- ^ The offset into the Source thus far reached, measured in bytes. - , statePos :: Info.Pos -- ^ The (1-indexed) line/column position in the Source thus far reached. - , stateError :: Maybe (Error grammar) - , stateCounter :: Int -- ^ Always incrementing counter that tracks how many nodes have been visited. - , stateNodes :: [ast] -- ^ The remaining nodes to assign. Note that 'children' rules recur into subterms, and thus this does not necessarily reflect all of the terms remaining to be assigned in the overall algorithm, only those “in scope.” + { stateOffset :: Int -- ^ The offset into the Source thus far reached, measured in bytes. + , statePos :: Info.Pos -- ^ The (1-indexed) line/column position in the Source thus far reached. + , stateError :: Maybe (Error grammar) -- ^ The most recently encountered error. Preserved for improved error messages in the presence of backtracking. + , stateCounter :: Int -- ^ Always incrementing counter that tracks how many nodes have been visited. + , stateNodes :: [ast] -- ^ The remaining nodes to assign. Note that 'children' rules recur into subterms, and thus this does not necessarily reflect all of the terms remaining to be assigned in the overall algorithm, only those “in scope.” } deriving (Eq, Show)