-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A maintenance command of Haskell cabal packages
--   
--   This is a MacPorts-like maintenance command of Haskell cabal packages.
--   Some part of this program is a wrapper to "ghc-pkg" and "cabal". If
--   you are always confused due to inconsistency of two commands, or if
--   you want a way to check all outdated packages, or if you want a way to
--   remove outdated packages recursively, this command helps you.
@package cab
@version 0.2.22

module Distribution.Cab.Sandbox

-- | Find a sandbox config file by tracing ancestor directories, parse it
--   and return the package db path
getSandbox :: IO (Maybe FilePath)

-- | Generate GHC options for package db according to GHC version.
--   
--   <pre>
--   &gt;&gt;&gt; getSandboxOpts Nothing
--   ""
--   
--   &gt;&gt;&gt; getSandboxOpts (Just "/path/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d")
--   "-package-db /path/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d"
--   
--   &gt;&gt;&gt; getSandboxOpts (Just "/path/.cabal-sandbox/i386-osx-ghc-7.4.1-packages.conf.d")
--   "-package-conf /path/.cabal-sandbox/i386-osx-ghc-7.4.1-packages.conf.d"
--   </pre>
getSandboxOpts :: Maybe FilePath -> String
getSandboxOpts2 :: Maybe FilePath -> String

module Distribution.Cab.Version

-- | Package version.
data Ver

-- | Creating <a>Ver</a>.
--   
--   <pre>
--   &gt;&gt;&gt; toVer [1,2,3]
--   Ver [1,2,3]
--   </pre>
toVer :: [Int] -> Ver

-- | Creating <a>Version</a> in Cabal.
toVersion :: [Int] -> Version

-- | From <a>Version</a> to <a>String</a>
--   
--   <pre>
--   &gt;&gt;&gt; verToString $ toVer [1,2,3]
--   "1.2.3"
--   </pre>
verToString :: Ver -> String

-- | From <a>Version</a> in Cabal to <a>Ver</a>.
--   
--   <pre>
--   &gt;&gt;&gt; version $ toVersion [1,2,3]
--   Ver [1,2,3]
--   </pre>
version :: Version -> Ver

-- | From <a>Version</a> in Cabal to <a>String</a>.
--   
--   <pre>
--   &gt;&gt;&gt; versionToString $ toVersion [1,2,3]
--   "1.2.3"
--   </pre>
versionToString :: Version -> String
instance GHC.Classes.Eq Distribution.Cab.Version.Ver
instance GHC.Classes.Ord Distribution.Cab.Version.Ver
instance GHC.Internal.Read.Read Distribution.Cab.Version.Ver
instance GHC.Internal.Show.Show Distribution.Cab.Version.Ver

module Distribution.Cab.VerDB
type PkgName = String
data VerDB
data HowToObtain
InstalledOnly :: HowToObtain
AllRegistered :: HowToObtain
getVerDB :: HowToObtain -> IO VerDB

-- | Converting <a>VerDB</a> to alist.
--   
--   <pre>
--   &gt;&gt;&gt; db &lt;- getVerDB InstalledOnly
--   
--   &gt;&gt;&gt; elem "base" . map fst . toList $ db
--   True
--   </pre>
toList :: VerDB -> [(PkgName, Ver)]

-- | Converting <a>VerDB</a> to <a>Map</a>.
toMap :: VerDB -> Map PkgName Ver
instance GHC.Classes.Eq Distribution.Cab.VerDB.VerDB
instance GHC.Internal.Show.Show Distribution.Cab.VerDB.VerDB

module Distribution.Cab.PkgDB
type PkgDB = InstalledPackageIndex
type PkgInfo = InstalledPackageInfo

-- | Obtaining <a>PkgDB</a> for global and user
--   
--   <pre>
--   getSandbox &gt;&gt;= getPkgDB
--   </pre>
getPkgDB :: Maybe FilePath -> IO PkgDB

-- | Obtaining <a>PkgDB</a> for global
getGlobalPkgDB :: IO PkgDB

-- | Obtaining <a>PkgDB</a> for user
getUserPkgDB :: Maybe FilePath -> IO PkgDB

-- | <pre>
--   pkgdb &lt;- getGlobalPkgDB
--   lookupByName "base" pkgdb
--   </pre>
lookupByName :: PkgName -> PkgDB -> [PkgInfo]

-- | <pre>
--   pkgdb &lt;- getGlobalPkgDB
--   lookupByVersion "base" "4.6.0.1" pkgdb
--   </pre>
lookupByVersion :: PkgName -> String -> PkgDB -> [PkgInfo]
topSortedPkgs :: PkgInfo -> PkgDB -> [PkgInfo]
toPkgInfos :: PkgDB -> [PkgInfo]
nameOfPkgInfo :: PkgInfo -> PkgName
fullNameOfPkgInfo :: PkgInfo -> String
pairNameOfPkgInfo :: PkgInfo -> (PkgName, String)
verOfPkgInfo :: PkgInfo -> Ver
findInternalLibs :: PkgInfo -> String -> [String]
findSourceLib :: PkgDB -> PkgInfo -> [PkgInfo]

module Distribution.Cab.Printer
printDeps :: Bool -> Bool -> PkgDB -> Int -> PkgInfo -> IO ()
printRevDeps :: Bool -> Bool -> PkgDB -> Int -> PkgInfo -> IO ()
extraInfo :: Bool -> PkgInfo -> IO ()

module Distribution.Cab
data Option
OptNoharm :: Option
OptRecursive :: Option
OptAll :: Option
OptInfo :: Option
OptFlag :: String -> Option
OptTest :: Option
OptHelp :: Option
OptBench :: Option
OptDepsOnly :: Option
OptLibProfile :: Option
OptExecProfile :: Option
OptJobs :: String -> Option
OptImport :: String -> Option
OptStatic :: Option
OptFuture :: Option
OptDebug :: Option
OptAllowNewer :: Option
OptCleanUp :: Option
type FunctionCommand = [String] -> [Option] -> [String] -> IO ()
deps :: FunctionCommand
revdeps :: FunctionCommand
installed :: FunctionCommand
outdated :: FunctionCommand
uninstall :: FunctionCommand
search :: FunctionCommand
genpaths :: FunctionCommand
check :: FunctionCommand
add :: FunctionCommand
initSandbox :: FunctionCommand
ghci :: FunctionCommand
