Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- findFiles :: FilePath -> Regex -> IO [FilePath]
- searchPath :: [FilePath] -> FilePath -> IO (Maybe FilePath)
- isShadowed :: FilePath -> IO (Maybe FilePath)
- isInPath :: FilePath -> IO Bool
- expandFilePath :: [Either FilePath Regex] -> IO [FilePath]
- findFilesDeep :: FilePath -> Regex -> IO [FilePath]
- findFiles' :: FilePath -> Parsec Void Text a -> IO [FilePath]
- checkFileAlreadyExists :: MonadIO m => FilePath -> m Bool
- data ProcessError
- data CapturedProcess = CapturedProcess {}
Documentation
searchPath :: [FilePath] -> FilePath -> IO (Maybe FilePath) Source #
Search for a file in the search paths.
Catches PermissionDenied
and NoSuchThing
and returns Nothing
.
isShadowed :: FilePath -> IO (Maybe FilePath) Source #
Check wether a binary is shadowed by another one that comes before it in PATH. Returns the path to said binary, if any.
isInPath :: FilePath -> IO Bool Source #
Check whether the binary is in PATH. This returns only True
if the directory containing the binary is part of PATH.
expandFilePath :: [Either FilePath Regex] -> IO [FilePath] Source #
Follows the first match in case of Regex.
data ProcessError Source #
NonZeroExit Int FilePath [String] | |
PTerminated FilePath [String] | |
PStopped FilePath [String] | |
NoSuchPid FilePath [String] |
Instances
Show ProcessError Source # | |
Defined in GHCup.Types showsPrec :: Int -> ProcessError -> ShowS # show :: ProcessError -> String # showList :: [ProcessError] -> ShowS # | |
Pretty ProcessError Source # | |
Defined in GHCup.Types pPrintPrec :: PrettyLevel -> Rational -> ProcessError -> Doc # pPrint :: ProcessError -> Doc # pPrintList :: PrettyLevel -> [ProcessError] -> Doc # |
data CapturedProcess Source #
Instances
Eq CapturedProcess Source # | |
Defined in GHCup.Types (==) :: CapturedProcess -> CapturedProcess -> Bool # (/=) :: CapturedProcess -> CapturedProcess -> Bool # | |
Show CapturedProcess Source # | |
Defined in GHCup.Types showsPrec :: Int -> CapturedProcess -> ShowS # show :: CapturedProcess -> String # showList :: [CapturedProcess] -> ShowS # |