Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ProcessError
- data CapturedProcess = CapturedProcess {}
- stdOut :: Lens' CapturedProcess ByteString
- stdErr :: Lens' CapturedProcess ByteString
- exitCode :: Lens' CapturedProcess ExitCode
- searchPath :: [FilePath] -> FilePath -> IO (Maybe FilePath)
- isShadowed :: FilePath -> IO (Maybe FilePath)
- isInPath :: FilePath -> IO Bool
- findFiles :: FilePath -> Regex -> IO [FilePath]
- findFilesDeep :: FilePath -> Regex -> IO [FilePath]
- findFiles' :: FilePath -> Parsec Void Text a -> IO [FilePath]
- checkFileAlreadyExists :: MonadIO m => FilePath -> m Bool
Documentation
data ProcessError Source #
NonZeroExit Int FilePath [String] | |
PTerminated FilePath [String] | |
PStopped FilePath [String] | |
NoSuchPid FilePath [String] |
Instances
Show ProcessError Source # | |
Defined in GHCup.Utils.File.Common showsPrec :: Int -> ProcessError -> ShowS # show :: ProcessError -> String # showList :: [ProcessError] -> ShowS # | |
Pretty ProcessError Source # | |
Defined in GHCup.Utils.File.Common pPrintPrec :: PrettyLevel -> Rational -> ProcessError -> Doc # pPrint :: ProcessError -> Doc # pPrintList :: PrettyLevel -> [ProcessError] -> Doc # |
data CapturedProcess Source #
Instances
Eq CapturedProcess Source # | |
Defined in GHCup.Utils.File.Common (==) :: CapturedProcess -> CapturedProcess -> Bool # (/=) :: CapturedProcess -> CapturedProcess -> Bool # | |
Show CapturedProcess Source # | |
Defined in GHCup.Utils.File.Common showsPrec :: Int -> CapturedProcess -> ShowS # show :: CapturedProcess -> String # showList :: [CapturedProcess] -> ShowS # |
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.