| Haskell Hierarchical Libraries (Cabal package) | Source code | Contents | Index
Distribution.Simple.Utils |
Portability | portable
Stability | alpha
Maintainer | Isaac Jones <ijones@syntaxpolice.org>
Description
Explanation: Misc. Utilities, especially file-related utilities. Stuff used by multiple modules that doesn't fit elsewhere.
Synopsis
die :: String -> IO a
dieWithLocation :: FilePath -> Maybe Int -> String -> IO a
warn :: String -> IO ()
rawSystemPath :: Int -> String -> [String] -> IO ExitCode
rawSystemVerbose :: Int -> FilePath -> [String] -> IO ExitCode
rawSystemExit :: Int -> FilePath -> [String] -> IO ()
maybeExit :: IO ExitCode -> IO ()
xargs :: Int -> (FilePath -> [String] -> IO ExitCode) -> FilePath -> [String] -> [String] -> IO ExitCode
matchesDescFile :: FilePath -> Bool
rawSystemPathExit :: Int -> String -> [String] -> IO ()
smartCopySources :: Int -> [FilePath] -> FilePath -> [String] -> [String] -> Bool -> Bool -> IO ()
copyFileVerbose :: Int -> FilePath -> FilePath -> IO ()
copyDirectoryRecursiveVerbose :: Int -> FilePath -> FilePath -> IO ()
moduleToFilePath :: [FilePath] -> String -> [String] -> IO [FilePath]
mkLibName :: FilePath -> String -> String
mkProfLibName :: FilePath -> String -> String
currentDir :: FilePath
dirOf :: FilePath -> FilePath
dotToSep :: String -> String
withTempFile :: FilePath -> String -> (FilePath -> IO a) -> IO a
findFile :: [FilePath] -> FilePath -> IO FilePath
defaultPackageDesc :: IO FilePath
findPackageDesc :: FilePath -> IO FilePath
defaultHookedPackageDesc :: IO (Maybe FilePath)
findHookedPackageDesc :: FilePath -> IO (Maybe FilePath)
distPref :: FilePath
haddockPref :: FilePath
srcPref :: FilePath
Documentation
die :: String -> IO a
dieWithLocation :: FilePath -> Maybe Int -> String -> IO a
warn :: String -> IO ()
rawSystemPath :: Int -> String -> [String] -> IO ExitCode
rawSystemVerbose :: Int -> FilePath -> [String] -> IO ExitCode
rawSystemExit :: Int -> FilePath -> [String] -> IO ()
maybeExit :: IO ExitCode -> IO ()
xargs :: Int -> (FilePath -> [String] -> IO ExitCode) -> FilePath -> [String] -> [String] -> IO ExitCode
Like the unix xargs program. Useful for when we've got very long command lines that might overflow an OS limit on command line length and so you need to invoke a command multiple times to get all the args in. Use it with either of the rawSystem variants above. For example:
     xargs (32*1024) (rawSystemPath verbose) prog fixedArgs bigArgs
matchesDescFile :: FilePath -> Bool
rawSystemPathExit :: Int -> String -> [String] -> IO ()
smartCopySources
:: Int | verbose
-> [FilePath] | build prefix (location of objects)
-> FilePath | Target directory
-> [String] | Modules
-> [String] | search suffixes
-> Bool | Exit if no such modules
-> Bool | Preserve directory structure
-> IO () |
Copy the source files into the right directory. Looks in the build prefix for files that look like the input modules, based on the input search suffixes. It copies the files into the target directory.
copyFileVerbose :: Int -> FilePath -> FilePath -> IO ()
copyDirectoryRecursiveVerbose :: Int -> FilePath -> FilePath -> IO ()
moduleToFilePath
:: [FilePath] | search locations
-> String | Module Name
-> [String] | possible suffixes
-> IO [FilePath] |
Get the file path for this particular module. In the IO monad because it looks for the actual file. Might eventually interface with preprocessor libraries in order to correctly locate more filenames. Returns empty list if no such files exist.
mkLibName
:: FilePath | file Prefix
-> String | library name.
-> String |
mkProfLibName
:: FilePath | file Prefix
-> String | library name.
-> String |
currentDir :: FilePath
The path name that represents the current directory. In Unix, it's `"."`, but this is system-specific. (E.g. AmigaOS uses the empty string `""` for the current directory.)
dirOf :: FilePath -> FilePath
dotToSep :: String -> String
withTempFile :: FilePath -> String -> (FilePath -> IO a) -> IO a
findFile
:: [FilePath] | search locations
-> FilePath | File Name
-> IO FilePath |
defaultPackageDesc :: IO FilePath
Package description file (pkgname`.cabal`)
findPackageDesc
:: FilePath | Where to look
-> IO FilePath |
Find a package description file in the given directory. Looks for `.cabal` files.
defaultHookedPackageDesc :: IO (Maybe FilePath)
Optional auxiliary package information file (pkgname`.buildinfo`)
findHookedPackageDesc
:: FilePath | Directory to search
-> IO (Maybe FilePath) | dir`/`pkgname`.buildinfo`, if present
Find auxiliary package information in the given directory. Looks for `.buildinfo` files.
distPref :: FilePath
haddockPref :: FilePath
srcPref :: FilePath
Produced by Haddock version 0.8