1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 06:11:49 +03:00

Briefer definition of bestCallStack.

This commit is contained in:
Rob Rix 2017-08-06 15:39:58 -04:00
parent 96d473f8f4
commit 1151fce874

View File

@ -323,7 +323,7 @@ instance Ix grammar => Alternative (Assignment ast grammar) where
assignmentCallStack (Label{} `Then` _) = Just callStack
assignmentCallStack _ = Nothing
bestCallStack = fromMaybe callStack (assignmentCallStack r <|> assignmentCallStack l)
bestCallStack = fromMaybe callStack (((<|>) `on` assignmentCallStack) r l)
many :: HasCallStack => Assignment ast grammar a -> Assignment ast grammar [a]
many a = Many a `Then` return