1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Revert "Rename prev to up and next to left."

This reverts commit 6d37db67bc5917c50c8d5d405c324971fbe72e2a.
This commit is contained in:
Rob Rix 2017-06-14 10:03:13 -04:00
parent a86101d203
commit a48ee6aa99

View File

@ -69,10 +69,10 @@ runSES eq (EditGraph as bs)
searchAlongK (Diagonal k) = do
v <- get
let getK k = let (x, script) = v Map.! k in Endpoint x (x - k) script
up = {-# SCC "runSES.searchUpToD.searchAlongK.prev" #-} getK (pred k)
left = {-# SCC "runSES.searchUpToD.searchAlongK.next" #-} getK (succ k)
moveDown = let Endpoint x y script = up in Endpoint x (succ y) (if y < m then That (bs ! y) : script else script)
moveRight = let Endpoint x y script = left in Endpoint (succ x) y (if x < n then This (as ! x) : script else script)
prev = {-# SCC "runSES.searchUpToD.searchAlongK.prev" #-} getK (pred k)
next = {-# SCC "runSES.searchUpToD.searchAlongK.next" #-} getK (succ k)
moveDown = let Endpoint x y script = prev in Endpoint x (succ y) (if y < m then That (bs ! y) : script else script)
moveRight = let Endpoint x y script = next in Endpoint (succ x) y (if x < n then This (as ! x) : script else script)
Endpoint x' _ script = slideFrom $! if d == 0 || k < negate m || k > n then
-- The top-left corner, or otherwise out-of-bounds.
Endpoint 0 0 []
@ -81,7 +81,7 @@ runSES eq (EditGraph as bs)
moveDown
else if k /= d && k /= n then
-- Somewhere in the interior of the search region and edit graph.
if x up < x left then
if x prev < x next then
moveDown
else
moveRight