summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-12-09 18:10:41 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-12-09 18:10:41 -0400
commit28699c95a7de284f07a5c0e34fb1755868301f3c (patch)
treeef6b372edf27c9cbb508169e7adf707dc25a84c6 /Command
parent95e748cbd4bb858a3b87621e60f5b43d53b50480 (diff)
some work on avoiding partial functions
There are still hundreds of places that use partial functions head, tail, init, and last.
Diffstat (limited to 'Command')
-rw-r--r--Command/DropUnused.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Command/DropUnused.hs b/Command/DropUnused.hs
index 3df9ab6c2..244f378d9 100644
--- a/Command/DropUnused.hs
+++ b/Command/DropUnused.hs
@@ -73,6 +73,6 @@ readUnusedLog prefix = do
then M.fromList . map parse . lines <$> liftIO (readFile f)
else return M.empty
where
- parse line = (num, fromJust $ readKey $ tail rest)
+ parse line = (num, fromJust $ readKey rest)
where
- (num, rest) = break (== ' ') line
+ (num, rest) = separate (== ' ') line