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

Add helpers for setting the forward/backward vectors.

This commit is contained in:
Rob Rix 2017-03-10 10:50:13 -05:00
parent 02ad162cca
commit 486b284c50

View File

@ -91,6 +91,12 @@ middleSnake as bs = M (MiddleSnake as bs) `Then` return
data MyersState = MyersState { forward :: !(Vector.Vector Int), backward :: !(Vector.Vector Int) }
setForward :: Vector.Vector Int -> Myers ()
setForward v = modify (\ s -> s { forward = v })
setBackward :: Vector.Vector Int -> Myers ()
setBackward v = modify (\ s -> s { backward = v })
at :: Vector.Vector Int -> Int -> Endpoint
at v k = Endpoint (v Vector.! k) 0 -- FIXME: Bogus.