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:
parent
96d473f8f4
commit
1151fce874
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user