1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 08:25:19 +03:00

🔥 a let.

This commit is contained in:
Rob Rix 2017-06-13 18:12:08 -04:00
parent bc838ab72f
commit cebdbf2e0c

View File

@ -85,7 +85,7 @@ runSES eq (EditGraph as bs)
v <- get
let getK k = let (x, script) = v ! k in Endpoint x (x - unDiagonal k) script
let (n, m) = (length as, length bs)
let endpoint = slideFrom $! if d == 0 || k < negate m || k > n then
let endpoint@(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 []
else if k == negate d || k == negate m then
@ -102,8 +102,7 @@ runSES eq (EditGraph as bs)
else
-- The upper/right extent of the search region or edit graph, whichever is smaller.
moveRightFrom (getK (Diagonal (pred k)))
let Endpoint x _ script = endpoint
put (v Array.// [(Diagonal k, (x, script))])
put (v Array.// [(Diagonal k, (x', script))])
return endpoint
-- | Move downward from a given vertex, inserting the element for the corresponding row.