analyzeFiles :: (MonadBaseControl IO m, MonadIO m, MonadState (Map Text Package, Renames) m, MonadThrow m)
             => [Analyzer m] -> Text -> Manifest -> m ()
analyzeFiles analyzers name m
    | null (m^.Manifest.store) = error (T.unpack noStore)
    | otherwise = do
        liftIO $ T.putStrLn $ "package " <> name
        let conduits = sourceArchive (m^.Manifest.store) $$ sequenceSinks_ sinks
            sinks = analyzers >>= \analyze -> return (analyze name m)
            pkg = package (m^.Manifest.name) (m^.Manifest.src)
        _1 . at name %= Just . maybe pkg (pkg <>)
        runResourceT conduits
  where
    noStore = "No store path specified for " <> (m^.Manifest.name)
analyzeFiles :: (MonadBaseControl IO m, MonadIO m, MonadState (Map Text Package, Renames) m, MonadThrow m)
             => [Analyzer m] -> Text -> Manifest -> m ()
analyzeFiles analyzers name m
    | null (m^.Manifest.store) = error (T.unpack noStore)
    | otherwise = do
        liftIO $ T.putStrLn $ "package " <> name
        let conduits = sourceArchive (m^.Manifest.store) $$ sequenceSinks_ sinks
            sinks = analyzers >>= \analyze -> return (analyze name m)
            pkg = package (m^.Manifest.name) (m^.Manifest.src)
        _1 . at name %= Just . maybe pkg (pkg <>)
        runResourceT conduits
  where
    noStore = "No store path specified for " <> (m^.Manifest.name)
analyzeFiles analyzers name m
    | null (m^.Manifest.store) = error (T.unpack noStore)
    | otherwise = do
        liftIO $ T.putStrLn $ "package " <> name
        let conduits = sourceArchive (m^.Manifest.store) $$ sequenceSinks_ sinks
            sinks = analyzers >>= \analyze -> return (analyze name m)
            pkg = package (m^.Manifest.name) (m^.Manifest.src)
        _1 . at name %= Just . maybe pkg (pkg <>)
        runResourceT conduits
  where
    noStore = "No store path specified for " <> (m^.Manifest.name)