darcs-2.8.4: a distributed, interactive, smart revision control system

Portability | portable
Stability | experimental
Maintainer | darcs-devel@darcs.net
Safe Haskell | None

Darcs.Global

Description

This was originally Tomasz Zielonka's AtExit module, slightly generalised to include global variables. Here, we attempt to cover broad, global features, such as exit handlers. These features slightly break the Haskellian purity of darcs, in favour of programming convenience.

Synopsis

- atexit :: IO () -> IO ()
- withAtexit :: IO a -> IO a
- data SshSettings = SshSettings {
  - ssh :: String
  - scp :: String
  - sftp :: String
  }
- defaultSsh :: SshSettings
- timingsMode :: Bool
- setTimingsMode :: IO ()
- whenDebugMode :: IO () -> IO ()
- withDebugMode :: (Bool -> IO a) -> IO a
- setDebugMode :: IO ()
- debugMessage :: String -> IO ()
- debugFail :: String -> IO a
- putTiming :: IO ()
- addCRCWarning :: FilePath -> IO ()
- getCRCWarnings :: IO [FilePath]
- resetCRCWarnings :: IO ()
- addBadSource :: String -> IO ()
- getBadSourcesList :: IO [String]
- isBadSource :: IO (String -> Bool)
- darcsdir :: String
- isReachableSource :: IO (String -> Bool)
- addReachableSource :: String -> IO ()
- windows :: Bool

# Documentation

atexit :: IO () -> IO ()

Registers an IO action to run just before darcs exits. Useful for removing temporary files and directories, for example. Referenced in Issue1914.

withAtexit :: IO a -> IO a

data SshSettings

Constructors

SshSettings |

Fields

ssh :: String
scp :: String
sftp :: String

Instances

Eq SshSettings |
Show SshSettings |

defaultSsh :: SshSettings

timingsMode :: Bool

setTimingsMode :: IO ()

whenDebugMode :: IO () -> IO ()

withDebugMode :: (Bool -> IO a) -> IO a

setDebugMode :: IO ()

debugMessage :: String -> IO ()

debugFail :: String -> IO a

putTiming :: IO ()

addCRCWarning :: FilePath -> IO ()

getCRCWarnings :: IO [FilePath]

resetCRCWarnings :: IO ()

addBadSource :: String -> IO ()

getBadSourcesList :: IO [String]

isBadSource :: IO (String -> Bool)

darcsdir :: String

isReachableSource :: IO (String -> Bool)

addReachableSource :: String -> IO ()

windows :: Bool