-- 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.21 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. -- --
-- >>> getSandboxOpts Nothing -- "" -- -- >>> 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" -- -- >>> 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" --getSandboxOpts :: Maybe FilePath -> String getSandboxOpts2 :: Maybe FilePath -> String module Distribution.Cab.Version -- | Package version. data Ver -- | Creating Ver. -- --
-- >>> toVer [1,2,3] -- Ver [1,2,3] --toVer :: [Int] -> Ver -- | Creating Version in Cabal. toVersion :: [Int] -> Version -- | From Version to String -- --
-- >>> verToString $ toVer [1,2,3] -- "1.2.3" --verToString :: Ver -> String -- | From Version in Cabal to Ver. -- --
-- >>> version $ toVersion [1,2,3] -- Ver [1,2,3] --version :: Version -> Ver -- | From Version in Cabal to String. -- --
-- >>> versionToString $ toVersion [1,2,3] -- "1.2.3" --versionToString :: Version -> String instance GHC.Show.Show Distribution.Cab.Version.Ver instance GHC.Read.Read Distribution.Cab.Version.Ver instance GHC.Classes.Ord Distribution.Cab.Version.Ver instance GHC.Classes.Eq Distribution.Cab.Version.Ver module Distribution.Cab.VerDB type PkgName = String data VerDB data HowToObtain InstalledOnly :: HowToObtain AllRegistered :: HowToObtain getVerDB :: HowToObtain -> IO VerDB -- | Converting VerDB to alist. -- --
-- >>> db <- getVerDB InstalledOnly -- -- >>> elem "base" . map fst . toList $ db -- True --toList :: VerDB -> [(PkgName, Ver)] -- | Converting VerDB to Map. toMap :: VerDB -> Map PkgName Ver instance GHC.Show.Show Distribution.Cab.VerDB.VerDB instance GHC.Classes.Eq Distribution.Cab.VerDB.VerDB module Distribution.Cab.PkgDB type PkgDB = InstalledPackageIndex type PkgInfo = InstalledPackageInfo -- | Obtaining PkgDB for global and user -- --
-- getSandbox >>= getPkgDB --getPkgDB :: Maybe FilePath -> IO PkgDB -- | Obtaining PkgDB for global getGlobalPkgDB :: IO PkgDB -- | Obtaining PkgDB for user getUserPkgDB :: Maybe FilePath -> IO PkgDB -- |
-- pkgdb <- getGlobalPkgDB -- lookupByName "base" pkgdb --lookupByName :: PkgName -> PkgDB -> [PkgInfo] -- |
-- pkgdb <- getGlobalPkgDB -- lookupByVersion "base" "4.6.0.1" pkgdb --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] 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