diff --git a/Annex/Ingest.hs b/Annex/Ingest.hs index d265403049..b9b58068db 100644 --- a/Annex/Ingest.hs +++ b/Annex/Ingest.hs @@ -18,7 +18,6 @@ module Annex.Ingest ( addLink, makeLink, addUnlocked, - restoreFile, forceParams, addAnnexedFile, ) where diff --git a/CmdLine.hs b/CmdLine.hs index ede1f0d0d6..8b7aeced7f 100644 --- a/CmdLine.hs +++ b/CmdLine.hs @@ -14,7 +14,6 @@ module CmdLine ( import qualified Options.Applicative as O import qualified Options.Applicative.Help as H -import qualified Control.Exception as E import Control.Exception (throw) import Annex.Common @@ -31,7 +30,7 @@ import Types.Messages dispatch :: Bool -> CmdParams -> [Command] -> [GlobalOption] -> [(String, String)] -> IO Git.Repo -> String -> String -> IO () dispatch fuzzyok allargs allcmds globaloptions fields getgitrepo progname progdesc = do setupConsole - go =<< (E.try getgitrepo :: IO (Either E.SomeException Git.Repo)) + go =<< tryNonAsync getgitrepo where go (Right g) = do state <- Annex.new g diff --git a/Git/Config.hs b/Git/Config.hs index eb7157bada..39bfe92557 100644 --- a/Git/Config.hs +++ b/Git/Config.hs @@ -208,7 +208,7 @@ coreBare = "core.bare" - and returns a repo populated with the configuration, as well as the raw - output and any standard output of the command. -} fromPipe :: Repo -> String -> [CommandParam] -> ConfigStyle -> IO (Either SomeException (Repo, S.ByteString, S.ByteString)) -fromPipe r cmd params st = try $ withCreateProcess p go +fromPipe r cmd params st = tryNonAsync $ withCreateProcess p go where p = (proc cmd $ toCommand params) { std_out = CreatePipe diff --git a/Remote/Helper/Chunked/Legacy.hs b/Remote/Helper/Chunked/Legacy.hs index 439620d626..9f0678e7bd 100644 --- a/Remote/Helper/Chunked/Legacy.hs +++ b/Remote/Helper/Chunked/Legacy.hs @@ -12,7 +12,6 @@ import Remote.Helper.Chunked import Utility.Metered import qualified Data.ByteString.Lazy as L -import qualified Control.Exception as E {- This is an extension that's added to the usual file (or whatever) - where the remote stores a key. -} @@ -87,8 +86,8 @@ storeChunks key tmp dest storer recorder finalizer = do - writes a whole L.ByteString at a time. -} storeChunked :: ChunkSize -> [FilePath] -> (FilePath -> L.ByteString -> IO ()) -> L.ByteString -> IO [FilePath] -storeChunked chunksize dests storer content = either onerr return - =<< (E.try (go (Just chunksize) dests) :: IO (Either E.SomeException [FilePath])) +storeChunked chunksize dests storer content = + either onerr return =<< tryNonAsync (go (Just chunksize) dests) where go _ [] = return [] -- no dests!? go Nothing (d:_) = do