Safe Haskell | None |
---|---|
Language | Haskell2010 |
- showExWithClass :: SomeException -> String
- accessorName :: String -> Maybe String
- lookup' :: Eq a => a -> Accessor [(a, b)] (Maybe b)
- envWithPathOverride :: [FilePath] -> IO (Maybe [(String, String)])
- writeFileAtomic :: FilePath -> ByteString -> IO MD5Digest
- setupEnv :: [(String, String)] -> [(String, Maybe String)] -> IO ()
- relInclToOpts :: FilePath -> [FilePath] -> [String]
- parseProgressMessage :: Text -> Either String (Int, Int, Text)
- ignoreDoesNotExist :: IO () -> IO ()
- interruptible :: IO a -> IO a
- data Diff a
- applyMapDiff :: forall k v. Ord k => Strict (Map k) (Diff v) -> Strict (Map k) v -> Strict (Map k) v
- swizzleStdout :: Fd -> IO a -> IO a
- swizzleStderr :: Fd -> IO a -> IO a
- redirectStderr :: FilePath -> IO a -> IO a
- captureOutput :: IO a -> IO (String, a)
Misc util
showExWithClass :: SomeException -> String Source
Show an exception together with its most precise type tag.
accessorName :: String -> Maybe String Source
Translate record field _name
to the accessor name
writeFileAtomic :: FilePath -> ByteString -> IO MD5Digest Source
Writes a file atomically.
The file is either written successfully or an IO exception is raised and the original file is left unchanged.
On windows it is not possible to delete a file that is open by a process. This case will give an IO exception but the atomic property is not affected.
Returns the hash of the file; we are careful not to force the entire input bytestring into memory (we compute the hash as we write the file).
setupEnv :: [(String, String)] -> [(String, Maybe String)] -> IO () Source
First restore the environment to the specified initial environment, then apply the given overrides
relInclToOpts :: FilePath -> [FilePath] -> [String] Source
ignoreDoesNotExist :: IO () -> IO () Source
Ignore "does not exist" exception
interruptible :: IO a -> IO a Source
Define interruptiple operations
(TODO: Stick in reference to blog post)
Simple diffs
applyMapDiff :: forall k v. Ord k => Strict (Map k) (Diff v) -> Strict (Map k) v -> Strict (Map k) v Source
Manipulating stdout and stderr
swizzleStdout :: Fd -> IO a -> IO a Source
swizzleStderr :: Fd -> IO a -> IO a Source
redirectStderr :: FilePath -> IO a -> IO a Source
captureOutput :: IO a -> IO (String, a) Source