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

Safe HaskellNone
LanguageHaskell2010

Darcs.UI.External

Synopsis

Documentation

generateEmail Source #

Arguments

:: Handle

handle to write email to

-> String

From

-> String

To

-> String

Subject

-> String

CC

-> Doc

body

-> IO () 

sendEmailDoc Source #

Arguments

:: String

from

-> String

to

-> String

subject

-> String

cc

-> String

send command

-> Maybe (Doc, Doc)

(content,bundle)

-> Doc

body

-> IO () 

Send an email, optionally containing a patch bundle (more precisely, its description and the bundle itself)

viewDoc :: Doc -> IO () Source #

darcsProgram :: IO String Source #

Get the name of the darcs executable (as supplied by getExecutablePath)

editFile :: FilePathLike p => p -> IO (ExitCode, Bool) Source #

editFile f lets the user edit a file which could but does not need to already exist. This function returns the exit code from the text editor and a flag indicating if the user made any changes.

catchall :: IO a -> IO a -> IO a Source #

setDarcsEncodings :: IO () Source #

In some environments, darcs requires that certain global GHC library variables that control the encoding used in internal translations are set to specific values.

setDarcsEncoding enforces those settings, and should be called before the first time any darcs operation is run, and again if anything else might have set those encodings to different values.

Note that it isn't thread-safe and has a global effect on your program.

The current behaviour of this function is as follows, though this may change in future:

Encodings are only set on GHC 7.4 and up, on any non-Windows platform.

Two encodings are set, both to GHC.IO.Encoding.char8: GHC.IO.Encoding.setFileSystemEncoding and GHC.IO.Encoding.setForeignEncoding.

Prevent HLint from warning us about a redundant do if the macro isn't defined:

isUTF8Locale :: String -> Bool Source #

isUTF8 checks if an encoding is UTF-8 (or ascii, since it is a subset of UTF-8).