Haskell Core Libraries (Cabal package)ContentsIndex
Distribution.Simple.Utils
PortabilityGHC
Stabilityalpha
MaintainerIsaac 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
rawSystemPath :: Int -> String -> [String] -> IO ExitCode
rawSystemVerbose :: Int -> String -> [String] -> IO ExitCode
rawSystemExit :: Int -> FilePath -> [String] -> IO ()
maybeExit :: IO ExitCode -> IO ()
matchesDescFile :: FilePath -> Bool
rawSystemPathExit :: Int -> String -> [String] -> IO ()
smartCopySources :: Int -> FilePath -> FilePath -> [String] -> [String] -> Bool -> IO ()
copyFileVerbose :: Int -> FilePath -> FilePath -> IO ()
moduleToFilePath :: [FilePath] -> String -> [String] -> IO [FilePath]
mkLibName :: FilePath -> String -> String
currentDir :: FilePath
dotToSep :: String -> String
withTempFile :: FilePath -> String -> (FilePath -> IO a) -> IO a
getOptionsFromSource :: FilePath -> IO ([Extension], [(CompilerFlavor, [String])], [String])
stripComments :: Bool -> String -> String
defaultPackageDesc :: IO FilePath
findPackageDesc :: FilePath -> IO FilePath
defaultHookedPackageDesc :: IO (Maybe FilePath)
findHookedPackageDesc :: FilePath -> IO (Maybe FilePath)
Documentation
die :: String -> IO a
rawSystemPath :: Int -> String -> [String] -> IO ExitCode
rawSystemVerbose :: Int -> String -> [String] -> IO ExitCode
rawSystemExit :: Int -> FilePath -> [String] -> IO ()
maybeExit :: IO ExitCode -> IO ()
matchesDescFile :: FilePath -> Bool
rawSystemPathExit :: Int -> String -> [String] -> IO ()
smartCopySources
:: Intverbose
-> FilePathbuild prefix (location of objects)
-> FilePathTarget directory
-> [String]Modules
-> [String]search suffixes
-> BoolExit if no such modules
-> 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 ()
moduleToFilePath
:: [FilePath]search locations
-> StringModule 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
:: FilePathfile Prefix
-> Stringlibrary name.
-> String
currentDir :: FilePath
The path name that represents the current directory. May be system-specific. In Unix, it's ".".
dotToSep :: String -> String
withTempFile :: FilePath -> String -> (FilePath -> IO a) -> IO a
getOptionsFromSource :: FilePath -> IO ([Extension], [(CompilerFlavor, [String])], [String])
Read the initial part of a source file, before any Haskell code, and return the contents of any LANGUAGE, OPTIONS and INCLUDE pragmas.
stripComments
:: Boolpreserve pragmas?
-> Stringinput source text
-> String
Strip comments from Haskell source.
defaultPackageDesc :: IO FilePath
Package description file (pkgname.cabal)
findPackageDesc
:: FilePathWhere 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
:: FilePathDirectory to search
-> IO (Maybe FilePath)dir/pkgname.buildinfo, if present
Find auxiliary package information in the given directory. Looks for .buildinfo files.
Produced by Haddock version 0.7