summaryrefslogtreecommitdiffstats
path: root/TreeSearch.hs
diff options
context:
space:
mode:
authorKierán Meinhardt <kieran.meinhardt@gmail.com>2020-09-22 23:40:00 +0200
committerKierán Meinhardt <kieran.meinhardt@gmail.com>2020-09-23 00:10:07 +0200
commitca8439b6787eb238d7b07544dfc728488f3c71b6 (patch)
tree0f812affaa5c569248ee2c1c7e8b39c6e8a405c7 /TreeSearch.hs
parent121d703bcd3ecbaba031499070907251b5eae1a9 (diff)
lint
Diffstat (limited to 'TreeSearch.hs')
-rw-r--r--TreeSearch.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/TreeSearch.hs b/TreeSearch.hs
index 105603a..518c4d9 100644
--- a/TreeSearch.hs
+++ b/TreeSearch.hs
@@ -32,9 +32,7 @@ findPrev :: TreePos Full a -> Maybe (TreePos Full a)
findPrev loc =
case prev loc of
Just x -> trans_lastChild x
- Nothing -> case parent loc of
- Just x -> Just x
- Nothing -> Nothing
+ Nothing -> parent loc
where
trans_lastChild x =
case lastChild x of