From f924b8b63c468a3e1ce94d4c4a47a67d77a72b6e Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 21 Aug 2017 15:35:03 -0400 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20bother=20capturing=20the=20call?= =?UTF-8?q?=20stack.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 20ee97dba..feb247802 100644 --- a/src/Data/Syntax/Assignment.hs +++ b/src/Data/Syntax/Assignment.hs @@ -285,7 +285,7 @@ runAssignment source = \ assignment state -> go assignment state >>= requireExha expectedSymbols = firstSet (t `Then` return) makeError = withStateCallStack (tracingCallSite t) state $ maybe (Error (Info.Span statePos statePos) (fmap Right expectedSymbols) Nothing) (nodeError (fmap Right expectedSymbols)) -requireExhaustive :: (Symbol grammar, HasCallStack) => Maybe (String, SrcLoc) -> (result, State ast grammar) -> Either (Error (Either String grammar)) (result, State ast grammar) +requireExhaustive :: Symbol grammar => Maybe (String, SrcLoc) -> (result, State ast grammar) -> Either (Error (Either String grammar)) (result, State ast grammar) requireExhaustive callSite (a, state) = let state' = skipTokens state in case stateNodes state' of [] -> Right (a, state') (node :< _) : _ -> Left (withStateCallStack callSite state (nodeError [] node))