darcs-2.1.98.2: a distributed, interactive, smart revision control systemSource codeContentsIndex
Darcs.Utils
Synopsis
catchall :: IO a -> IO a -> IO a
ortryrunning :: IO ExitCode -> IO ExitCode -> IO ExitCode
nubsort :: Ord a => [a] -> [a]
breakCommand :: String -> (String, [String])
clarify_errors :: IO a -> String -> IO a
prettyException :: Exception -> String
putStrLnError :: String -> IO ()
putDocLnError :: Doc -> IO ()
withCurrentDirectory :: FilePathLike p => p -> IO a -> IO a
withUMask :: String -> IO a -> IO a
askUser :: String -> IO String
stripCr :: String -> String
showHexLen :: Integral a => Int -> a -> String
add_to_error_loc :: Exception -> String -> Exception
maybeGetEnv :: String -> IO (Maybe String)
firstNotBlank :: [String] -> Maybe String
firstJustM :: Monad m => [m (Maybe a)] -> m (Maybe a)
firstJustIO :: [IO (Maybe a)] -> IO (Maybe a)
isUnsupportedOperationError :: IOError -> Bool
isHardwareFaultError :: IOError -> Bool
get_viewer :: IO String
edit_file :: FilePathLike p => p -> IO ExitCode
promptYorn :: [Char] -> IO Char
promptCharFancy :: String -> [Char] -> Maybe Char -> [Char] -> IO Char
without_buffering :: IO a -> IO a
formatPath :: String -> String
Documentation
catchall :: IO a -> IO a -> IO aSource
ortryrunning :: IO ExitCode -> IO ExitCode -> IO ExitCodeSource
nubsort :: Ord a => [a] -> [a]Source
breakCommand :: String -> (String, [String])Source
clarify_errors :: IO a -> String -> IO aSource
prettyException :: Exception -> StringSource
putStrLnError :: String -> IO ()Source
putDocLnError :: Doc -> IO ()Source
withCurrentDirectory :: FilePathLike p => p -> IO a -> IO aSource
withUMask :: String -> IO a -> IO aSource
askUser :: String -> IO StringSource
stripCr :: String -> StringSource
showHexLen :: Integral a => Int -> a -> StringSource
add_to_error_loc :: Exception -> String -> ExceptionSource
maybeGetEnv :: String -> IO (Maybe String)Source
firstNotBlank :: [String] -> Maybe StringSource
Returns Just l where l is first non-blank string in input array; Nothing if no non-blank entries
firstJustM :: Monad m => [m (Maybe a)] -> m (Maybe a)Source
The firstJustM returns the first Just entry in a list of monadic operations. This is close to `listToMaybe fmap sequence`, but the sequence operator evaluates all monadic members of the list before passing it along (i.e. sequence is strict). The firstJustM is lazy in that list member monads are only evaluated up to the point where the first Just entry is obtained.
firstJustIO :: [IO (Maybe a)] -> IO (Maybe a)Source
The firstJustIO is a slight modification to firstJustM: the entries in the list must be IO monad operations and the firstJustIO will silently turn any monad call that throws an exception into Nothing, basically causing it to be ignored.
isUnsupportedOperationError :: IOError -> BoolSource
isHardwareFaultError :: IOError -> BoolSource
get_viewer :: IO StringSource
edit_file :: FilePathLike p => p -> IO ExitCodeSource
promptYorn :: [Char] -> IO CharSource
promptCharFancy :: String -> [Char] -> Maybe Char -> [Char] -> IO CharSource
without_buffering :: IO a -> IO aSource
formatPath :: String -> StringSource
Produced by Haddock version 2.4.2