fix all remaining -Wincomplete-uni-patterns warnings

A couple of these were probably actual bugs in edge cases. Most of the
changes I'm fine with. The fact that aeson's object returns sometihng
that we know will be an Object, but the type checker does not know is
kind of annoying.
This commit is contained in:
Joey Hess 2020-04-15 13:55:08 -04:00
parent 43a9808292
commit f85ca7dc80
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 41 additions and 27 deletions

View file

@ -143,12 +143,12 @@ getTransfers' dirs wanted = do
transfers <- filter (wanted . transferKey)
<$> mapMaybe parseTransferFile . concat <$> findfiles
infos <- mapM checkTransfer transfers
return $ map (\(t, Just i) -> (t, i)) $
filter running $ zip transfers infos
return $ mapMaybe running $ zip transfers infos
where
findfiles = liftIO . mapM dirContentsRecursive
=<< mapM (fromRepo . transferDir) dirs
running (_, i) = isJust i
running (t, Just i) = Just (t, i)
running (_, Nothing) = Nothing
{- Number of bytes remaining to download from matching downloads that are in
- progress. -}