1
1
mirror of https://github.com/github/semantic.git synced 2024-12-20 21:31:48 +03:00

Define assignBy in terms of runAssignment & requireExhaustive.

This commit is contained in:
Rob Rix 2017-07-22 13:46:54 -04:00
parent 353847c5e3
commit 0666ea03fe

View File

@ -241,7 +241,7 @@ assignBy :: (Symbol grammar, Enum grammar, Eq grammar, Recursive ast, Foldable (
-> Source.Source
-> ast
-> Either (Error grammar) a
assignBy toNode assignment source = fmap fst . assignAllFrom source toNode assignment . makeState . pure
assignBy toNode assignment source = fmap fst . (>>= requireExhaustive toNode) . runAssignment source toNode assignment . makeState . pure
assignAllFrom :: (Symbol grammar, Enum grammar, Eq grammar, Recursive ast, Foldable (Base ast), HasCallStack)
=> Source.Source