Safe Haskell | None |
---|
Functions used by but not related to cabal-debian, these could conceivably be moved into more general libraries.
- type DebMap = Map BinPkgName (Maybe DebianVersion)
- buildDebVersionMap :: IO DebMap
- (!) :: DebMap -> BinPkgName -> DebianVersion
- trim :: String -> String
- strictReadF :: (Text -> r) -> FilePath -> IO r
- replaceFile :: FilePath -> String -> IO ()
- modifyFile :: FilePath -> (String -> IO (Maybe String)) -> IO ()
- diffFile :: FilePath -> Text -> IO (Maybe String)
- removeIfExists :: FilePath -> IO ()
- dpkgFileMap :: IO (Map FilePath (Set BinPkgName))
- cond :: t -> t -> Bool -> t
- debOfFile :: FilePath -> ReaderT (Map FilePath (Set BinPkgName)) IO (Maybe BinPkgName)
- readFile' :: FilePath -> IO Text
- showDeps :: [[Relation]] -> String
- showDeps' :: [a] -> [[Relation]] -> String
- withCurrentDirectory :: FilePath -> IO a -> IO a
- getDirectoryContents' :: FilePath -> IO [FilePath]
- setMapMaybe :: (Ord a, Ord b) => (a -> Maybe b) -> Set a -> Set b
- zipMaps :: Ord k => (k -> Maybe a -> Maybe b -> Maybe c) -> Map k a -> Map k b -> Map k c
- foldEmpty :: r -> ([a] -> r) -> [a] -> r
- maybeL :: Lens a (Maybe b) -> Maybe b -> a -> a
- indent :: [Char] -> String -> String
Documentation
type DebMap = Map BinPkgName (Maybe DebianVersion)Source
buildDebVersionMap :: IO DebMapSource
Read and parse the status file for installed debian packages.
(!) :: DebMap -> BinPkgName -> DebianVersionSource
strictReadF :: (Text -> r) -> FilePath -> IO rSource
replaceFile :: FilePath -> String -> IO ()Source
Write a file which we might still be reading from in order to compute the text argument.
modifyFile :: FilePath -> (String -> IO (Maybe String)) -> IO ()Source
Compute the new file contents from the old. If f returns Nothing do not write.
removeIfExists :: FilePath -> IO ()Source
dpkgFileMap :: IO (Map FilePath (Set BinPkgName))Source
Create a map from pathname to the names of the packages that contains that pathname. We need to make sure we consume all the files, so
debOfFile :: FilePath -> ReaderT (Map FilePath (Set BinPkgName)) IO (Maybe BinPkgName)Source
Given a path, return the name of the package that owns it.
withCurrentDirectory :: FilePath -> IO a -> IO aSource
From Darcs.Utils