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

Factor out a return.

This commit is contained in:
Rob Rix 2017-06-13 18:10:25 -04:00
parent 727a8d06fb
commit bc838ab72f

View File

@ -75,10 +75,10 @@ runSES eq (EditGraph as bs)
-- | Search an edit graph for the shortest edit script along a specific diagonal. -- | Search an edit graph for the shortest edit script along a specific diagonal.
searchAlongK d k = do searchAlongK d k = do
Endpoint x y script <- moveFromAdjacent d k Endpoint x y script <- moveFromAdjacent d k
if x >= length as && y >= length bs then return $! if x >= length as && y >= length bs then
return (Just (script, d)) Just (script, d)
else else
return Nothing Nothing
-- | Move onto a given diagonal from one of its in-bounds adjacent diagonals (if any), and slide down any diagonal edges eagerly. -- | Move onto a given diagonal from one of its in-bounds adjacent diagonals (if any), and slide down any diagonal edges eagerly.
moveFromAdjacent (Distance d) (Diagonal k) = do moveFromAdjacent (Distance d) (Diagonal k) = do