some work on avoiding partial functions
There are still hundreds of places that use partial functions head, tail, init, and last.
This commit is contained in:
parent
95e748cbd4
commit
28699c95a7
4 changed files with 45 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue