summaryrefslogtreecommitdiff
path: root/lib/Paths.hs
diff options
context:
space:
mode:
authorstuebinm2021-12-16 15:10:30 +0100
committerstuebinm2021-12-16 15:10:30 +0100
commit9e5ecf2bd3be27be6e8d1dd9f0bf8d80cf1eaa30 (patch)
tree3b517ddd86b761a433641b3532caa18d5c487e47 /lib/Paths.hs
parent1144f4b4aa4dbe9522a64aaec0f8488c5f2c62e3 (diff)
fixed & removed a bunch of old TODOs
Diffstat (limited to 'lib/Paths.hs')
-rw-r--r--lib/Paths.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Paths.hs b/lib/Paths.hs
index 99774c5..7fae0df 100644
--- a/lib/Paths.hs
+++ b/lib/Paths.hs
@@ -36,9 +36,10 @@ parsePath text =
-- how many steps upwards in the tree?
up = length . filter (".." ==) . T.splitOn "/" $ prefix
parts = T.splitOn "#" rest
+ -- `head` is unsafe, but splitOn will always produce lists with at least one element
path = head parts
fragment = if length parts >= 2
- then Just $ T.concat $ tail parts -- TODO!
+ then Just $ T.concat $ tail parts
else Nothing
instance PrettyPrint RelPath where