Skip to content
Browse files

Rename verbose -> verbosity

  • Loading branch information...
1 parent 225135f commit b7d874ef8ad06e3d0949cf459b2f44ef42c02614 @kolmodin kolmodin committed Sep 7, 2008
Showing with 26 additions and 26 deletions.
  1. +5 −5 Cache.hs
  2. +10 −10 Main.hs
  3. +9 −9 Overlays.hs
  4. +2 −2 Status.hs
View
10 Cache.hs
@@ -39,13 +39,13 @@ alarmingLongTime = TimeDiff
}
updateCache :: Verbosity -> URI -> IO ()
-updateCache verbose uri = do
- path <- getOverlayPath verbose
+updateCache verbosity uri = do
+ path <- getOverlayPath verbosity
let cache = cacheURI uri
- notice verbose $
+ notice verbosity $
"Fetching cache from " ++ show cache ++ "..."
res <- simpleHTTP (Request cache GET [] "")
- notice verbose $
+ notice verbosity $
"done."
case res of
Left err -> throwEx (ConnectionFailed (show cache) (show err))
@@ -62,7 +62,7 @@ readCache verbosity portdir uri = do
let cachePath = cacheFile portdir
exists <- doesFileExist cachePath
unless exists $ do
- notice verbose "No cache file present, attempting to update..."
+ notice verbosity "No cache file present, attempting to update..."
updateCache verbosity uri
str <- L.readFile cachePath
return (readIndex str)
View
20 Main.hs
@@ -196,11 +196,11 @@ diffCommand = CommandUI {
diffAction :: DiffFlags -> [String] -> GlobalFlags -> IO ()
diffAction flags args globalFlags = do
- let verbose = fromFlag (diffVerbosity flags)
+ let verbosity = fromFlag (diffVerbosity flags)
dm = fromFlag (diffMode flags)
serverURI <- getServerURI (fromFlag $ diffServerURI flags)
- overlayPath <- getOverlayPath verbose
- runDiff verbose overlayPath serverURI dm
+ overlayPath <- getOverlayPath verbosity
+ runDiff verbosity overlayPath serverURI dm
-----------------------------------------------------------------------
-- Update
@@ -248,10 +248,10 @@ updateCommand = CommandUI {
updateAction :: UpdateFlags -> [String] -> GlobalFlags -> IO ()
updateAction flags args globalFlags = do
- let verbose = fromFlag (updateVerbosity flags)
+ let verbosity = fromFlag (updateVerbosity flags)
server = fromFlag (updateServerURI flags)
case parseURI server of
- Just uri -> updateCache verbose uri
+ Just uri -> updateCache verbosity uri
Nothing -> throwEx (InvalidServer server)
-----------------------------------------------------------------------
@@ -317,13 +317,13 @@ statusCommand = CommandUI {
statusAction :: StatusFlags -> [String] -> GlobalFlags -> IO ()
statusAction flags args globalFlags = do
- let verbose = fromFlag (statusVerbosity flags)
+ let verbosity = fromFlag (statusVerbosity flags)
overlayPathM = flagToMaybe (statusOverlayPath flags)
portdirM = flagToMaybe (statusPortdirPath flags)
toPortdir = fromFlag (statusToPortage flags)
portdir <- maybe getSystemPortdir return portdirM
- overlayPath <- maybe (getOverlayPath verbose) return overlayPathM
- runStatus verbose portdir overlayPath toPortdir
+ overlayPath <- maybe (getOverlayPath verbosity) return overlayPathM
+ runStatus verbosity portdir overlayPath toPortdir
-----------------------------------------------------------------------
-- Merge
@@ -371,10 +371,10 @@ mergeCommand = CommandUI {
mergeAction :: MergeFlags -> [String] -> GlobalFlags -> IO ()
mergeAction flags [pkg] globalFlags = do
- let verbose = fromFlag (mergeVerbosity flags)
+ let verbosity = fromFlag (mergeVerbosity flags)
server = fromFlag (mergeServerURI flags)
case parseURI server of
- Just uri -> merge verbose uri pkg
+ Just uri -> merge verbosity uri pkg
Nothing -> throwEx (InvalidServer server)
mergeAction _ _ _ =
View
18 Overlays.hs
@@ -15,7 +15,7 @@ import Distribution.Verbosity
import Distribution.Simple.Utils ( info )
getOverlayPath :: Verbosity -> IO String
-getOverlayPath verbose = do
+getOverlayPath verbosity = do
overlays <- getOverlays
case overlays of
[] -> throwEx NoOverlay
@@ -26,21 +26,21 @@ getOverlayPath verbose = do
search mul = do
let loop [] = throwEx (MultipleOverlays mul)
loop (x:xs) = do
- info verbose $ "Checking '" ++ x ++ "'..."
+ info verbosity $ "Checking '" ++ x ++ "'..."
found <- doesFileExist (cacheFile x)
if found
then do
- info verbose "OK!"
+ info verbosity "OK!"
return x
else do
- info verbose "Not ok."
+ info verbosity "Not ok."
loop xs
- info verbose "There are several overlays in your configuration."
- mapM (info verbose . (" * " ++)) mul
- info verbose "Looking for one with a HackPort cache..."
+ info verbosity "There are several overlays in your configuration."
+ mapM (info verbosity . (" * " ++)) mul
+ info verbosity "Looking for one with a HackPort cache..."
overlay <- loop mul
- info verbose $ "I choose " ++ overlay
- info verbose "Override my decision with hackport -p /my/overlay"
+ info verbosity $ "I choose " ++ overlay
+ info verbosity "Override my decision with hackport -p /my/overlay"
return overlay
getOverlays :: IO [String]
View
4 Status.hs
@@ -75,10 +75,10 @@ status verbosity portdir overlayPath = do
return meld
runStatus :: Verbosity -> FilePath -> FilePath -> Bool -> IO ()
-runStatus verbose portdir overlayPath toPortageFlag = do
+runStatus verbosity portdir overlayPath toPortageFlag = do
let pkgFilter | toPortageFlag = toPortageFilter
| otherwise = id
- pkgs <- status verbose portdir overlayPath
+ pkgs <- status verbosity portdir overlayPath
statusPrinter (pkgFilter pkgs)
-- |Only return packages that seems interesting to sync to portage;

0 comments on commit b7d874e

Please sign in to comment.
Something went wrong with that request. Please try again.