diff --git a/Utility/Android.hs b/Utility/Android.hs index f30e415d77..10ec35d37d 100644 --- a/Utility/Android.hs +++ b/Utility/Android.hs @@ -7,7 +7,9 @@ - License: BSD-2-clause -} -module Utility.Android where +module Utility.Android ( + osAndroid +) where #ifdef linux_HOST_OS import Common diff --git a/Utility/Applicative.hs b/Utility/Applicative.hs index fce3c04852..62d84bcf2b 100644 --- a/Utility/Applicative.hs +++ b/Utility/Applicative.hs @@ -5,7 +5,9 @@ - License: BSD-2-clause -} -module Utility.Applicative where +module Utility.Applicative ( + (<$$>), +) where {- Like <$> , but supports one level of currying. - diff --git a/Utility/Batch.hs b/Utility/Batch.hs index 0c6d9da755..1d66881d23 100644 --- a/Utility/Batch.hs +++ b/Utility/Batch.hs @@ -7,7 +7,14 @@ {-# LANGUAGE CPP #-} -module Utility.Batch where +module Utility.Batch ( + batch, + BatchCommandMaker, + getBatchCommandMaker, + toBatchCommand, + batchCommand, + batchCommandEnv, +) where import Common diff --git a/Utility/DBus.hs b/Utility/DBus.hs index 5b04703013..bcb093223d 100644 --- a/Utility/DBus.hs +++ b/Utility/DBus.hs @@ -7,7 +7,13 @@ {-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-} -module Utility.DBus where +module Utility.DBus ( + ServiceName, + listServiceNames, + callDBus, + runClient, + persistentClient, +) where import Utility.PartialPrelude import Utility.Exception diff --git a/Utility/Daemon.hs b/Utility/Daemon.hs index 398e6d9e7b..2bf857f7eb 100644 --- a/Utility/Daemon.hs +++ b/Utility/Daemon.hs @@ -7,7 +7,12 @@ {-# LANGUAGE CPP #-} -module Utility.Daemon where +module Utility.Daemon ( + daemonize, + foreground, + checkDaemon, + stopDaemon, +) where import Common import Utility.PID diff --git a/Utility/Data.hs b/Utility/Data.hs index 27c0a824c2..55108457d6 100644 --- a/Utility/Data.hs +++ b/Utility/Data.hs @@ -7,7 +7,10 @@ {-# OPTIONS_GHC -fno-warn-tabs #-} -module Utility.Data where +module Utility.Data ( + firstJust, + eitherToMaybe, +) where {- First item in the list that is not Nothing. -} firstJust :: Eq a => [Maybe a] -> Maybe a diff --git a/Utility/DebugLocks.hs b/Utility/DebugLocks.hs index fecacc9539..4593726ff9 100644 --- a/Utility/DebugLocks.hs +++ b/Utility/DebugLocks.hs @@ -8,7 +8,7 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} -module Utility.DebugLocks where +module Utility.DebugLocks (debugLocks) where import Control.Monad.Catch import Control.Monad.IO.Class diff --git a/Utility/DirWatcher.hs b/Utility/DirWatcher.hs index 892841f93f..99eede4173 100644 --- a/Utility/DirWatcher.hs +++ b/Utility/DirWatcher.hs @@ -11,7 +11,15 @@ {-# LANGUAGE CPP #-} -module Utility.DirWatcher where +module Utility.DirWatcher ( + canWatch, + eventsCoalesce, + closingTracked, + modifyTracked, + DirWatcherHandle, + watchDir, + stopWatchDir, +) where import Utility.DirWatcher.Types diff --git a/Utility/DirWatcher/FSEvents.hs b/Utility/DirWatcher/FSEvents.hs index d7472d490a..a2e3b4ae2d 100644 --- a/Utility/DirWatcher/FSEvents.hs +++ b/Utility/DirWatcher/FSEvents.hs @@ -5,7 +5,7 @@ - License: BSD-2-clause -} -module Utility.DirWatcher.FSEvents where +module Utility.DirWatcher.FSEvents (watchDir) where import Common hiding (isDirectory) import Utility.DirWatcher.Types diff --git a/Utility/DirWatcher/INotify.hs b/Utility/DirWatcher/INotify.hs index 341cd3073c..c33b02fa6b 100644 --- a/Utility/DirWatcher/INotify.hs +++ b/Utility/DirWatcher/INotify.hs @@ -5,7 +5,7 @@ - License: BSD-2-clause -} -module Utility.DirWatcher.INotify where +module Utility.DirWatcher.INotify (watchDir) where import Common hiding (isDirectory) import Utility.ThreadLock diff --git a/Utility/DirWatcher/Types.hs b/Utility/DirWatcher/Types.hs index 75ef69f83b..9abd5f36a1 100644 --- a/Utility/DirWatcher/Types.hs +++ b/Utility/DirWatcher/Types.hs @@ -5,7 +5,11 @@ - License: BSD-2-clause -} -module Utility.DirWatcher.Types where +module Utility.DirWatcher.Types ( + Hook, + WatchHooks(..), + mkWatchHooks, +) where import Common diff --git a/Utility/DirWatcher/Win32Notify.hs b/Utility/DirWatcher/Win32Notify.hs index a2f40128fb..7a76f618a7 100644 --- a/Utility/DirWatcher/Win32Notify.hs +++ b/Utility/DirWatcher/Win32Notify.hs @@ -5,7 +5,7 @@ - License: BSD-2-clause -} -module Utility.DirWatcher.Win32Notify where +module Utility.DirWatcher.Win32Notify (watchDir) where import Common hiding (isDirectory) import Utility.DirWatcher.Types diff --git a/Utility/Directory/Stream.hs b/Utility/Directory/Stream.hs index e827ef21a2..3a6222c561 100644 --- a/Utility/Directory/Stream.hs +++ b/Utility/Directory/Stream.hs @@ -9,11 +9,16 @@ {-# LANGUAGE LambdaCase #-} {-# OPTIONS_GHC -fno-warn-tabs #-} -module Utility.Directory.Stream where +module Utility.Directory.Stream ( + DirectoryHandle, + openDirectory, + closeDirectory, + readDirectory, + isDirectoryEmpty, +) where import Control.Monad import System.FilePath -import System.IO.Unsafe (unsafeInterleaveIO) import Control.Concurrent import Data.Maybe import Prelude @@ -100,22 +105,6 @@ readDirectory hdl@(DirectoryHandle _ h fdat mv) = do return (Just filename) #endif --- | Like getDirectoryContents, but rather than buffering the whole --- directory content in memory, lazily streams. --- --- This is like lazy readFile in that the handle to the directory remains --- open until the whole list is consumed, or until the list is garbage --- collected. So use with caution particularly when traversing directory --- trees. -streamDirectoryContents :: FilePath -> IO [FilePath] -streamDirectoryContents d = openDirectory d >>= collect - where - collect hdl = readDirectory hdl >>= \case - Nothing -> return [] - Just f -> do - rest <- unsafeInterleaveIO (collect hdl) - return (f:rest) - -- | True only when directory exists and contains nothing. -- Throws exception if directory does not exist. isDirectoryEmpty :: FilePath -> IO Bool diff --git a/Utility/Dot.hs b/Utility/Dot.hs index e21915d327..95aff93c02 100644 --- a/Utility/Dot.hs +++ b/Utility/Dot.hs @@ -1,11 +1,23 @@ {- a simple graphviz / dot(1) digraph description generator library + - + - import qualified - - Copyright 2010 Joey Hess - - License: BSD-2-clause -} -module Utility.Dot where -- import qualified +module Utility.Dot ( + graph, + graphNode, + graphEdge, + label, + attr, + fillColor, + subGraph, + indent, + quote, +) where {- generates a graph description from a list of lines -} graph :: [String] -> String diff --git a/Utility/DottedVersion.hs b/Utility/DottedVersion.hs index c2a849b4a2..dff37176ba 100644 --- a/Utility/DottedVersion.hs +++ b/Utility/DottedVersion.hs @@ -7,7 +7,11 @@ {-# OPTIONS_GHC -fno-warn-tabs #-} -module Utility.DottedVersion where +module Utility.DottedVersion ( + DottedVersion, + fromDottedVersion, + normalize, +) where import Common diff --git a/Utility/Env.hs b/Utility/Env.hs index dfebd98680..9847326940 100644 --- a/Utility/Env.hs +++ b/Utility/Env.hs @@ -8,7 +8,14 @@ {-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-tabs #-} -module Utility.Env where +module Utility.Env ( + getEnv, + getEnvDefault, + getEnvironment, + addEntry, + addEntries, + delEntry, +) where #ifdef mingw32_HOST_OS import Utility.Exception diff --git a/Utility/Env/Basic.hs b/Utility/Env/Basic.hs index 38295bea04..db738270f7 100644 --- a/Utility/Env/Basic.hs +++ b/Utility/Env/Basic.hs @@ -7,7 +7,10 @@ {-# OPTIONS_GHC -fno-warn-tabs #-} -module Utility.Env.Basic where +module Utility.Env.Basic ( + getEnv, + getEnvDefault, +) where import Utility.Exception import Control.Applicative diff --git a/Utility/Env/Set.hs b/Utility/Env/Set.hs index 9d17090b9b..f14674ca67 100644 --- a/Utility/Env/Set.hs +++ b/Utility/Env/Set.hs @@ -7,7 +7,10 @@ {-# LANGUAGE CPP #-} -module Utility.Env.Set where +module Utility.Env.Set ( + setEnv, + unsetEnv, +) where #ifdef mingw32_HOST_OS import qualified System.SetEnv diff --git a/Utility/FileSize.hs b/Utility/FileSize.hs index 5f89cff2c0..c86528369a 100644 --- a/Utility/FileSize.hs +++ b/Utility/FileSize.hs @@ -5,7 +5,11 @@ {-# LANGUAGE CPP #-} -module Utility.FileSize where +module Utility.FileSize ( + FileSize, + getFileSize, + getFileSize', +) where import System.PosixCompat.Files #ifdef mingw32_HOST_OS diff --git a/Utility/Gpg.hs b/Utility/Gpg.hs index 5be1ff528d..4c04f8265f 100644 --- a/Utility/Gpg.hs +++ b/Utility/Gpg.hs @@ -7,7 +7,32 @@ {-# LANGUAGE CPP #-} -module Utility.Gpg where +module Utility.Gpg ( + KeyId, + KeyIds(..), + GpgCmd(..), + mkGpgCmd, + boolGpgCmd, + pkEncTo, + stdEncryptionParams, + pipeStrict, + feedRead, + pipeLazy, + findPubKeys, + UserId, + secretKeys, + KeyType(..), + maxRecommendedKeySize, + genSecretKey, + genRandom, + testKeyId, +#ifndef mingw32_HOST_OS + testHarness, + testTestHarness, + checkEncryptionFile, + checkEncryptionStream, +#endif +) where import Common import qualified BuildInfo @@ -279,6 +304,7 @@ genRandom cmd highQuality size = checksize <$> readStrict cmd params - It has an empty passphrase. -} testKeyId :: String testKeyId = "129D6E0AC537B9C7" + testKey :: String testKey = keyBlock True [ "mI0ETvFAZgEEAKnqwWgZqznMhi1RQExem2H8t3OyKDxaNN3rBN8T6LWGGqAYV4wT" @@ -299,6 +325,7 @@ testKey = keyBlock True , "+gQkDF9/" , "=1k11" ] + testSecretKey :: String testSecretKey = keyBlock False [ "lQHYBE7xQGYBBACp6sFoGas5zIYtUUBMXpth/Ldzsig8WjTd6wTfE+i1hhqgGFeM" @@ -332,6 +359,7 @@ testSecretKey = keyBlock False , "IJf+/dFjxEmflWpbxw/36pEd/EReLX8b8qDIYadK6BpiWN9xgEiBv/oEJAxffw==" , "=LDsg" ] + keyBlock :: Bool -> [String] -> String keyBlock public ls = unlines [ "-----BEGIN PGP "++t++" KEY BLOCK-----" @@ -381,9 +409,7 @@ testTestHarness :: FilePath -> GpgCmd -> IO Bool testTestHarness tmpdir cmd = do keys <- testHarness tmpdir cmd $ findPubKeys cmd testKeyId return $ KeyIds [testKeyId] == keys -#endif -#ifndef mingw32_HOST_OS checkEncryptionFile :: GpgCmd -> FilePath -> Maybe KeyIds -> IO Bool checkEncryptionFile cmd filename keys = checkGpgPackets cmd keys =<< readStrict cmd params diff --git a/Utility/HtmlDetect.hs b/Utility/HtmlDetect.hs index bf0839e9ec..9096cd4022 100644 --- a/Utility/HtmlDetect.hs +++ b/Utility/HtmlDetect.hs @@ -5,7 +5,11 @@ - License: BSD-2-clause -} -module Utility.HtmlDetect where +module Utility.HtmlDetect ( + isHtml, + isHtmlBs, + htmlPrefixLength, +) where import Text.HTML.TagSoup import Data.Char diff --git a/Utility/HumanNumber.hs b/Utility/HumanNumber.hs index c3fede95f6..6143cef105 100644 --- a/Utility/HumanNumber.hs +++ b/Utility/HumanNumber.hs @@ -5,7 +5,7 @@ - License: BSD-2-clause -} -module Utility.HumanNumber where +module Utility.HumanNumber (showImprecise) where {- Displays a fractional value as a string with a limited number - of decimal digits. -} diff --git a/Utility/IPAddress.hs b/Utility/IPAddress.hs index cfe9873ca3..52d9dc0f7c 100644 --- a/Utility/IPAddress.hs +++ b/Utility/IPAddress.hs @@ -5,7 +5,12 @@ - License: BSD-2-clause -} -module Utility.IPAddress where +module Utility.IPAddress ( + extractIPAddress, + isLoopbackAddress, + isPrivateAddress, + makeAddressMatcher, +) where import Utility.Exception diff --git a/Utility/LinuxMkLibs.hs b/Utility/LinuxMkLibs.hs index 15f82fd18e..9f042dc2eb 100644 --- a/Utility/LinuxMkLibs.hs +++ b/Utility/LinuxMkLibs.hs @@ -5,7 +5,11 @@ - License: BSD-2-clause -} -module Utility.LinuxMkLibs where +module Utility.LinuxMkLibs ( + installLib, + parseLdd, + glibcLibs, +) where import Utility.PartialPrelude import Utility.Directory diff --git a/Utility/LockFile/LockStatus.hs b/Utility/LockFile/LockStatus.hs index 3f466c1255..6690882b76 100644 --- a/Utility/LockFile/LockStatus.hs +++ b/Utility/LockFile/LockStatus.hs @@ -5,7 +5,7 @@ - License: BSD-2-clause -} -module Utility.LockFile.LockStatus where +module Utility.LockFile.LockStatus (LockStatus(..)) where import System.Posix diff --git a/Utility/LogFile.hs b/Utility/LogFile.hs index 4e08e9b9f4..cb02047351 100644 --- a/Utility/LogFile.hs +++ b/Utility/LogFile.hs @@ -7,7 +7,15 @@ {-# LANGUAGE CPP #-} -module Utility.LogFile where +module Utility.LogFile ( + openLog, + listLogs, + maxLogs, +#ifndef mingw32_HOST_OS + redirLog, + redir, +#endif +) where import Common diff --git a/Utility/Lsof.hs b/Utility/Lsof.hs index 90b22cc7bc..22d4a0ebfb 100644 --- a/Utility/Lsof.hs +++ b/Utility/Lsof.hs @@ -5,7 +5,12 @@ - License: BSD-2-clause -} -module Utility.Lsof where +module Utility.Lsof ( + LsofOpenMode(..), + setup, + queryDir, + query, +) where import Common import BuildInfo diff --git a/Utility/Metered.hs b/Utility/Metered.hs index 0fec7749b6..53e253eccb 100644 --- a/Utility/Metered.hs +++ b/Utility/Metered.hs @@ -7,7 +7,40 @@ {-# LANGUAGE TypeSynonymInstances, BangPatterns #-} -module Utility.Metered where +module Utility.Metered ( + MeterUpdate, + nullMeterUpdate, + combineMeterUpdate, + BytesProcessed(..), + toBytesProcessed, + fromBytesProcessed, + addBytesProcessed, + zeroBytesProcessed, + withMeteredFile, + meteredWrite, + meteredWrite', + meteredWriteFile, + offsetMeterUpdate, + hGetContentsMetered, + hGetMetered, + defaultChunkSize, + watchFileSize, + OutputHandler(..), + ProgressParser, + commandMeter, + commandMeter', + demeterCommand, + demeterCommandEnv, + avoidProgress, + rateLimitMeterUpdate, + Meter, + mkMeter, + setMeterTotalSize, + updateMeter, + displayMeterHandle, + clearMeterHandle, + bandwidthMeter, +) where import Common import Utility.Percentage @@ -80,11 +113,6 @@ withMeteredFile :: FilePath -> MeterUpdate -> (L.ByteString -> IO a) -> IO a withMeteredFile f meterupdate a = withBinaryFile f ReadMode $ \h -> hGetContentsMetered h meterupdate >>= a -{- Sends the content of a file to a Handle, updating the meter as it's - - written. -} -streamMeteredFile :: FilePath -> MeterUpdate -> Handle -> IO () -streamMeteredFile f meterupdate h = withMeteredFile f meterupdate $ L.hPut h - {- Writes a ByteString to a Handle, updating a meter as it's written. -} meteredWrite :: MeterUpdate -> Handle -> L.ByteString -> IO () meteredWrite meterupdate h = void . meteredWrite' meterupdate h diff --git a/Utility/Misc.hs b/Utility/Misc.hs index 48fcceb7e2..de77c949a0 100644 --- a/Utility/Misc.hs +++ b/Utility/Misc.hs @@ -7,7 +7,19 @@ {-# OPTIONS_GHC -fno-warn-tabs #-} -module Utility.Misc where +module Utility.Misc ( + hGetContentsStrict, + readFileStrict, + separate, + firstLine, + segment, + segmentDelim, + massReplace, + hGetSomeString, + exitBool, + + prop_segment_regressionTest, +) where import System.IO import Control.Monad diff --git a/Utility/Monad.hs b/Utility/Monad.hs index ac751043cd..abe06f335c 100644 --- a/Utility/Monad.hs +++ b/Utility/Monad.hs @@ -7,7 +7,19 @@ {-# OPTIONS_GHC -fno-warn-tabs #-} -module Utility.Monad where +module Utility.Monad ( + firstM, + getM, + anyM, + allM, + untilTrue, + ifM, + (<||>), + (<&&>), + observe, + after, + noop, +) where import Data.Maybe import Control.Monad diff --git a/Utility/Network.hs b/Utility/Network.hs index 4def3c5c55..23487b1bcb 100644 --- a/Utility/Network.hs +++ b/Utility/Network.hs @@ -7,7 +7,7 @@ {-# OPTIONS_GHC -fno-warn-tabs #-} -module Utility.Network where +module Utility.Network (getHostname) where import Utility.Process import Utility.Exception diff --git a/Utility/OSX.hs b/Utility/OSX.hs index f6aba50960..f5820a78d6 100644 --- a/Utility/OSX.hs +++ b/Utility/OSX.hs @@ -7,7 +7,12 @@ {-# OPTIONS_GHC -fno-warn-tabs #-} -module Utility.OSX where +module Utility.OSX ( + autoStartBase, + systemAutoStart, + userAutoStart, + genOSXAutoStartFile, +) where import Utility.UserInfo diff --git a/Utility/OptParse.hs b/Utility/OptParse.hs index c65a18c249..c81517edfb 100644 --- a/Utility/OptParse.hs +++ b/Utility/OptParse.hs @@ -5,7 +5,10 @@ - License: BSD-2-clause -} -module Utility.OptParse where +module Utility.OptParse ( + invertableSwitch, + invertableSwitch', +) where import Options.Applicative import Data.Monoid diff --git a/Utility/PID.hs b/Utility/PID.hs index f5f8aa873e..1c617006b3 100644 --- a/Utility/PID.hs +++ b/Utility/PID.hs @@ -7,7 +7,7 @@ {-# LANGUAGE CPP #-} -module Utility.PID where +module Utility.PID (PID, getPID) where #ifndef mingw32_HOST_OS import System.Posix.Types (ProcessID) diff --git a/Utility/Parallel.hs b/Utility/Parallel.hs index 2352ba7068..2a778b9958 100644 --- a/Utility/Parallel.hs +++ b/Utility/Parallel.hs @@ -5,7 +5,7 @@ - License: BSD-2-clause -} -module Utility.Parallel where +module Utility.Parallel (inParallel) where import Common diff --git a/Utility/PartialPrelude.hs b/Utility/PartialPrelude.hs index 85f80534ca..90c67ffa2d 100644 --- a/Utility/PartialPrelude.hs +++ b/Utility/PartialPrelude.hs @@ -7,7 +7,18 @@ {-# OPTIONS_GHC -fno-warn-tabs #-} -module Utility.PartialPrelude where +module Utility.PartialPrelude ( + Utility.PartialPrelude.read, + Utility.PartialPrelude.head, + Utility.PartialPrelude.tail, + Utility.PartialPrelude.init, + Utility.PartialPrelude.last, + Utility.PartialPrelude.readish, + Utility.PartialPrelude.headMaybe, + Utility.PartialPrelude.lastMaybe, + Utility.PartialPrelude.beginning, + Utility.PartialPrelude.end, +) where import qualified Data.Maybe diff --git a/Utility/Path.hs b/Utility/Path.hs index f1302ae8ca..26d66066ad 100644 --- a/Utility/Path.hs +++ b/Utility/Path.hs @@ -8,7 +8,29 @@ {-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-tabs #-} -module Utility.Path where +module Utility.Path ( + simplifyPath, + absPathFrom, + parentDir, + upFrom, + dirContains, + absPath, + relPathCwdToFile, + relPathDirToFile, + relPathDirToFileAbs, + segmentPaths, + runSegmentPaths, + relHome, + inPath, + searchPath, + dotfile, + sanitizeFilePath, + splitShortExtensions, + + prop_upFrom_basics, + prop_relPathDirToFile_basics, + prop_relPathDirToFile_regressionTest, +) where import System.FilePath import Data.List diff --git a/Utility/Path/Max.hs b/Utility/Path/Max.hs index 49e65d38b0..11c0ea2d75 100644 --- a/Utility/Path/Max.hs +++ b/Utility/Path/Max.hs @@ -8,7 +8,7 @@ {-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-tabs #-} -module Utility.Path.Max where +module Utility.Path.Max (fileNameLengthLimit) where #ifndef mingw32_HOST_OS import Utility.Exception diff --git a/Utility/Process/Transcript.hs b/Utility/Process/Transcript.hs index 68fb2223eb..c0ee0b1a16 100644 --- a/Utility/Process/Transcript.hs +++ b/Utility/Process/Transcript.hs @@ -8,7 +8,11 @@ {-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-tabs #-} -module Utility.Process.Transcript where +module Utility.Process.Transcript ( + processTranscript, + processTranscript', + processTranscript'', +) where import Utility.Process import Utility.Misc diff --git a/Utility/Rsync.hs b/Utility/Rsync.hs index be890ca076..c6881b7ab9 100644 --- a/Utility/Rsync.hs +++ b/Utility/Rsync.hs @@ -7,7 +7,17 @@ {-# LANGUAGE CPP #-} -module Utility.Rsync where +module Utility.Rsync ( + rsyncShell, + rsyncServerSend, + rsyncServerReceive, + rsyncUseDestinationPermissions, + rsync, + rsyncUrlIsShell, + rsyncUrlIsPath, + rsyncProgress, + filterRsyncSafeOptions, +) where import Common import Utility.Metered @@ -161,10 +171,8 @@ filterRsyncSafeOptions = fst3 . getOpt Permute - The virtual filesystem contains: - /c, /d, ... mount points for Windows drives -} +#ifdef mingw32_HOST_OS toMSYS2Path :: FilePath -> FilePath -#ifndef mingw32_HOST_OS -toMSYS2Path = id -#else toMSYS2Path p | null drive = recombine parts | otherwise = recombine $ "/" : driveletter drive : parts diff --git a/Utility/Su.hs b/Utility/Su.hs index 03355991d1..cba88199e5 100644 --- a/Utility/Su.hs +++ b/Utility/Su.hs @@ -7,7 +7,15 @@ {-# LANGUAGE CPP #-} -module Utility.Su where +module Utility.Su ( + WhosePassword(..), + PasswordPrompt(..), + describePasswordPrompt, + describePasswordPrompt', + SuCommand, + runSuCommand, + mkSuCommand, +) where import Common diff --git a/Utility/Url.hs b/Utility/Url.hs index f1fd61edf2..2aa4e6a589 100644 --- a/Utility/Url.hs +++ b/Utility/Url.hs @@ -445,7 +445,7 @@ downloadConduit meterupdate req file uo = liftIO $ debugM "url" (show req'') resp <- http req'' (httpManager uo) if responseStatus resp == partialContent206 - then store (BytesProcessed sz) AppendMode resp + then store (toBytesProcessed sz) AppendMode resp else if responseStatus resp == ok200 then store zeroBytesProcessed WriteMode resp else respfailure resp