-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | a distributed, interactive, smart revision control system -- -- Darcs is a free, open source revision control system. It is: -- -- -- -- This smartness lets you respond to changing demands in ways that would -- otherwise not be possible. Learn more about spontaneous branches with -- darcs. @package darcs @version 2.2.1 module ThisVersion darcs_version :: String module Autoconf have_libcurl :: Bool have_libwww :: Bool have_HTTP :: Bool use_color :: Bool use_mmap :: Bool darcs_version :: String sendmail_path :: String have_sendmail :: Bool have_mapi :: Bool diff_program :: String path_separator :: Char big_endian :: Bool module Workaround setExecutable :: FilePath -> Bool -> IO () module UTF8 encode :: [Char] -> [Word8] module RegChars regChars :: String -> (Char -> Bool) module Printer -- | A Printable is either a String, a packed string, or a chunk of -- text with both representations. data Printable S :: !String -> Printable PS :: !ByteString -> Printable Both :: !String -> !ByteString -> Printable -- | a Doc is a bit of enriched text. Docs get concatanated -- using <>, which is right-associative. newtype Doc Doc :: Reader St Document -> Doc unDoc :: Doc -> Reader St Document type Printers = Handle -> Printers' -- | A set of printers to print different types of text to a handle. data Printers' Printers :: !Color -> Printer -> !Printer -> !Printer -> !Printer -> !Printer -> !Color -> Doc -> Doc -> !DocumentInternals -> Printers' colorP :: Printers' -> !Color -> Printer invisibleP :: Printers' -> !Printer hiddenP :: Printers' -> !Printer userchunkP :: Printers' -> !Printer defP :: Printers' -> !Printer lineColorT :: Printers' -> !Color -> Doc -> Doc lineColorS :: Printers' -> !DocumentInternals type Printer = Printable -> Reader St Document data Color Blue :: Color Red :: Color Green :: Color Cyan :: Color Magenta :: Color -- | hputDoc puts a doc on the given handle using simplePrinters hPutDoc :: Handle -> Doc -> IO () hPutDocLn :: Handle -> Doc -> IO () -- | putDoc puts a doc on stdout using the simple printer -- simplePrinters. putDoc :: Doc -> IO () -- | putDocLn puts a doc, followed by a newline on stdout using -- simplePrinters putDocLn :: Doc -> IO () -- | hputDocWith puts a doc on the given handle using the given printer. hPutDocWith :: Printers -> Handle -> Doc -> IO () -- | hputDocLnWith puts a doc, followed by a newline on the given handle -- using the given printer. hPutDocLnWith :: Printers -> Handle -> Doc -> IO () -- | putDocWith puts a doc on stdout using the given printer. putDocWith :: Printers -> Doc -> IO () -- | putDocLnWith puts a doc, followed by a newline on stdout using -- the given printer. putDocLnWith :: Printers -> Doc -> IO () -- | renders a Doc into a String with control codes for the -- special features of the doc. renderString :: Doc -> String -- | renders a Doc into a String using a given set of -- printers. renderStringWith :: Printers' -> Doc -> String -- | renders a Doc into ByteString with control codes for the -- special features of the Doc. See also readerString. renderPS :: Doc -> ByteString -- | renders a doc into a ByteString using a given set of printers. renderPSWith :: Printers' -> Doc -> ByteString -- | renders a Doc into a list of PackedStrings, one for each line. renderPSs :: Doc -> [ByteString] -- | renders a Doc into a list of PackedStrings, one for each chunk -- of text that was added to the doc, using the given set of printers. renderPSsWith :: Printers' -> Doc -> [ByteString] lineColor :: Color -> Doc -> Doc prefix :: String -> Doc -> Doc -- | colorText creates a Doc containing colored text from a -- String colorText :: Color -> String -> Doc -- | invisibleText creates a Doc containing invisible text -- from a String invisibleText :: String -> Doc -- | hiddenText creates a Doc containing hidden text from a -- String hiddenText :: String -> Doc hiddenPrefix :: String -> Doc -> Doc -- | userchunk creates a Doc containing a user chunk from a -- String userchunk :: String -> Doc -- | text creates a Doc from a String, using -- printable. text :: String -> Doc printable :: Printable -> Doc -- | wrap_text n s is a Doc representing s -- line-wrapped at n characters wrap_text :: Int -> String -> Doc blueText :: String -> Doc -- | blueText creates a Doc containing blue text from a -- String redText :: String -> Doc greenText :: String -> Doc magentaText :: String -> Doc cyanText :: String -> Doc -- | unsafeText creates a Doc from a String, using -- simplePrinter directly unsafeText :: String -> Doc -- | unsafeBoth builds a Doc from a String and a -- ByteString representing the same text, but does not check that -- they do. unsafeBoth :: String -> ByteString -> Doc -- | unsafeBothText builds a Doc from a String. The -- string is stored in the Doc as both a String and a ByteString. unsafeBothText :: String -> Doc -- | unsafeChar creates a Doc containing just one character. unsafeChar :: Char -> Doc -- | invisiblePS creates a Doc with invisible text from a -- ByteString invisiblePS :: ByteString -> Doc -- | packedString builds a Doc from a ByteString using -- printable packedString :: ByteString -> Doc -- | unsafePackedString builds a Doc from a ByteString -- using simplePrinter unsafePackedString :: ByteString -> Doc -- | userchunkPS creates a Doc representing a user chunk from -- a ByteString. userchunkPS :: ByteString -> Doc -- | simplePrinters is a Printers which uses the set -- 'simplePriners\'' on any handle. simplePrinters :: Printers -- | invisiblePrinter is the Printer for hidden text. It -- seems to just replace the document with empty. I'm confused -- (Florent). invisiblePrinter :: Printer -- | simplePrinter is the simplest Printer: it just -- concatenates together the pieces of the Doc simplePrinter :: Printer doc :: ([Printable] -> [Printable]) -> Doc -- | The empty Doc. empty :: Doc -- | '()' is the concatenation operator for Docs (<>) :: Doc -> Doc -> Doc -- | a <?> b is a if it is not empty, else -- b. () :: Doc -> Doc -> Doc -- | a <+> b is a followed by a space, then -- b. (<+>) :: Doc -> Doc -> Doc -- | a $$ b is a above b. ($$) :: Doc -> Doc -> Doc -- | vcat piles vertically a list of Docs. vcat :: [Doc] -> Doc -- | vsep piles vertically a list of Docs leaving a blank -- line between each. vsep :: [Doc] -> Doc -- | hcat concatenates (horizontally) a list of Docs hcat :: [Doc] -> Doc minus :: Doc -- | Minimal Docs representing the common characters space, -- newline minus, plus, and backslash. newline :: Doc plus :: Doc space :: Doc backslash :: Doc -- | lparen is the Doc that represents "(" lparen :: Doc -- | rparen is the Doc that represents ")" rparen :: Doc -- | parens doc returns a Doc with the content of -- doc put within a pair of parenthesis. parens :: Doc -> Doc errorDoc :: Doc -> a module OldDate -- | Read/interpret a date string, assuming UTC if timezone is not -- specified in the string readUTCDate :: String -> CalendarTime showIsoDateTime :: CalendarTime -> String module IsoDate -- | The current time in the format returned by showIsoDateTime getIsoDateTime :: IO String -- | Read/interpret a date string, assuming local timezone if not specified -- in the string readLocalDate :: String -> CalendarTime -- | Read/interpret a date string, assuming UTC if timezone is not -- specified in the string (see readDate) Warning! This errors out -- if we fail to interpret the date readUTCDate :: String -> CalendarTime -- | Parse a date string, assuming a default timezone if the date string -- does not specify one. The date formats understood are those of -- showIsoDateTime and date_time parseDate :: Int -> String -> Either ParseError MCalendarTime -- | Return the local timezone offset from UTC in seconds getLocalTz :: IO Int -- | In English, either a date followed by a time, or vice-versa, e.g, -- -- -- -- See englishDate and englishTime Uses its first argument -- as now, i.e. the time relative to which yesterday, -- today etc are to be interpreted englishDateTime :: CalendarTime -> CharParser a CalendarTime -- | English expressions for intervals of time, -- -- englishInterval :: CalendarTime -> CharParser a TimeInterval -- | Durations in English that begin with the word "last", E.g. "last 4 -- months" is treated as the duration between 4 months ago and now englishLast :: CalendarTime -> CharParser a (CalendarTime, CalendarTime) -- | Intervals in ISO 8601, e.g., -- -- -- -- See iso8601_duration iso8601_interval :: Int -> CharParser a (Either TimeDiff (MCalendarTime, MCalendarTime)) -- | Durations in ISO 8601, e.g., -- -- iso8601_duration :: CharParser a TimeDiff -- | Convert a date string into ISO 8601 format (yyyymmdd variant) assuming -- local timezone if not specified in the string Warning! This errors out -- if we fail to interpret the date cleanLocalDate :: String -> String -- | Set a calendar to UTC time any eliminate any inconsistencies within -- (for example, where the weekday is given as Thursday, but -- this does not match what the numerical date would lead one to expect) resetCalendar :: CalendarTime -> CalendarTime -- | An MCalenderTime is an underspecified CalendarTime It is used -- for parsing dates. For example, if you want to parse the date '4 -- January', it may be useful to underspecify the year by setting it to -- Nothing. This uses almost the same fields as -- CalendarTime, a notable exception being that we introduce -- mctWeek to indicate if a weekday was specified or not data MCalendarTime MCalendarTime :: Maybe Int -> Maybe Month -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Integer -> Maybe Day -> Maybe Int -> Maybe String -> Maybe Int -> Maybe Bool -> Bool -> MCalendarTime mctYear :: MCalendarTime -> Maybe Int mctMonth :: MCalendarTime -> Maybe Month mctDay :: MCalendarTime -> Maybe Int mctHour :: MCalendarTime -> Maybe Int mctMin :: MCalendarTime -> Maybe Int mctSec :: MCalendarTime -> Maybe Int mctPicosec :: MCalendarTime -> Maybe Integer mctWDay :: MCalendarTime -> Maybe Day mctYDay :: MCalendarTime -> Maybe Int mctTZName :: MCalendarTime -> Maybe String mctTZ :: MCalendarTime -> Maybe Int mctIsDST :: MCalendarTime -> Maybe Bool mctWeek :: MCalendarTime -> Bool subtractFromMCal :: TimeDiff -> MCalendarTime -> MCalendarTime addToMCal :: TimeDiff -> MCalendarTime -> MCalendarTime -- | Trivially convert a CalendarTime to a fully specified -- MCalendarTime (note that this sets the mctWeek flag to -- False toMCalendarTime :: CalendarTime -> MCalendarTime -- | Returns the first CalendarTime that falls within a -- MCalendarTime This is only unsafe in the sense that it plugs in -- default values for fields that have not been set, e.g. -- January for the month or 0 for the seconds field. -- Maybe we should rename it something happier. See also -- resetCalendar unsafeToCalendarTime :: MCalendarTime -> CalendarTime -- | Zero the time fields of a CalendarTime unsetTime :: CalendarTime -> CalendarTime type TimeInterval = (Maybe CalendarTime, Maybe CalendarTime) instance Show MCalendarTime -- | GZIp and MMap IO for ByteStrings, and miscellaneous functions for -- Data.ByteString module ByteStringUtils -- | Do something with the internals of a PackedString. Beware of altering -- the contents! unsafeWithInternals :: ByteString -> (Ptr Word8 -> Int -> IO a) -> IO a unpackPSfromUTF8 :: ByteString -> String gzReadFilePS :: FilePath -> IO ByteString -- | Like readFilePS, this reads an entire file directly into a -- ByteString, but it is even more efficient. It involves directly -- mapping the file to memory. This has the advantage that the contents -- of the file never need to be copied. Also, under memory pressure the -- page may simply be discarded, wile in the case of readFilePS it would -- need to be written to swap. If you read many small files, mmapFilePS -- will be less memory-efficient than readFilePS, since each mmapFilePS -- takes up a separate page of memory. Also, you can run into bus errors -- if the file is modified. NOTE: as with readFilePS, the string -- representation in the file is assumed to be ISO-8859-1. mmapFilePS :: FilePath -> IO ByteString gzWriteFilePS :: FilePath -> ByteString -> IO () gzWriteFilePSs :: FilePath -> [ByteString] -> IO () ifHeadThenTail :: Word8 -> ByteString -> Maybe ByteString -- | dropSpace efficiently returns the ByteString argument with -- white space Chars removed from the front. It is more efficient than -- calling dropWhile for removing whitespace. I.e. -- --
--   dropWhile isSpace == dropSpace
--   
dropSpace :: ByteString -> ByteString -- | breakSpace returns the pair of ByteStrings when the argument is -- broken at the first whitespace byte. I.e. -- --
--   break isSpace == breakSpace
--   
breakSpace :: ByteString -> (ByteString, ByteString) linesPS :: ByteString -> [ByteString] -- | This function acts exactly like the Prelude unlines function, -- or like Data.ByteString.Char8 unlines, but with one -- important difference: it will produce a string which may not end with -- a newline! That is: -- --
--   unlinesPS ["foo", "bar"]
--   
-- -- evaluates to "foo\nbar", not "foo\nbar\n"! This point should hold true -- for linesPS as well. -- -- TODO: rename this function. unlinesPS :: [ByteString] -> ByteString hashPS :: ByteString -> Int32 breakFirstPS :: Char -> ByteString -> Maybe (ByteString, ByteString) breakLastPS :: Char -> ByteString -> Maybe (ByteString, ByteString) substrPS :: ByteString -> ByteString -> Maybe Int -- | readIntPS skips any whitespace at the beginning of its argument, and -- reads an Int from the beginning of the PackedString. If there is no -- integer at the beginning of the string, it returns Nothing, otherwise -- it just returns the int read, along with a B.ByteString containing the -- remainder of its input. readIntPS :: ByteString -> Maybe (Int, ByteString) is_funky :: ByteString -> Bool fromHex2PS :: ByteString -> ByteString fromPS2Hex :: ByteString -> ByteString -- | betweenLinesPS returns the B.ByteString between the two lines given, -- or Nothing if they do not appear. betweenLinesPS :: ByteString -> ByteString -> ByteString -> Maybe (ByteString) break_after_nth_newline :: Int -> ByteString -> Maybe (ByteString, ByteString) break_before_nth_newline :: Int -> ByteString -> (ByteString, ByteString) module SHA1 sha1PS :: ByteString -> String module English -- |
--   englishNum 0 (Noun "watch") "" == "watches"
--   englishNum 1 (Noun "watch") "" == "watch"
--   englishNum 2 (Noun "watch") "" == "watches"
--   
englishNum :: (Numbered n) => Int -> n -> ShowS -- | Things that have a plural and singular spelling class Numbered a plural :: (Numbered a) => a -> ShowS singular :: (Numbered a) => a -> ShowS -- | This only distinguishes between nouns with a final -ch, and nouns -- which do not. More irregular nouns will just need to have their own -- type -- --
--   plural (Noun "batch") "" == "batches"
--   plural (Noun "bat")   "" == "bats"
--   plural (Noun "mouse") "" == "mouses" -- :-(
--   
newtype Noun Noun :: String -> Noun -- |
--   singular This (Noun "batch") "" == "this batch"
--   plural   This (Noun "batch") "" == "these batches"
--   
data This This :: Noun -> This instance Numbered This instance Numbered Noun module DateMatcher -- | parseDateMatcher s return the first matcher in -- getMatchers that can parse s parseDateMatcher :: String -> IO (CalendarTime -> Bool) -- | A DateMatcher combines a potential parse for a date string with -- a matcher function that operates on a given date. We use an -- existential type on the matcher to allow the date string to either be -- interpreted as a point in time or as an interval. data DateMatcher DM :: String -> (Either ParseError d) -> (d -> CalendarTime -> Bool) -> DateMatcher -- | getMatchers d returns the list of matchers that will -- be applied on d. If you wish to extend the date parsing code, -- this will likely be the function that you modify to do so. getMatchers :: String -> IO [DateMatcher] module Darcs.SignalHandler withSignalsHandled :: IO a -> IO a withSignalsBlocked :: IO () -> IO () catchInterrupt :: IO a -> IO a -> IO a catchNonSignal :: IO a -> (Exception -> IO a) -> IO a tryNonSignal :: IO a -> IO (Either Exception a) stdout_is_a_pipe :: IO Bool instance Typeable SignalException module Darcs.Show class Show1 a show1 :: (Show1 a) => a -> String showsPrec1 :: (Show1 a) => Int -> a -> ShowS class Show2 a show2 :: (Show2 a) => a -> String showsPrec2 :: (Show2 a) => Int -> a -> ShowS showOp2 :: (Show2 a, Show2 b) => Int -> String -> Int -> a -> b -> String -> String app_prec :: Int module Darcs.Sealed data Sealed a Sealed :: a -> Sealed a seal :: a -> Sealed a unseal :: (a -> b) -> Sealed a -> b mapSeal :: (a -> b) -> Sealed a -> Sealed b unsafeUnseal :: Sealed a -> a unsafeUnflippedseal :: FlippedSeal a -> a unsafeUnseal2 :: Sealed2 a -> a data Sealed2 a Sealed2 :: !a -> Sealed2 a seal2 :: a -> Sealed2 a unseal2 :: (a -> b) -> Sealed2 a -> b mapSeal2 :: (a -> b) -> Sealed2 a -> Sealed2 b data FlippedSeal a FlippedSeal :: !a -> FlippedSeal a flipSeal :: a -> FlippedSeal a unsealFlipped :: (a -> b) -> FlippedSeal a -> b mapFlipped :: (a -> b) -> FlippedSeal a -> FlippedSeal b unsealM :: (Monad m) => m (Sealed a) -> (a -> m b) -> m b liftSM :: (Monad m) => (a -> b) -> m (Sealed a) -> m b instance (Show2 a) => Show (Sealed2 a) instance (Show1 a) => Show (Sealed a) module Darcs.Patch.ReadMonads class (Monad m) => ParserM m work :: (ParserM m) => (ByteString -> Maybe (a, ByteString)) -> m a maybe_work :: (ParserM m) => (ByteString -> Maybe (a, ByteString)) -> m (Maybe a) peek_input :: (ParserM m) => m ByteString alter_input :: (ParserM m) => (ByteString -> ByteString) -> m () parse_strictly :: SM a -> ByteString -> Maybe (a, ByteString) parse_lazily :: LM a -> ByteString -> (a, ByteString) lex_char :: (ParserM m) => Char -> m () lex_string :: (ParserM m) => String -> m () lex_strings :: (ParserM m) => [String] -> m String lex_eof :: (ParserM m) => m () my_lex :: ByteString -> Maybe (ByteString, ByteString) instance ParserM LM instance Monad LM instance ParserM SM instance Monad SM module Darcs.Patch.MatchData data PatchMatch PatternMatch :: String -> PatchMatch patch_match :: String -> PatchMatch instance Eq PatchMatch instance Show PatchMatch -- | FileName is an abstract type intended to facilitate the input and -- output of unicode filenames. module Darcs.Patch.FileName data FileName fp2fn :: FilePath -> FileName fn2fp :: FileName -> FilePath fn2ps :: FileName -> ByteString ps2fn :: ByteString -> FileName niceps2fn :: ByteString -> FileName fn2niceps :: FileName -> ByteString break_on_dir :: FileName -> Maybe (FileName, FileName) norm_path :: FileName -> FileName own_name :: FileName -> FileName super_name :: FileName -> FileName movedirfilename :: FileName -> FileName -> FileName -> FileName encode_white :: FilePath -> String decode_white :: String -> FilePath (///) :: FileName -> FileName -> FileName -- | Split a file path at the slashes breakup :: String -> [String] instance Eq FileName instance Ord FileName instance Show FileName module Darcs.Patch.Check data PatchCheck a do_check :: PatchCheck a -> a file_exists :: String -> PatchCheck Bool dir_exists :: String -> PatchCheck Bool remove_file :: String -> PatchCheck Bool remove_dir :: String -> PatchCheck Bool create_file :: String -> PatchCheck Bool create_dir :: String -> PatchCheck Bool insert_line :: String -> Int -> ByteString -> PatchCheck Bool delete_line :: String -> Int -> ByteString -> PatchCheck Bool is_valid :: PatchCheck Bool do_verbose_check :: PatchCheck a -> a file_empty :: String -> PatchCheck Bool check_move :: String -> String -> PatchCheck Bool modify_file :: String -> ([Possibly ByteString] -> Maybe [Possibly ByteString]) -> PatchCheck Bool data Possibly a PJust :: a -> Possibly a PNothing :: Possibly a PSomething :: Possibly a instance Show KnownState instance Eq Prop instance (Eq a) => Eq (Possibly a) instance (Show a) => Show (Possibly a) instance Monad PatchCheck instance Show Prop -- | 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. module Darcs.Global atexit :: IO () -> IO () with_atexit :: IO a -> IO a sshControlMasterDisabled :: Bool setSshControlMasterDisabled :: IO () verboseMode :: Bool setVerboseMode :: IO () timingsMode :: Bool setTimingsMode :: IO () whenDebugMode :: IO () -> IO () withDebugMode :: (Bool -> IO a) -> IO a setDebugMode :: IO () debugMessage :: String -> IO () debugFail :: String -> IO a putTiming :: IO () darcsdir :: String module Progress -- | beginTedious k starts a tedious process and registers it in -- _progressData with the key k. A tedious process is one -- for which we want a progress indicator. -- -- Wouldn't it be safer if it had type String -> IO ProgressDataKey, -- so that we can ensure there is no collision? What happens if you call -- beginTedious twice with the same string, without calling endTedious in -- the meantime? beginTedious :: String -> IO () -- | endTedious k unregisters the tedious process with key -- k, printing Done if such a tedious process exists. endTedious :: String -> IO () tediousSize :: String -> Int -> IO () debugMessage :: String -> IO () debugFail :: String -> IO a withoutProgress :: IO a -> IO a progress :: String -> a -> a progressKeepLatest :: String -> a -> a finishedOne :: String -> String -> a -> a finishedOneIO :: String -> String -> IO () progressList :: String -> [a] -> [a] minlist :: Int setProgressMode :: Bool -> IO () module Exec exec :: String -> [String] -> Redirects -> IO ExitCode exec_interactive :: String -> String -> IO ExitCode withoutNonBlock :: IO a -> IO a type Redirects = (Redirect, Redirect, Redirect) data Redirect AsIs :: Redirect Null :: Redirect File :: FilePath -> Redirect Stdout :: Redirect data ExecException ExecException :: String -> [String] -> Redirects -> String -> ExecException instance Typeable ExecException instance Show ExecException instance Show Redirect module Darcs.Email make_email :: String -> [(String, String)] -> (Maybe Doc) -> Doc -> (Maybe String) -> Doc read_email :: ByteString -> ByteString module Darcs.Bug _bug :: FetchUrl -> BugStuff -> String -> a _bugDoc :: FetchUrl -> BugStuff -> Doc -> a _impossible :: FetchUrl -> BugStuff -> a _fromJust :: FetchUrl -> BugStuff -> Maybe a -> a module Crypt.SHA256 sha256sum :: ByteString -> String -- | A parser for commandlines, returns an arg list and expands format -- strings given in a translation table. Additionally the commandline can -- end with %< specifying that the command expects input on -- stdin. -- -- Some tests for the parser. -- --
--   formatTable = [('s',"<insert subject here>"),
--                  ('a',"<insert author here>")]
--   
--   testParser :: (Show a, Eq a) => Parser a -> String -> a -> a
--   testParser p s ok = case parse p "" s of
--                       Left e -> error $ "Parser failed with: " ++ (show e)
--                       Right res -> if res == ok
--                                    then res
--                                    else error $ "Parser failed: got "
--                                           ++ (show res) ++ ", expected "
--                                           ++ (show ok)
--   
--   testCases = [("a b",(["a","b"], False)),
--                ("a b %<",(["a","b"], True)),
--                ("a b %< ",(["a","b"], True)),
--                ("\"arg0 contains spaces \\\"quotes\\\"\" b",
--                 (["arg0 contains spaces \"quotes\"","b"],False)),
--                ("a %s %<",(["a","<insert subject here>"], True))]
--   
--   runTests = map (uncurry $ testParser (commandline formatTable)) testCases
--   
module CommandLine -- | parse a commandline returning a list of strings (intended to be used -- as argv) and a bool value which specifies if the command expects input -- on stdin format specifiers with a mapping in ftable are accepted and -- replaced by the given strings. E.g. if the ftable is [(s,Some -- subject)], then %s is replaced by Some subject parseCmd :: FTable -> String -> Either ParseError ([String], Bool) -- | for every mapping (c,s), add a mapping with uppercase c and the -- urlencoded string s addUrlencoded :: FTable -> FTable module HTTP fetchUrl :: String -> IO String postUrl :: String -> String -> String -> IO () request_url :: String -> FilePath -> a -> IO String wait_next_url :: IO (String, String) module Darcs.Ordered data EqCheck IsEq :: EqCheck NotEq :: EqCheck isEq :: EqCheck -> Bool data (:>) a1 a2 (:>) :: (a1) -> (a2) -> :> a1 a2 data (:<) a1 a2 (:<) :: (a1) -> (a2) -> :< a1 a2 data (:\/:) a1 a2 (:\/:) :: (a1) -> (a2) -> :\/: a1 a2 data (:/\:) a1 a2 (:/\:) :: (a1) -> (a2) -> :/\: a1 a2 data FL a (:>:) :: a -> FL a -> FL a NilFL :: FL a data RL a (:<:) :: a -> RL a -> RL a NilRL :: RL a data Proof a Proof :: a -> Proof a unsafeUnFL :: FL a -> [a] unsafeFL :: [a] -> FL a unsafeRL :: [a] -> RL a unsafeUnRL :: RL a -> [a] lengthFL :: FL a -> Int mapFL :: (a -> b) -> FL a -> [b] mapFL_FL :: (a -> b) -> FL a -> FL b spanFL :: (a -> Bool) -> FL a -> (FL a :> FL a) foldlFL :: (a -> b -> a) -> a -> FL b -> a allFL :: (a -> Bool) -> FL a -> Bool splitAtFL :: Int -> FL a -> (FL a :> FL a) bunchFL :: Int -> FL a -> FL (FL a) foldlRL :: (a -> b -> a) -> a -> RL b -> a lengthRL :: RL a -> Int isShorterThanRL :: RL a -> Int -> Bool mapRL :: (a -> b) -> RL a -> [b] mapRL_RL :: (a -> b) -> RL a -> RL b zipWithFL :: (a -> p -> q) -> [a] -> FL p -> FL q unsafeMap_l2f :: (a -> b) -> [a] -> FL b filterE :: (a -> EqCheck) -> [a] -> [Proof a] filterFL :: (p -> EqCheck) -> FL p -> FL p reverseFL :: FL a -> RL a reverseRL :: RL a -> FL a (+>+) :: FL a -> FL a -> FL a (+<+) :: RL a -> RL a -> RL a nullFL :: FL a -> Bool concatFL :: FL (FL a) -> FL a concatRL :: RL (RL a) -> RL a concatReverseFL :: FL (RL a) -> RL a headRL :: RL a -> FlippedSeal a class MyEq p unsafeCompare :: (MyEq p) => p -> p -> Bool (=\/=) :: (MyEq p) => p -> p -> EqCheck (=/\=) :: (MyEq p) => p -> p -> EqCheck consRLSealed :: a -> FlippedSeal (RL a) -> FlippedSeal (RL a) nullRL :: RL a -> Bool unsafeCoerceP :: a -> a unsafeCoerceP2 :: t -> t instance (Show2 a) => Show2 (FL a) instance (Show2 a) => Show (FL a) instance (Show2 a, Show2 b) => Show2 (a :\/: b) instance (Show2 a, Show2 b) => Show (a :\/: b) instance (Show2 a, Show2 b) => Show2 (a :> b) instance (Show2 a, Show2 b) => Show (a :> b) instance Show EqCheck instance Eq EqCheck -- | Path resolving: -- -- -- -- Examples: -- --
--   /usr/repo/foo                 -- local file
--   c:/src/darcs                  -- local file
--   http://darcs.net/             -- URL
--   peter@host:/path              -- ssh
--   droundy@host:                 -- ssh
--   host:/path                    -- ssh
--   
-- -- This means that single-letter hosts in ssh-paths do not work, unless a -- username is provided. -- -- Perhaps ssh-paths should use "ssh://user@host/path"-syntax -- instead? module Darcs.URL is_file :: String -> Bool is_url :: String -> Bool is_ssh :: String -> Bool is_relative :: String -> Bool is_absolute :: String -> Bool is_ssh_nopath :: String -> Bool module Darcs.RepoPath data AbsolutePath makeAbsolute :: AbsolutePath -> FilePath -> AbsolutePath -- | Interpret a possibly relative path wrt the current working directory ioAbsolute :: FilePath -> IO AbsolutePath rootDirectory :: AbsolutePath -- | Relative to the local darcs repository and normalized Note: these are -- understood not to have the dot in front data SubPath -- | Make the second path relative to the first, if possible makeSubPathOf :: AbsolutePath -> AbsolutePath -> Maybe SubPath simpleSubPath :: FilePath -> Maybe SubPath data AbsolutePathOrStd makeAbsoluteOrStd :: AbsolutePath -> String -> AbsolutePathOrStd ioAbsoluteOrStd :: String -> IO AbsolutePathOrStd useAbsoluteOrStd :: (AbsolutePath -> IO a) -> IO a -> AbsolutePathOrStd -> IO a data AbsoluteOrRemotePath ioAbsoluteOrRemote :: String -> IO AbsoluteOrRemotePath isRemote :: AbsoluteOrRemotePath -> Bool sp2fn :: SubPath -> FileName class FilePathOrURL a toPath :: (FilePathOrURL a) => a -> String class (FilePathOrURL a) => FilePathLike a toFilePath :: (FilePathLike a) => a -> FilePath getCurrentDirectory :: IO AbsolutePath setCurrentDirectory :: (FilePathLike p) => p -> IO () instance Eq AbsoluteOrRemotePath instance Ord AbsoluteOrRemotePath instance Eq AbsolutePathOrStd instance Ord AbsolutePathOrStd instance Eq AbsolutePath instance Ord AbsolutePath instance Eq SubPath instance Ord SubPath instance Show AbsoluteOrRemotePath instance Show AbsolutePathOrStd instance Show SubPath instance Show AbsolutePath instance (CharLike c) => FilePathLike [c] instance CharLike Char instance FilePathLike SubPath instance FilePathLike AbsolutePath instance FilePathLike FileName instance FilePathOrURL FileName instance FilePathOrURL AbsoluteOrRemotePath instance (CharLike c) => FilePathOrURL [c] instance FilePathOrURL SubPath instance FilePathOrURL AbsolutePath module Darcs.Flags -- | The DarcsFlag type is a list of all flags that can ever be -- passed to darcs, or to one of its commands. data DarcsFlag Help :: DarcsFlag ListOptions :: DarcsFlag NoTest :: DarcsFlag Test :: DarcsFlag HelpOnMatch :: DarcsFlag OnlyChangesToFiles :: DarcsFlag LeaveTestDir :: DarcsFlag NoLeaveTestDir :: DarcsFlag Timings :: DarcsFlag Debug :: DarcsFlag DebugVerbose :: DarcsFlag DebugHTTP :: DarcsFlag Verbose :: DarcsFlag NormalVerbosity :: DarcsFlag Quiet :: DarcsFlag Target :: String -> DarcsFlag Cc :: String -> DarcsFlag Output :: AbsolutePathOrStd -> DarcsFlag OutputAutoName :: AbsolutePath -> DarcsFlag Subject :: String -> DarcsFlag InReplyTo :: String -> DarcsFlag SendmailCmd :: String -> DarcsFlag Author :: String -> DarcsFlag PatchName :: String -> DarcsFlag OnePatch :: String -> DarcsFlag SeveralPatch :: String -> DarcsFlag AfterPatch :: String -> DarcsFlag UpToPatch :: String -> DarcsFlag TagName :: String -> DarcsFlag LastN :: Int -> DarcsFlag PatchIndexRange :: Int -> Int -> DarcsFlag NumberPatches :: DarcsFlag OneTag :: String -> DarcsFlag AfterTag :: String -> DarcsFlag UpToTag :: String -> DarcsFlag Context :: AbsolutePath -> DarcsFlag Count :: DarcsFlag LogFile :: AbsolutePath -> DarcsFlag RmLogFile :: DarcsFlag DistName :: String -> DarcsFlag All :: DarcsFlag Recursive :: DarcsFlag NoRecursive :: DarcsFlag Reorder :: DarcsFlag RestrictPaths :: DarcsFlag DontRestrictPaths :: DarcsFlag AskDeps :: DarcsFlag NoAskDeps :: DarcsFlag IgnoreTimes :: DarcsFlag LookForAdds :: DarcsFlag NoLookForAdds :: DarcsFlag AnyOrder :: DarcsFlag CreatorHash :: String -> DarcsFlag Intersection :: DarcsFlag Union :: DarcsFlag Complement :: DarcsFlag Sign :: DarcsFlag SignAs :: String -> DarcsFlag NoSign :: DarcsFlag SignSSL :: String -> DarcsFlag HappyForwarding :: DarcsFlag Verify :: AbsolutePath -> DarcsFlag VerifySSL :: AbsolutePath -> DarcsFlag SSHControlMaster :: DarcsFlag NoSSHControlMaster :: DarcsFlag EditDescription :: DarcsFlag NoEditDescription :: DarcsFlag Toks :: String -> DarcsFlag EditLongComment :: DarcsFlag NoEditLongComment :: DarcsFlag PromptLongComment :: DarcsFlag AllowConflicts :: DarcsFlag MarkConflicts :: DarcsFlag NoAllowConflicts :: DarcsFlag Boring :: DarcsFlag AllowCaseOnly :: DarcsFlag AllowWindowsReserved :: DarcsFlag DontGrabDeps :: DarcsFlag DontPromptForDependencies :: DarcsFlag PromptForDependencies :: DarcsFlag Compress :: DarcsFlag NoCompress :: DarcsFlag UnCompress :: DarcsFlag WorkRepoDir :: String -> DarcsFlag WorkRepoUrl :: String -> DarcsFlag RemoteRepo :: String -> DarcsFlag NewRepo :: String -> DarcsFlag Reply :: String -> DarcsFlag ApplyAs :: String -> DarcsFlag MachineReadable :: DarcsFlag HumanReadable :: DarcsFlag Pipe :: DarcsFlag Interactive :: DarcsFlag DiffCmd :: String -> DarcsFlag ExternalMerge :: String -> DarcsFlag Summary :: DarcsFlag NoSummary :: DarcsFlag Unified :: DarcsFlag Reverse :: DarcsFlag CheckPoint :: DarcsFlag Partial :: DarcsFlag Complete :: DarcsFlag Lazy :: DarcsFlag Ephemeral :: DarcsFlag FixFilePath :: AbsolutePath -> AbsolutePath -> DarcsFlag DiffFlags :: String -> DarcsFlag XMLOutput :: DarcsFlag ForceReplace :: DarcsFlag OnePattern :: PatchMatch -> DarcsFlag SeveralPattern :: PatchMatch -> DarcsFlag AfterPattern :: PatchMatch -> DarcsFlag UpToPattern :: PatchMatch -> DarcsFlag NonApply :: DarcsFlag NonVerify :: DarcsFlag NonForce :: DarcsFlag DryRun :: DarcsFlag SetDefault :: DarcsFlag NoSetDefault :: DarcsFlag FancyMoveAdd :: DarcsFlag NoFancyMoveAdd :: DarcsFlag Disable :: DarcsFlag SetScriptsExecutable :: DarcsFlag DontSetScriptsExecutable :: DarcsFlag UseHashedInventory :: DarcsFlag UseOldFashionedInventory :: DarcsFlag UseFormat2 :: DarcsFlag PristinePlain :: DarcsFlag PristineNone :: DarcsFlag NoUpdateWorking :: DarcsFlag Sibling :: AbsolutePath -> DarcsFlag Relink :: DarcsFlag RelinkPristine :: DarcsFlag NoLinks :: DarcsFlag Files :: DarcsFlag NoFiles :: DarcsFlag Directories :: DarcsFlag NoDirectories :: DarcsFlag Pending :: DarcsFlag NoPending :: DarcsFlag PosthookCmd :: String -> DarcsFlag NoPosthook :: DarcsFlag AskPosthook :: DarcsFlag RunPosthook :: DarcsFlag PrehookCmd :: String -> DarcsFlag NoPrehook :: DarcsFlag AskPrehook :: DarcsFlag RunPrehook :: DarcsFlag UMask :: String -> DarcsFlag StoreInMemory :: DarcsFlag HTTPPipelining :: DarcsFlag NoHTTPPipelining :: DarcsFlag NoCache :: DarcsFlag AllowUnrelatedRepos :: DarcsFlag NullFlag :: DarcsFlag data Compression NoCompression :: Compression GzipCompression :: Compression compression :: [DarcsFlag] -> Compression want_external_merge :: [DarcsFlag] -> Maybe String isInteractive :: [DarcsFlag] -> Bool instance Eq DarcsFlag instance Show DarcsFlag module Darcs.Utils 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) -- | Returns Just l where l is first non-blank string in input array; -- Nothing if no non-blank entries firstNotBlank :: [String] -> Maybe String -- | 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. firstJustM :: (Monad m) => [m (Maybe a)] -> m (Maybe a) -- | 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. 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 module Darcs.Compat stdout_is_a_pipe :: IO Bool mk_stdout_temp :: String -> IO String canonFilename :: FilePath -> IO FilePath maybeRelink :: String -> String -> IO Bool atomic_create :: FilePath -> IO () sloppy_atomic_create :: FilePath -> IO () module Darcs.Lock withLock :: String -> IO a -> IO a -- | Tries to perform some task if it can obtain the lock, Otherwise, just -- gives up without doing the task withLockCanFail :: String -> IO a -> IO (Either () a) -- | withTemp safely creates an empty file (not open for writing) -- and returns its name. -- -- The temp file operations are rather similar to the locking operations, -- in that they both should always try to clean up, so exitWith causes -- trouble. withTemp :: (String -> IO a) -> IO a -- | withOpenTemp creates an already open temporary file. Both of -- them run their argument and then delete the file. Also, both of them -- (to my knowledge) are not susceptible to race conditions on the -- temporary file (as long as you never delete the temporary file; that -- would reintroduce a race condition). withOpenTemp :: ((Handle, String) -> IO a) -> IO a withStdoutTemp :: (String -> IO a) -> IO a -- | withTempDir creates an empty directory and then removes it when -- it is no longer needed. withTempDir creates a temporary directory. The -- location of that directory is determined by the contents of -- _darcsprefstmpdir, if it exists, otherwise by -- $DARCS_TMPDIR, and if that doesn't exist then whatever your -- operating system considers to be a a temporary directory (e.g. -- $TMPDIR under Unix, $TEMP under Windows). -- -- If none of those exist it creates the temporary directory in the -- current directory, unless the current directory is under a _darcs -- directory, in which case the temporary directory in the parent of the -- highest _darcs directory to avoid accidentally corrupting darcs's -- internals. This should not fail, but if it does indeed fail, we go -- ahead and use the current directory anyway. If -- $DARCS_KEEP_TMPDIR variable is set temporary directory is not -- removed, this can be useful for debugging. withTempDir :: String -> (AbsolutePath -> IO a) -> IO a -- | withPermDir is like withTempDir, except that it doesn't -- delete the directory afterwards. withPermDir :: String -> (AbsolutePath -> IO a) -> IO a withDelayedDir :: String -> (AbsolutePath -> IO a) -> IO a withNamedTemp :: String -> (String -> IO a) -> IO a writeToFile :: (FilePathLike p) => p -> (Handle -> IO ()) -> IO () appendToFile :: (FilePathLike p) => p -> (Handle -> IO ()) -> IO () writeBinFile :: (FilePathLike p) => p -> String -> IO () writeDocBinFile :: (FilePathLike p) => p -> Doc -> IO () appendBinFile :: (FilePathLike p) => p -> String -> IO () appendDocBinFile :: (FilePathLike p) => p -> Doc -> IO () readBinFile :: (FilePathLike p) => p -> IO String readDocBinFile :: (FilePathLike p) => p -> IO Doc writeAtomicFilePS :: (FilePathLike p) => p -> ByteString -> IO () gzWriteAtomicFilePS :: (FilePathLike p) => p -> ByteString -> IO () gzWriteAtomicFilePSs :: (FilePathLike p) => p -> [ByteString] -> IO () gzWriteDocFile :: (FilePathLike p) => p -> Doc -> IO () rm_recursive :: FilePath -> IO () removeFileMayNotExist :: (FilePathLike p) => p -> IO () canonFilename :: FilePath -> IO FilePath maybeRelink :: String -> String -> IO Bool world_readable_temp :: String -> IO String tempdir_loc :: IO FilePath module URL copyUrl :: String -> FilePath -> Cachable -> IO () copyUrlFirst :: String -> FilePath -> Cachable -> IO () pipeliningEnabledByDefault :: Bool setDebugHTTP :: IO () setHTTPPipelining :: Bool -> IO () waitUrl :: String -> IO () data Cachable Cachable :: Cachable Uncachable :: Cachable MaxAge :: !CInt -> Cachable instance Eq Priority instance Show Cachable instance Eq Cachable module Darcs.CheckFileSystem can_I_use_mmap :: IO Bool module Darcs.Patch.Info data PatchInfo patchinfo :: String -> String -> String -> [String] -> IO PatchInfo invert_name :: PatchInfo -> PatchInfo is_inverted :: PatchInfo -> Bool idpatchinfo :: PatchInfo add_junk :: PatchInfo -> IO PatchInfo make_filename :: PatchInfo -> String make_alt_filename :: PatchInfo -> String readPatchInfo :: ByteString -> Maybe (PatchInfo, ByteString) just_name :: PatchInfo -> String just_author :: PatchInfo -> String repopatchinfo :: String -> PatchInfo -> RepoPatchInfo data RepoPatchInfo human_friendly :: PatchInfo -> Doc to_xml :: PatchInfo -> Doc pi_date :: PatchInfo -> CalendarTime set_pi_date :: String -> PatchInfo -> PatchInfo pi_name :: PatchInfo -> String pi_rename :: PatchInfo -> String -> PatchInfo pi_author :: PatchInfo -> String pi_tag :: PatchInfo -> Maybe String pi_log :: PatchInfo -> [String] -- | Patch is stored between square brackets. -- --
--   [ <patch name>
--   <patch author>*<patch date>
--    <patch log (may be empty)> (indented one)
--    <can have multiple lines in patch log,>
--    <as long as they're preceded by a space>
--    <and don't end with a square bracket.>
--   ]
--   
-- -- note that below I assume the name has no newline in it. showPatchInfo :: PatchInfo -> Doc is_tag :: PatchInfo -> Bool instance Eq PatchInfo instance Ord PatchInfo instance Show PatchInfo instance HTML RepoPatchInfo module Darcs.PopulationData -- | the population of a darcs repository (simpler Slurpy) data Population Pop :: PatchInfo -> PopTree -> Population -- | the state when last modified popState :: Population -> PatchInfo -- | the directory listing popTree :: Population -> PopTree -- | directory listing data PopTree PopDir :: !Info -> ![PopTree] -> PopTree PopFile :: !Info -> PopTree data Info Info :: !ByteString -> !PatchInfo -> !DirMark -> !Maybe PatchInfo -> !Maybe ByteString -> Info -- | name of the element nameI :: Info -> !ByteString -- | last patch modifying this element modifiedByI :: Info -> !PatchInfo -- | how was it modified modifiedHowI :: Info -> !DirMark -- | this can be unknown when restored backwards! createdByI :: Info -> !Maybe PatchInfo -- | the original name of the element creationNameI :: Info -> !Maybe ByteString setPopState :: PatchInfo -> Population -> Population -- | was an Info record not modified? notModified :: Info -> Bool -- | set the modifier for an Info record setState :: Info -> PatchInfo -> Info -- | info of a directory member data DirMark AddedFile :: DirMark RemovedFile :: DirMark MovedFile :: String -> DirMark ModifiedFile :: DirMark DullFile :: DirMark AddedDir :: DirMark RemovedDir :: DirMark MovedDir :: !String -> DirMark DullDir :: DirMark -- | read the population from a given directory dirname all -- folders and documents get the given time t -- -- This needs to be here in order to avoid a circular dependency between -- Population and Pristine. getPopFrom :: FilePath -> PatchInfo -> IO Population instance Ord Info instance Eq Info instance Ord DirMark instance Eq DirMark instance Ord PopTree instance Eq PopTree instance Show Population instance Eq Population instance Show DirMark instance Show Info instance Show PopTree -- | LCS stands for Longest Common Subsequence, and it is a relatively -- challenging problem to find an LCS efficiently. This module implements -- the algorithm described in: -- -- An O(ND) Difference Algorithm and its Variations, Eugene Myers, -- Algorithmica Vol. 1 No. 2, 1986, pp. 251-266; especially the variation -- described in section 4.2 and most refinements implemented in GNU diff -- (D is the edit-distance). -- -- There is currently no heuristic to reduce the running time and produce -- suboptimal output for large inputs with many differences. It behaves -- like GNU diff with the -d option in this regard. -- -- In the first step, a hash value for every line is calculated and -- collisions are marked with a special value. This reduces a string -- comparison to an int comparison for line tuples where at least one of -- the hash values is not equal to the special value. After that, lines -- which only exists in one of the files are removed and marked as -- changed which reduces the running time of the following difference -- algorithm. GNU diff additionally removes lines that appear very often -- in the other file in some cases. The last step tries to create longer -- changed regions and line up deletions in the first file to insertions -- in the second by shifting changed lines forward and backward. module Lcs -- | create a list of changes between a and b, each change has the form -- (starta, lima, startb, limb) which means that a[starta, lima) has to -- be replaced by b[startb, limb) getChanges :: [ByteString] -> [ByteString] -> [(Int, [ByteString], [ByteString])] aLen :: (IArray a e) => a Int e -> Int type BArray = UArray Int Bool type PArray = Array Int ByteString type BSTArray s = STUArray s Int Bool -- | try to create nicer diffs by shifting around regions of changed lines shiftBoundaries :: BSTArray s -> BSTArray s -> PArray -> Int -> Int -> ST s () module Ssh grabSSH :: String -> Connection -> IO ByteString runSSH :: SSHCmd -> String -> [String] -> [String] -> Redirects -> IO ExitCode -- | Return the command and arguments needed to run an ssh command along -- with any extra features like use of the control master. See -- getSSHOnly getSSH :: SSHCmd -> String -> IO (String, [String]) copySSH :: String -> FilePath -> IO () copySSHs :: String -> [String] -> FilePath -> IO () data SSHCmd SSH :: SSHCmd SCP :: SSHCmd SFTP :: SSHCmd instance Show SSHCmd module Darcs.External backupByRenaming :: FilePath -> IO () backupByCopying :: FilePath -> IO () copyFileOrUrl :: [DarcsFlag] -> FilePath -> FilePath -> Cachable -> IO () speculateFileOrUrl :: String -> FilePath -> IO () copyFilesOrUrls :: [DarcsFlag] -> FilePath -> [String] -> FilePath -> Cachable -> IO () copyLocal :: [DarcsFlag] -> String -> FilePath -> IO () cloneFile :: FilePath -> FilePath -> IO () cloneTree :: FilePath -> FilePath -> IO () cloneTreeExcept :: [FilePath] -> FilePath -> FilePath -> IO () clonePartialsTree :: FilePath -> FilePath -> [FilePath] -> IO () clonePaths :: FilePath -> FilePath -> [FilePath] -> IO () -- | fetchFile fileOrUrl cache returns the content of its argument -- (either a file or an URL). If it has to download an url, then it will -- use a cache as required by its second argument. fetchFilePS :: String -> Cachable -> IO ByteString gzFetchFilePS :: String -> Cachable -> IO ByteString sendEmail :: String -> String -> String -> String -> String -> String -> IO () generateEmail :: Handle -> String -> String -> String -> String -> Doc -> IO () -- | Send an email, optionally containing a patch bundle (more precisely, -- its description and the bundle itself) sendEmailDoc :: String -> String -> String -> String -> String -> Maybe (Doc, Doc) -> Doc -> IO () resendEmail :: String -> String -> ByteString -> IO () signString :: [DarcsFlag] -> Doc -> IO Doc verifyPS :: [DarcsFlag] -> ByteString -> IO (Maybe ByteString) execDocPipe :: String -> [String] -> Doc -> IO Doc execPipeIgnoreError :: String -> [String] -> Doc -> IO Doc getTermNColors :: IO Int pipeDoc :: String -> [String] -> Doc -> IO ExitCode pipeDocSSH :: String -> [String] -> Doc -> IO ExitCode -- | Run a command on a remote location without passing it any input or -- reading its output. Return its ExitCode execSSH :: String -> String -> IO ExitCode maybeURLCmd :: String -> String -> IO (Maybe (String)) data Cachable Cachable :: Cachable Uncachable :: Cachable MaxAge :: !CInt -> Cachable viewDoc :: Doc -> IO () viewDocWith :: Printers -> Doc -> IO () module Darcs.ColorPrinter errorDoc :: Doc -> a traceDoc :: Doc -> a -> a assertDoc :: Maybe Doc -> a -> a -- | fancyPrinters h returns a set of printers suitable for -- outputting to h fancyPrinters :: Printers instance Show Doc module Darcs.IO class (Functor m, MonadPlus m) => ReadableDirectory m mDoesDirectoryExist :: (ReadableDirectory m) => FileName -> m Bool mDoesFileExist :: (ReadableDirectory m) => FileName -> m Bool mInCurrentDirectory :: (ReadableDirectory m) => FileName -> m a -> m a mGetDirectoryContents :: (ReadableDirectory m) => m [FileName] mReadBinFile :: (ReadableDirectory m) => FileName -> m String mReadFilePS :: (ReadableDirectory m) => FileName -> m ByteString mReadFilePSs :: (ReadableDirectory m) => FileName -> m [ByteString] class (ReadableDirectory m) => WriteableDirectory m mWithCurrentDirectory :: (WriteableDirectory m) => FileName -> m a -> m a mSetFileExecutable :: (WriteableDirectory m) => FileName -> Bool -> m () mWriteBinFile :: (WriteableDirectory m) => FileName -> String -> m () mWriteFilePS :: (WriteableDirectory m) => FileName -> ByteString -> m () mWriteFilePSs :: (WriteableDirectory m) => FileName -> [ByteString] -> m () mCreateDirectory :: (WriteableDirectory m) => FileName -> m () mRemoveDirectory :: (WriteableDirectory m) => FileName -> m () mWriteDoc :: (WriteableDirectory m) => FileName -> Doc -> m () mCreateFile :: (WriteableDirectory m) => FileName -> m () mRemoveFile :: (WriteableDirectory m) => FileName -> m () mRename :: (WriteableDirectory m) => FileName -> FileName -> m () mModifyFilePS :: (WriteableDirectory m) => FileName -> (ByteString -> m ByteString) -> m () mModifyFilePSs :: (WriteableDirectory m) => FileName -> ([ByteString] -> m [ByteString]) -> m () data TolerantIO a runTolerantly :: TolerantIO a -> IO a runSilently :: SilentIO a -> IO a instance WriteableDirectory SilentIO instance WriteableDirectory TolerantIO instance ReadableDirectory SilentIO instance ReadableDirectory TolerantIO instance MonadPlus SilentIO instance MonadPlus TolerantIO instance Monad SilentIO instance Functor SilentIO instance Monad TolerantIO instance Functor TolerantIO instance TolerantMonad SilentIO instance TolerantMonad TolerantIO instance WriteableDirectory IO instance ReadableDirectory IO module Darcs.FilePathMonad data FilePathMonad a withFilePaths :: [FilePath] -> FilePathMonad a -> [FilePath] instance WriteableDirectory FilePathMonad instance ReadableDirectory FilePathMonad instance MonadPlus FilePathMonad instance Monad FilePathMonad instance Functor FilePathMonad -- | SlurpDirectory is intended to give a nice lazy way of traversing -- directory trees. module Darcs.SlurpDirectory.Internal data Slurpy Slurpy :: !FileName -> !SlurpyContents -> Slurpy data SlurpyContents SlurpDir :: (Maybe String) -> SlurpyMap -> SlurpyContents SlurpFile :: (Maybe String, EpochTime, FileOffset) -> FileContents -> SlurpyContents slurpies_to_map :: [Slurpy] -> SlurpyMap map_to_slurpies :: SlurpyMap -> [Slurpy] type FileContents = ByteString empty_slurpy :: Slurpy slurp :: (FilePathLike p) => p -> IO Slurpy mmap_slurp :: FilePath -> IO Slurpy slurp_unboring :: (FilePath -> Bool) -> FilePath -> IO Slurpy co_slurp :: Slurpy -> FilePath -> IO Slurpy slurp_name :: Slurpy -> FilePath is_file :: Slurpy -> Bool is_dir :: Slurpy -> Bool get_filecontents :: Slurpy -> FileContents get_dircontents :: Slurpy -> [Slurpy] get_mtime :: Slurpy -> EpochTime get_length :: Slurpy -> FileOffset get_slurp :: FileName -> Slurpy -> Maybe Slurpy slurp_removefile :: FileName -> Slurpy -> Maybe Slurpy slurp_removedir :: FileName -> Slurpy -> Maybe Slurpy -- | A variant of get_slurp_context that allows for replacing the -- child slurpy by a list of slurpies. The result of the update function -- will always be a singleton list unless the child slurpy was at the top -- level. Currently unused. get_slurp_context_list :: FileName -> -- Slurpy -> Maybe ([Slurpy] -> [Slurpy], Slurpy) -- get_slurp_context_list = get_slurp_context_generic return id -- -- It is important to be able to readily modify a slurpy. slurp_remove :: FileName -> Slurpy -> Maybe Slurpy -- | Code to modify a given file in a slurpy. slurp_modfile :: FileName -> (FileContents -> Maybe FileContents) -> Slurpy -> Maybe Slurpy slurp_hasfile :: FileName -> Slurpy -> Bool slurp_hasdir :: FileName -> Slurpy -> Bool slurp_has_anycase :: FilePath -> Slurpy -> Bool wait_a_moment :: IO () undefined_time :: EpochTime undefined_size :: FileOffset slurp_has :: FilePath -> Slurpy -> Bool list_slurpy :: Slurpy -> [FilePath] list_slurpy_files :: Slurpy -> [FilePath] get_path_list :: Slurpy -> FilePath -> [FilePath] list_slurpy_dirs :: Slurpy -> [FilePath] isFileReallySymlink :: FilePath -> IO Bool doesFileReallyExist :: FilePath -> IO Bool doesDirectoryReallyExist :: FilePath -> IO Bool data SlurpMonad a withSlurpy :: Slurpy -> SlurpMonad a -> Either String (Slurpy, a) write_files :: Slurpy -> [FilePath] -> IO () writeSlurpy :: Slurpy -> FilePath -> IO () syncSlurpy :: (Slurpy -> IO Slurpy) -> Slurpy -> IO Slurpy instance WriteableDirectory SlurpMonad instance ReadableDirectory SlurpMonad instance MonadPlus SlurpMonad instance Monad SlurpMonad instance Functor SlurpMonad instance Ord Slurpy instance Eq Slurpy instance Show Slurpy module Darcs.SlurpDirectory data Slurpy empty_slurpy :: Slurpy slurp :: (FilePathLike p) => p -> IO Slurpy mmap_slurp :: FilePath -> IO Slurpy co_slurp :: Slurpy -> FilePath -> IO Slurpy slurp_unboring :: (FilePath -> Bool) -> FilePath -> IO Slurpy type FileContents = ByteString undefined_time :: EpochTime undefined_size :: FileOffset doesFileReallyExist :: FilePath -> IO Bool doesDirectoryReallyExist :: FilePath -> IO Bool isFileReallySymlink :: FilePath -> IO Bool wait_a_moment :: IO () is_dir :: Slurpy -> Bool is_file :: Slurpy -> Bool get_slurp :: FileName -> Slurpy -> Maybe Slurpy slurp_name :: Slurpy -> FilePath slurp_has :: FilePath -> Slurpy -> Bool slurp_has_anycase :: FilePath -> Slurpy -> Bool slurp_hasfile :: FileName -> Slurpy -> Bool slurp_hasdir :: FileName -> Slurpy -> Bool list_slurpy :: Slurpy -> [FilePath] list_slurpy_files :: Slurpy -> [FilePath] list_slurpy_dirs :: Slurpy -> [FilePath] get_path_list :: Slurpy -> FilePath -> [FilePath] get_filecontents :: Slurpy -> FileContents get_dircontents :: Slurpy -> [Slurpy] get_mtime :: Slurpy -> EpochTime get_length :: Slurpy -> FileOffset -- | Code to modify a given file in a slurpy. slurp_modfile :: FileName -> (FileContents -> Maybe FileContents) -> Slurpy -> Maybe Slurpy -- | A variant of get_slurp_context that allows for replacing the -- child slurpy by a list of slurpies. The result of the update function -- will always be a singleton list unless the child slurpy was at the top -- level. Currently unused. get_slurp_context_list :: FileName -> -- Slurpy -> Maybe ([Slurpy] -> [Slurpy], Slurpy) -- get_slurp_context_list = get_slurp_context_generic return id -- -- It is important to be able to readily modify a slurpy. slurp_remove :: FileName -> Slurpy -> Maybe Slurpy slurp_removefile :: FileName -> Slurpy -> Maybe Slurpy slurp_removedir :: FileName -> Slurpy -> Maybe Slurpy write_files :: Slurpy -> [FilePath] -> IO () data SlurpMonad a withSlurpy :: Slurpy -> SlurpMonad a -> Either String (Slurpy, a) writeSlurpy :: Slurpy -> FilePath -> IO () syncSlurpy :: (Slurpy -> IO Slurpy) -> Slurpy -> IO Slurpy module Darcs.Patch.Patchy class (Apply p, Commute p, ShowPatch p, ReadPatch p, Invert p) => Patchy p class Apply p apply :: (Apply p, WriteableDirectory m) => [DarcsFlag] -> p -> m () applyAndTryToFix :: (Apply p, WriteableDirectory m) => p -> m (Maybe (String, p)) applyAndTryToFixFL :: (Apply p, WriteableDirectory m) => p -> m (Maybe (String, FL p)) mapMaybeSnd :: (a -> b) -> Maybe (c, a) -> Maybe (c, b) class Commute p commute :: (Commute p) => (p :> p) -> Maybe ((p :> p)) commutex :: (Commute p) => (p :< p) -> Maybe ((p :< p)) merge :: (Commute p) => (p :\/: p) -> (p :/\: p) list_touched_files :: (Commute p) => p -> [FilePath] commuteFL :: (Commute p) => (p :> FL p) -> Either (Sealed2 p) ((FL p :> p)) commuteRL :: (Commute p) => (RL p :> p) -> Maybe ((p :> RL p)) commuteRLFL :: (Commute p) => (RL p :> FL p) -> Maybe ((FL p :> RL p)) mergeFL :: (Commute p) => (p :\/: FL p) -> (FL p :/\: p) class (Commute p) => ShowPatch p showPatch :: (ShowPatch p) => p -> Doc showNicely :: (ShowPatch p) => p -> Doc showContextPatch :: (ShowPatch p) => Slurpy -> p -> Doc description :: (ShowPatch p) => p -> Doc summary :: (ShowPatch p) => p -> Doc writePatch :: (ShowPatch p) => FilePath -> p -> IO () gzWritePatch :: (ShowPatch p) => FilePath -> p -> IO () thing :: (ShowPatch p) => p -> String things :: (ShowPatch p) => p -> String class ReadPatch p readPatch' :: (ReadPatch p, ParserM m) => Bool -> m (Maybe (Sealed (p))) bracketedFL :: (ReadPatch p, ParserM m) => Word8 -> Word8 -> m (Maybe (Sealed (FL p))) peekfor :: (ParserM m) => String -> m a -> m a -> m a class (MyEq p) => Invert p invert :: (Invert p) => p -> p identity :: (Invert p) => p sloppyIdentity :: (Invert p) => p -> EqCheck invertFL :: (Invert p) => FL p -> RL p invertRL :: (Invert p) => RL p -> FL p instance (ReadPatch p) => ReadPatch (RL p) instance (Commute p) => Commute (RL p) instance (Apply p) => Apply (RL p) instance (ReadPatch p) => ReadPatch (FL p) instance (Commute p) => Commute (FL p) instance (Apply p) => Apply (FL p) module Darcs.Patch.Permutations removeFL :: (MyEq p, Commute p) => p -> FL p -> Maybe (FL p) removeRL :: (MyEq p, Commute p) => p -> RL p -> Maybe (RL p) removeCommon :: (MyEq p, Commute p) => (FL p :\/: FL p) -> (FL p :\/: FL p) commuteWhatWeCanFL :: (Commute p) => (p :> FL p) -> (FL p :> (p :> FL p)) commuteWhatWeCanRL :: (Commute p) => (RL p :> p) -> (RL p :> (p :> RL p)) genCommuteWhatWeCanRL :: (((p :> p) -> Maybe ((p :> p)))) -> (RL p :> p) -> (RL p :> (p :> RL p)) -- | split an FL into left and right lists according -- to a predicate, using commutation as necessary. If a patch does -- satisfy the predicate but cannot be commuted past one that does not -- satisfy the predicate, it goes in the right list. partitionFL :: (Commute p) => (p -> Bool) -> FL p -> (FL p :> FL p) -- | split an RL into left and right lists according -- to a predicate, using commutation as necessary. If a patch does -- satisfy the predicate but cannot be commuted past one that does not -- satisfy the predicate, it goes in the left list. partitionRL :: (Commute p) => (p -> Bool) -> RL p -> (RL p :> RL p) head_permutationsFL :: (Commute p) => FL p -> [FL p] head_permutationsRL :: (Commute p) => RL p -> [RL p] headPermutationsFL :: (Commute p) => FL p -> [(p :> FL p)] remove_subsequenceFL :: (MyEq p, Commute p) => FL p -> FL p -> Maybe (FL p) remove_subsequenceRL :: (MyEq p, Commute p) => RL p -> RL p -> Maybe (RL p) instance (Commute p, Invert p) => Invert (RL p) instance (MyEq p, Commute p) => MyEq (RL p) instance (Invert p, Commute p) => Invert (FL p) instance (MyEq p, Commute p) => MyEq (FL p) module Darcs.Patch.Prim data Prim Move :: !FileName -> !FileName -> Prim DP :: !FileName -> !DirPatchType -> Prim FP :: !FileName -> !FilePatchType -> Prim Split :: FL Prim -> Prim Identity :: Prim ChangePref :: !String -> !String -> !String -> Prim data IsConflictedPrim IsC :: !ConflictState -> !Prim -> IsConflictedPrim data ConflictState Okay :: ConflictState Conflicted :: ConflictState Duplicated :: ConflictState showPrim :: FileNameFormat -> Prim -> Doc data DirPatchType RmDir :: DirPatchType AddDir :: DirPatchType data FilePatchType RmFile :: FilePatchType AddFile :: FilePatchType Hunk :: !Int -> [ByteString] -> [ByteString] -> FilePatchType TokReplace :: !String -> !String -> !String -> FilePatchType Binary :: ByteString -> ByteString -> FilePatchType type CommuteFunction = (Prim :< Prim) -> Perhaps ((Prim :< Prim)) data Perhaps a Unknown :: Perhaps a Failed :: Perhaps a Succeeded :: a -> Perhaps a null_patch :: Prim nullP :: Prim -> EqCheck is_null_patch :: Prim -> Bool is_identity :: Prim -> EqCheck formatFileName :: FileNameFormat -> FileName -> Doc data FileNameFormat OldFormat :: FileNameFormat NewFormat :: FileNameFormat adddir :: FilePath -> Prim addfile :: FilePath -> Prim binary :: FilePath -> ByteString -> ByteString -> Prim changepref :: String -> String -> String -> Prim hunk :: FilePath -> Int -> [ByteString] -> [ByteString] -> Prim move :: FilePath -> FilePath -> Prim rmdir :: FilePath -> Prim rmfile :: FilePath -> Prim tokreplace :: FilePath -> String -> String -> String -> Prim is_addfile :: Prim -> Bool is_hunk :: Prim -> Bool is_binary :: Prim -> Bool is_setpref :: Prim -> Bool -- | Tells you if two patches are in the same category, human-wise. -- Currently just returns true if they are filepatches on the same file. is_similar :: Prim -> Prim -> Bool is_adddir :: Prim -> Bool is_filepatch :: Prim -> Maybe FileName canonize :: Prim -> FL Prim try_to_shrink :: FL Prim -> FL Prim modernizePrim :: Prim -> FL Prim subcommutes :: [(String, CommuteFunction)] -- | sort_coalesceFL ps coalesces as many patches in -- ps as possible, sorting the results according to the scheme -- defined in comparePrim sort_coalesceFL :: FL Prim -> FL Prim join :: (Prim :> Prim) -> Maybe (Prim) applyBinary :: ByteString -> ByteString -> FileContents -> Maybe FileContents try_tok_internal :: String -> ByteString -> ByteString -> ByteString -> Maybe [ByteString] try_shrinking_inverse :: FL Prim -> Maybe (FL Prim) class FromPrim p fromPrim :: (FromPrim p) => Prim -> p class FromPrims p fromPrims :: (FromPrims p) => FL Prim -> p joinPatches :: (FromPrims p) => FL p -> p class (FromPrim p) => ToFromPrim p toPrim :: (ToFromPrim p) => p -> Maybe (Prim) class (Invert p, Commute p, Effect p) => Conflict p list_conflicted_files :: (Conflict p) => p -> [FilePath] resolve_conflicts :: (Conflict p) => p -> [[Sealed (FL Prim)]] commute_no_conflicts :: (Conflict p) => (p :> p) -> Maybe ((p :> p)) conflictedEffect :: (Conflict p) => p -> [IsConflictedPrim] class Effect p effect :: (Effect p) => p -> FL Prim effectRL :: (Effect p) => p -> RL Prim isHunk :: (Effect p) => p -> Maybe (Prim) commute_no_conflictsFL :: (Conflict p) => (p :> FL p) -> Maybe ((FL p :> p)) commute_no_conflictsRL :: (Conflict p) => (RL p :> p) -> Maybe ((p :> RL p)) instance Eq ConflictState instance Ord ConflictState instance Show ConflictState instance Read ConflictState instance Show Simple instance Eq DirPatchType instance Ord DirPatchType instance Eq FilePatchType instance Ord FilePatchType instance (Effect p) => Effect (RL p) instance (Effect p) => Effect (FL p) instance Conflict Prim instance Effect Prim instance (Conflict p) => Conflict (RL p) instance (Conflict p) => Conflict (FL p) instance (FromPrim p) => FromPrims (RL p) instance (FromPrim p) => FromPrims (FL p) instance ToFromPrim Prim instance FromPrim Prim instance MyEq Prim instance Commute Prim instance MonadPlus Perhaps instance Monad Perhaps instance Show DirPatchType instance Show FilePatchType instance Show2 Prim instance Show Prim instance Invert Prim instance MyEq DirPatchType instance MyEq FilePatchType module Darcs.Patch.Core data Patch PP :: Prim -> Patch ComP :: FL Patch -> Patch Merger :: Patch -> RL Patch -> Patch -> Patch -> Patch Regrem :: Patch -> RL Patch -> Patch -> Patch -> Patch data Named p NamedP :: !PatchInfo -> ![PatchInfo] -> !p -> Named p join_patchesFL :: FL Patch -> Patch concatFL :: FL (FL a) -> FL a flattenFL :: Patch -> FL Patch nullP :: Patch -> EqCheck is_null_patch :: Patch -> Bool infopatch :: (Patchy p) => PatchInfo -> p -> Named p n_fn :: FilePath -> FilePath adddeps :: Named p -> [PatchInfo] -> Named p namepatch :: (Patchy p) => String -> String -> String -> [String] -> p -> IO (Named p) anonymous :: (Patchy p) => p -> IO (Named p) merger_undo :: Patch -> Patch is_merger :: Patch -> Bool getdeps :: Named p -> [PatchInfo] patch2patchinfo :: Named p -> PatchInfo patchname :: Named p -> String patchcontents :: Named p -> p instance (Effect p) => Effect (Named p) instance FromPrim Patch module Darcs.Patch.Show showPatch_ :: Patch -> Doc showNamedPrefix :: PatchInfo -> [PatchInfo] -> Doc instance Show Patch module Darcs.Patch.Commute fromPrims :: (FromPrims p) => FL Prim -> p modernize_patch :: Patch -> Patch merge :: (Commute p) => (p :\/: p) -> (p :/\: p) elegant_merge :: (Patch :\/: Patch) -> Maybe ((Patch :/\: Patch)) merger :: String -> Patch -> Patch -> Patch unravel :: Patch -> [FL Prim] public_unravel :: Patch -> [Sealed (FL Prim)] mangle_unravelled :: [Sealed (FL Prim)] -> Sealed (FL Prim) type CommuteFunction = (Patch :< Patch) -> Perhaps ((Patch :< Patch)) data Perhaps a Unknown :: Perhaps a Failed :: Perhaps a Succeeded :: a -> Perhaps a toMaybe :: Perhaps a -> Maybe a instance (MyEq p) => MyEq (Named p) instance MyEq Patch instance Invert Patch instance (Invert p) => Invert (Named p) instance FromPrims Patch instance Effect Patch instance Conflict Patch instance Commute Patch instance (Conflict p) => Conflict (Named p) instance (Commute p) => Commute (Named p) instance MonadPlus Perhaps instance Monad Perhaps module Darcs.Patch.Read readPrim :: (ParserM m) => FileNameFormat -> Bool -> m (Maybe (Sealed (Prim))) readPatch :: (ReadPatch p) => ByteString -> Maybe (Sealed (p), ByteString) instance ReadPatch Patch instance ReadPatch Prim instance (ReadPatch p) => ReadPatch (Named p) -- | This module is used by the push and put commands to apply the a bundle -- to a remote repository. By remote I do not necessarily mean a -- repository on another machine, it is just not the repository we're -- located in. module Darcs.RemoteApply remote_apply :: [DarcsFlag] -> String -> Doc -> IO ExitCode apply_as :: [DarcsFlag] -> Maybe String module Darcs.Repository.Cache -- | cacheHash computes the cache hash (i.e. filename) of a packed -- string. cacheHash :: ByteString -> String okayHash :: String -> Bool takeHash :: ByteString -> Maybe (String, ByteString) newtype Cache Ca :: [CacheLoc] -> Cache data CacheType Repo :: CacheType Directory :: CacheType data CacheLoc Cache :: !CacheType -> !WritableOrNot -> !String -> CacheLoc data WritableOrNot Writable :: WritableOrNot NotWritable :: WritableOrNot data HashedDir HashedPristineDir :: HashedDir HashedPatchesDir :: HashedDir HashedInventoriesDir :: HashedDir hashedDir :: HashedDir -> String unionCaches :: Cache -> Cache -> Cache cleanCaches :: Cache -> HashedDir -> IO () cleanCachesWithHint :: Cache -> HashedDir -> [String] -> IO () fetchFileUsingCache :: Cache -> HashedDir -> String -> IO (String, ByteString) -- | speculateFileUsingCache cache subdirectory name takes note -- that the file name is likely to be useful soon: pipelined -- downloads will add it to the (low-priority) queue, for the rest it is -- a noop. speculateFileUsingCache :: Cache -> HashedDir -> String -> IO () -- | writeFileUsingCache cache compression subdir contents write -- the string contents to the directory subdir, except if it is -- already in the cache, in which case it is a noop. Warning (?) this -- means that in case of a hash collision, writing using -- writeFileUsingCache is a noop. The returned value is the filename that -- was given to the string. writeFileUsingCache :: Cache -> Compression -> HashedDir -> ByteString -> IO String findFileMtimeUsingCache :: Cache -> HashedDir -> String -> IO EpochTime setFileMtimeUsingCache :: Cache -> HashedDir -> String -> EpochTime -> IO () -- | peekInCache cache subdir hash tells whether cache -- and contains an object with hash hash in a writable position. -- Florent: why do we want it to be in a writable position? peekInCache :: Cache -> HashedDir -> String -> IO Bool repo2cache :: String -> Cache instance Eq FromWhere instance Eq OrOnlySpeculate instance Eq CacheType instance Show CacheType instance Show WritableOrNot instance Show Cache instance Show CacheLoc instance Eq CacheLoc module Darcs.Repository.Format -- | RepoFormat is the representation of the format of a -- repository. Each sublist corresponds to a line in the format file. -- Each line is decomposed into words. newtype RepoFormat RF :: [[ByteString]] -> RepoFormat data RepoProperty Darcs1_0 :: RepoProperty Darcs2 :: RepoProperty HashedInventory :: RepoProperty -- | identifyRepoFormat URL identifies the format of the -- repository at the given address. Return Left reason if it -- fails, where reason explains why we weren't able to identify -- the format. identifyRepoFormat :: String -> IO (Either String RepoFormat) create_repo_format :: [DarcsFlag] -> RepoFormat -- | writeRepoFormat writes the repo format to the given file. writeRepoFormat :: RepoFormat -> FilePath -> IO () -- | write_problem from tells if we can write to a repo in format -- form. it returns Nothing if there's no problem -- writing to such a repository. write_problem :: RepoFormat -> Maybe String -- | read_problem from tells if we can write to a repo in format -- form. it returns Nothing if there's no problem -- reading from such a repository. read_problem :: RepoFormat -> Maybe String -- | write_problem from tells if we can read and write to a repo -- in format form. it returns Nothing if there's no -- problem reading and writing to such a repository. readfrom_and_writeto_problem :: RepoFormat -> RepoFormat -> Maybe String format_has :: RepoProperty -> RepoFormat -> Bool format_has_together :: [RepoProperty] -> RepoFormat -> Bool instance Show RepoFormat module Darcs.Repository.InternalTypes data Repository p Repo :: !String -> ![DarcsFlag] -> !RepoFormat -> !RepoType p -> Repository data RepoType p DarcsRepository :: !Pristine -> Cache -> RepoType data Pristine NoPristine :: !String -> Pristine PlainPristine :: !String -> Pristine HashedPristine :: Pristine extractCache :: Repository p -> Cache instance Show (RepoType p) instance Show (Repository p) instance Show Pristine module Darcs.Repository.Motd -- | Fetch and return the message of the day for a given repository. get_motd :: String -> IO ByteString -- | Display the message of the day for a given repository, unless either -- the XMLOutput or the Quiet flags are passed in show_motd :: [DarcsFlag] -> String -> IO () module Darcs.Repository.Prefs add_to_preflist :: (WriteableDirectory m) => String -> String -> m () get_preflist :: (ReadableDirectory m) => String -> m [String] set_preflist :: (WriteableDirectory m) => String -> [String] -> m () get_global :: String -> IO [String] defaultrepo :: [DarcsFlag] -> AbsolutePath -> [String] -> IO [String] set_defaultrepo :: String -> [DarcsFlag] -> IO () get_prefval :: (ReadableDirectory m) => String -> m (Maybe String) set_prefval :: (WriteableDirectory m) => String -> String -> m () change_prefval :: (WriteableDirectory m) => String -> String -> String -> m () def_prefval :: String -> String -> IO String write_default_prefs :: IO () boring_file_filter :: IO ([FilePath] -> [FilePath]) darcsdir_filter :: [FilePath] -> [FilePath] data FileType BinaryFile :: FileType TextFile :: FileType filetype_function :: IO (FilePath -> FileType) getCaches :: [DarcsFlag] -> String -> IO Cache instance Eq FileType module Darcs.Patch.Apply apply_to_filepaths :: (Apply p) => p -> [FilePath] -> [FilePath] apply_to_slurpy :: (Apply p, Monad m) => p -> Slurpy -> m Slurpy forceTokReplace :: String -> String -> String -> FileContents -> Maybe FileContents markup_file :: (Effect p) => PatchInfo -> p -> (FilePath, MarkedUpFile) -> (FilePath, MarkedUpFile) empty_markedup_file :: MarkedUpFile patchChanges :: Prim -> [(String, DirMark)] applyToPop :: PatchInfo -> FL Prim -> Population -> Population data LineMark AddedLine :: PatchInfo -> LineMark RemovedLine :: PatchInfo -> LineMark AddedRemovedLine :: PatchInfo -> PatchInfo -> LineMark None :: LineMark type MarkedUpFile = [(ByteString, LineMark)] force_replace_slurpy :: Prim -> Slurpy -> Maybe Slurpy applyBinary :: ByteString -> ByteString -> FileContents -> Maybe FileContents instance Show LineMark instance Apply Prim instance Apply Patch instance (Apply p) => Apply (Named p) module Darcs.Patch.Viewing xml_summary :: (Effect p, Patchy p, Conflict p) => Named p -> Doc summarize :: (Conflict e, Effect e) => e -> Doc instance (Conflict p, Patchy p) => Patchy (RL p) instance (Conflict p, Patchy p) => Patchy (FL p) instance (Conflict p, Apply p, ShowPatch p) => ShowPatch (RL p) instance (Conflict p, Apply p, Effect p, ShowPatch p) => ShowPatch (FL p) instance (Conflict p, ShowPatch p) => Show (Named p) instance (Conflict p, ShowPatch p) => ShowPatch (Named p) instance ShowPatch Patch instance ShowPatch Prim -- | NonPatch and Non patches are patches that store a -- context as a sequence of patches. See Darcs.Patch.Real for -- example usage. module Darcs.Patch.Non type NonPatch = Non Prim -- | Non stores a context with a Prim patch. data Non p Non :: FL p -> Prim -> Non p class Nonable p non :: (Nonable p) => p -> Non p unNon :: (FromPrim p) => Non p -> Sealed (FL p) showNon :: (ShowPatch (FL p)) => Non p -> Doc readNon :: (ReadPatch p, ParserM m) => m (Maybe (Non p)) showNons :: (ShowPatch (FL p)) => [Non p] -> Doc readNons :: (ReadPatch p, ParserM m) => m [Non p] add :: (Effect q, Patchy p, ToFromPrim p) => q -> Non p -> Non p rem :: (Effect q, Patchy p, ToFromPrim p) => q -> Non p -> Maybe (Non p) addP :: (Patchy p, ToFromPrim p) => p -> Non p -> Non p remP :: (Patchy p, ToFromPrim p) => p -> Non p -> Maybe (Non p) addPs :: (Patchy p, ToFromPrim p) => RL p -> Non p -> Non p remPs :: (Patchy p, ToFromPrim p) => FL p -> Non p -> Maybe (Non p) remAddP :: (Patchy p, ToFromPrim p) => p -> Non p -> Non p remAddPs :: (Patchy p, ToFromPrim p) => RL p -> Non p -> Non p remNons :: (Nonable p, Effect p, Patchy p, ToFromPrim p, ShowPatch p) => [Non p] -> Non p -> Non p (*>) :: (Patchy p, ToFromPrim p) => Non p -> p -> Maybe (Non p) (>*) :: (Patchy p, ToFromPrim p) => p -> Non p -> Maybe (Non p) (*>>) :: (Effect q, Patchy q, Patchy p, ToFromPrim p) => Non p -> q -> Maybe (Non p) (>>*) :: (Effect q, Patchy p, ToFromPrim p) => q -> Non p -> Maybe (Non p) prop_adjust_twice :: (Patchy p, ToFromPrim p) => p -> Non p -> Maybe Doc instance Patchy Prim instance (Show2 p) => Show1 (Non p) instance (Show2 p) => Show (Non p) instance Nonable Prim instance (Commute p, MyEq p) => Eq (Non p) -- | Conflictor patches module Darcs.Patch.Real -- | Duplicate x: This patch has no effect since x is -- already present in the repository -- --
--   Etacilpud x: invert (Duplicate x)
--   
-- -- Normal prim: A primitive patch -- -- Conflictor ix xx x: ix is the set of patches: -- -- -- -- xx is the sequence of patches that conflict *only* with -- x -- -- x is the current patch -- -- ix and x are stored as Non objects, which -- include any necessary context to uniquely define the patch that is -- referred to. -- -- InvConflictor ix xx x: like invert (Conflictor ix xx -- x) data RealPatch Duplicate :: Non RealPatch -> RealPatch Etacilpud :: Non RealPatch -> RealPatch Normal :: Prim -> RealPatch Conflictor :: [Non RealPatch] -> FL Prim -> Non RealPatch -> RealPatch InvConflictor :: [Non RealPatch] -> FL Prim -> Non RealPatch -> RealPatch prim2real :: Prim -> RealPatch is_consistent :: RealPatch -> Maybe Doc is_forward :: RealPatch -> Maybe Doc is_duplicate :: RealPatch -> Bool pullCommon :: (Patchy p) => FL p -> FL p -> Common p mergeUnravelled :: [Sealed ((FL Prim))] -> Maybe (FlippedSeal RealPatch) instance Effect RealPatch instance Nonable RealPatch instance Show2 RealPatch instance Show RealPatch instance ReadPatch RealPatch instance ShowPatch RealPatch instance Apply RealPatch instance Commute RealPatch instance Invert RealPatch instance MyEq RealPatch instance ToFromPrim RealPatch instance FromPrim RealPatch instance Conflict RealPatch instance (MyEq p) => Eq (Sealed p) instance Patchy RealPatch module Darcs.Patch class (Patchy p, Effect p, FromPrims p, Conflict p) => RepoPatch p data Prim data Patch -- | Duplicate x: This patch has no effect since x is -- already present in the repository -- --
--   Etacilpud x: invert (Duplicate x)
--   
-- -- Normal prim: A primitive patch -- -- Conflictor ix xx x: ix is the set of patches: -- -- -- -- xx is the sequence of patches that conflict *only* with -- x -- -- x is the current patch -- -- ix and x are stored as Non objects, which -- include any necessary context to uniquely define the patch that is -- referred to. -- -- InvConflictor ix xx x: like invert (Conflictor ix xx -- x) data RealPatch data Named p class (Apply p, Commute p, ShowPatch p, ReadPatch p, Invert p) => Patchy p flattenFL :: Patch -> FL Patch joinPatches :: (FromPrims p) => FL p -> p fromPrim :: (FromPrim p) => Prim -> p fromPrims :: (FromPrims p) => FL Prim -> p is_null_patch :: Patch -> Bool nullP :: Patch -> EqCheck rmfile :: FilePath -> Prim addfile :: FilePath -> Prim rmdir :: FilePath -> Prim adddir :: FilePath -> Prim move :: FilePath -> FilePath -> Prim hunk :: FilePath -> Int -> [ByteString] -> [ByteString] -> Prim tokreplace :: FilePath -> String -> String -> String -> Prim namepatch :: (Patchy p) => String -> String -> String -> [String] -> p -> IO (Named p) anonymous :: (Patchy p) => p -> IO (Named p) binary :: FilePath -> ByteString -> ByteString -> Prim description :: (ShowPatch p) => p -> Doc showContextPatch :: (ShowPatch p) => Slurpy -> p -> Doc showPatch :: (ShowPatch p) => p -> Doc showNicely :: (ShowPatch p) => p -> Doc infopatch :: (Patchy p) => PatchInfo -> p -> Named p changepref :: String -> String -> String -> Prim thing :: (ShowPatch p) => p -> String things :: (ShowPatch p) => p -> String -- | Tells you if two patches are in the same category, human-wise. -- Currently just returns true if they are filepatches on the same file. is_similar :: Prim -> Prim -> Bool is_addfile :: Prim -> Bool is_hunk :: Prim -> Bool is_setpref :: Prim -> Bool merger :: String -> Patch -> Patch -> Patch is_merger :: Patch -> Bool merge :: (Commute p) => (p :\/: p) -> (p :/\: p) commute :: (Commute p) => (p :> p) -> Maybe ((p :> p)) commutex :: (Commute p) => (p :< p) -> Maybe ((p :< p)) list_touched_files :: (Commute p) => p -> [FilePath] unravel :: Patch -> [FL Prim] elegant_merge :: (Patch :\/: Patch) -> Maybe ((Patch :/\: Patch)) resolve_conflicts :: (Conflict p) => p -> [[Sealed (FL Prim)]] class Effect p effect :: (Effect p) => p -> FL Prim is_binary :: Prim -> Bool gzWritePatch :: (ShowPatch p) => FilePath -> p -> IO () writePatch :: (ShowPatch p) => FilePath -> p -> IO () is_adddir :: Prim -> Bool invert :: (Invert p) => p -> p invertFL :: (Invert p) => FL p -> RL p invertRL :: (Invert p) => RL p -> FL p identity :: (Invert p) => p commuteFL :: (Commute p) => (p :> FL p) -> Either (Sealed2 p) ((FL p :> p)) commuteRL :: (Commute p) => (RL p :> p) -> Maybe ((p :> RL p)) readPatch :: (ReadPatch p) => ByteString -> Maybe (Sealed (p), ByteString) canonize :: Prim -> FL Prim -- | sort_coalesceFL ps coalesces as many patches in -- ps as possible, sorting the results according to the scheme -- defined in comparePrim sort_coalesceFL :: FL Prim -> FL Prim try_to_shrink :: FL Prim -> FL Prim apply_to_slurpy :: (Apply p, Monad m) => p -> Slurpy -> m Slurpy patchname :: Named p -> String patchcontents :: Named p -> p apply_to_filepaths :: (Apply p) => p -> [FilePath] -> [FilePath] force_replace_slurpy :: Prim -> Slurpy -> Maybe Slurpy apply :: (Apply p, WriteableDirectory m) => [DarcsFlag] -> p -> m () patch2patchinfo :: Named p -> PatchInfo data LineMark AddedLine :: PatchInfo -> LineMark RemovedLine :: PatchInfo -> LineMark AddedRemovedLine :: PatchInfo -> PatchInfo -> LineMark None :: LineMark type MarkedUpFile = [(ByteString, LineMark)] markup_file :: (Effect p) => PatchInfo -> p -> (FilePath, MarkedUpFile) -> (FilePath, MarkedUpFile) empty_markedup_file :: MarkedUpFile summary :: (ShowPatch p) => p -> Doc summarize :: (Conflict e, Effect e) => e -> Doc xml_summary :: (Effect p, Patchy p, Conflict p) => Named p -> Doc adddeps :: Named p -> [PatchInfo] -> Named p getdeps :: Named p -> [PatchInfo] list_conflicted_files :: (Conflict p) => p -> [FilePath] modernize_patch :: Patch -> Patch -- | info of a directory member data DirMark AddedFile :: DirMark RemovedFile :: DirMark MovedFile :: String -> DirMark ModifiedFile :: DirMark DullFile :: DirMark AddedDir :: DirMark RemovedDir :: DirMark MovedDir :: !String -> DirMark DullDir :: DirMark patchChanges :: Prim -> [(String, DirMark)] applyToPop :: PatchInfo -> FL Prim -> Population -> Population instance (RepoPatchBase p) => RepoPatch (FL p) instance RepoPatch Patch instance RepoPatchBase RealPatch instance RepoPatchBase Patch instance (Conflict p, Effect p, Patchy p) => Patchy (Named p) instance Patchy Patch module Darcs.CommandsAux -- | A convenience function to call from all darcs command functions before -- applying any patches. It checks for malicious paths in patches, and -- prints an error message and fails if it finds one. check_paths :: (Patchy p) => [DarcsFlag] -> FL p -> IO () -- | Filter out patches that contains some malicious file path malicious_patches :: (Patchy p) => [Sealed2 p] -> [Sealed2 p] has_malicious_path :: (Patchy p) => p -> Bool module Darcs.Diff -- | The unsafeDiffAtPaths function calls diff_at_path for a set of files -- and and directories, and returns all changes to those files. It -- recurses into given directories when searching for changes. -- -- Comparing paths and not slurpies is useful when the user requests a -- diff for a file that is created or removed in the working copy: then -- there is no slurpy for the file in the current or -- working slurpy respectively. -- -- The given paths must always be fixed repository paths starting with a -- .. It is safe to pass overlapping paths. -- -- The booleans in the first argument tell whether to ignore mtimes, -- whether we must look for additions and if we're diffing for a summary -- only. -- -- It returns an FL of patches, that contains all the changes that have -- been made at all those paths. unsafeDiffAtPaths :: (Bool, Bool, Bool) -> (FilePath -> FileType) -> Slurpy -> Slurpy -> [FilePath] -> FL Prim unsafeDiff :: [DarcsFlag] -> (FilePath -> FileType) -> Slurpy -> Slurpy -> FL Prim sync :: String -> Slurpy -> Slurpy -> IO () cmp :: FilePath -> FilePath -> IO Bool diff_files :: FilePath -> FileContents -> FileContents -> (FL Prim -> FL Prim) module Darcs.Hopefully -- | Hopefully p C (x y) is Either -- String (p C (x y)) in a form adapted to darcs patches. -- The C (x y) represents the type witness for the -- patch that should be there. The Hopefully type just tells -- whether we expect the patch to be hashed or not, and -- SimpleHopefully does the real work of emulating Either. -- Hopefully sh represents an expected unhashed patch, and -- Hashed hash sh represents an expected hashed patch with its -- hash. data Hopefully a -- | PatchInfoAnd p represents a hope we have to get a -- patch through its info. We're not sure we have the patch, but we know -- its info. data PatchInfoAnd p -- | piap i p creates a PatchInfoAnd containing p with info -- i. piap :: PatchInfo -> Named p -> PatchInfoAnd p -- | n2pia creates a PatchInfoAnd represeting a Named -- patch. n2pia :: Named p -> PatchInfoAnd p patchInfoAndPatch :: PatchInfo -> Hopefully (Named p) -> PatchInfoAnd p -- | conscientiously er hp tries to extract a patch from a -- PatchInfoAnd. If it fails, it applies the error handling -- function er to a description of the patch info component of -- hp. conscientiously :: (Doc -> Doc) -> PatchInfoAnd p -> Named p -- | hopefully hp tries to get a patch from a -- PatchInfoAnd value. If it fails, it outputs an error "failed to -- read patch: <description of the patch>". We get the description -- of the patch from the info part of hp hopefully :: PatchInfoAnd p -> Named p info :: PatchInfoAnd p -> PatchInfo -- | hopefullyM is a version of hopefully which calls -- fail in a monad instead of erroring. hopefullyM :: (Monad m) => PatchInfoAnd p -> m (Named p) createHashed :: String -> (String -> IO (Sealed (a))) -> IO (Sealed (Hopefully a)) extractHash :: PatchInfoAnd p -> Either (Named p) String actually :: a -> Hopefully a unavailable :: String -> Hopefully a instance (RepoPatch p) => Patchy (PatchInfoAnd p) instance (Conflict p) => Conflict (PatchInfoAnd p) instance (Effect p) => Effect (PatchInfoAnd p) instance (ReadPatch p) => ReadPatch (PatchInfoAnd p) instance (Apply p) => Apply (PatchInfoAnd p) instance (Commute p) => Commute (PatchInfoAnd p) instance (Conflict p, Effect p, ShowPatch p) => ShowPatch (PatchInfoAnd p) instance (Invert p) => Invert (PatchInfoAnd p) instance (MyEq p) => MyEq (PatchInfoAnd p) module Darcs.Patch.Set -- | A PatchSet is in reverse order, plus has information about which tags -- are clean, meaning all patches applied prior to them are in the tag -- itself, so we can stop reading at that point. Just to clarify, the -- first patch in a PatchSet is the one most recently applied to the -- repo. -- -- PatchSets have the property that if (info $ last $ head a) -- == (info $ last $ head b) then (tail a) and (tail -- b) are identical repositories -- -- Questions: -- -- Does this mean that in a patch set such as [[a b t1 c d e t2][f g -- t3] [h i]], t1, t2 and t3 are tags, and t2 and t3 are clean? -- -- Can we have PatchSet with length at least 3? Florent type PatchSet p = RL (RL (PatchInfoAnd p)) type SealedPatchSet p = Sealed (RL (RL (PatchInfoAnd p))) module Darcs.ProgressPatches -- | Evaluate an RL list and report progress. progressRL :: String -> RL a -> RL a -- | Evaluate an FL list and report progress. progressFL :: String -> FL a -> FL a -- | Evaluate an RL list and report progress. In addition to -- printing the number of patches we got, show the name of the last tag -- we got. progressRLShowTags :: String -> RL (PatchInfoAnd p) -> RL (PatchInfoAnd p) module Darcs.Patch.Bundle hash_bundle :: (RepoPatch p) => [PatchInfo] -> FL (Named p) -> String make_bundle :: (RepoPatch p) => [DarcsFlag] -> Slurpy -> [PatchInfo] -> FL (Named p) -> Doc -- | In make_bundle2, it is presumed that the two patch sequences are -- identical, but that they may be lazily generated. If two different -- patch sequences are passed, a bundle with a mismatched hash will be -- generated, which is not the end of the world, but isn't very useful -- either. make_bundle2 :: (RepoPatch p) => [DarcsFlag] -> Slurpy -> [PatchInfo] -> FL (Named p) -> FL (Named p) -> Doc scan_bundle :: (RepoPatch p) => ByteString -> Either String (SealedPatchSet p) make_context :: [PatchInfo] -> Doc scan_context :: (RepoPatch p) => ByteString -> PatchSet p -- | PatchChoices divides a sequence of patches into three sets: -- first, middle and last, such that all patches can -- be applied, if you first apply the first ones then the middle ones and -- then the last ones. Obviously if there are dependencies between the -- patches that will put a constraint on how you can choose to divide -- them up. The PatchChoices data type and associated functions are here -- to deal with many of the common cases that come up when choosing a -- subset of a group of patches. -- -- force_last tells PatchChoices that a particular patch is -- required to be in the last group, which also means that any -- patches that depend on it must be in the last group. -- -- Internally, a PatchChoices doesn't actually reorder the patches until -- it is asked for the final output (e.g. by get_first_choice). Instead, -- each patch is placed in a state of definitely first, definitely last -- and undecided; undecided leans towards middle. In case you're -- wondering about the first-middle-last language, it's because in some -- cases the yes answers will be last (as is the case for the -- revert command), and in others first (as in record, pull and push). module Darcs.Patch.Choices data PatchChoices p patch_choices :: (Patchy p) => FL p -> PatchChoices p patch_choices_tps :: (Patchy p) => FL p -> (PatchChoices p, FL (TaggedPatch p)) patch_slot :: TaggedPatch p -> PatchChoices p -> Slot get_choices :: (Patchy p) => PatchChoices p -> (FL (TaggedPatch p) :> (FL (TaggedPatch p) :> FL (TaggedPatch p))) separate_first_middle_from_last :: (Patchy p) => PatchChoices p -> (FL (TaggedPatch p) :> FL (TaggedPatch p)) separate_first_from_middle_last :: (Patchy p) => PatchChoices p -> (FL (TaggedPatch p) :> FL (TaggedPatch p)) force_first :: (Patchy p) => Tag -> PatchChoices p -> PatchChoices p force_firsts :: (Patchy p) => [Tag] -> PatchChoices p -> PatchChoices p force_last :: (Patchy p) => Tag -> PatchChoices p -> PatchChoices p force_lasts :: (Patchy p) => [Tag] -> PatchChoices p -> PatchChoices p force_matching_first :: (Patchy p) => (TaggedPatch p -> Bool) -> PatchChoices p -> PatchChoices p force_matching_last :: (Patchy p) => (TaggedPatch p -> Bool) -> PatchChoices p -> PatchChoices p select_all_middles :: (Patchy p) => Bool -> PatchChoices p -> PatchChoices p make_uncertain :: (Patchy p) => Tag -> PatchChoices p -> PatchChoices p make_everything_later :: (Patchy p) => PatchChoices p -> PatchChoices p data TaggedPatch p data Tag tag :: TaggedPatch p -> Tag tp_patch :: TaggedPatch p -> p data Slot InFirst :: Slot InMiddle :: Slot InLast :: Slot instance Num Tag instance Show Tag instance Eq Tag instance Ord Tag instance Enum Tag instance (Commute p) => Commute (PatchChoice p) instance (Invert p) => Invert (PatchChoice p) instance (MyEq p) => MyEq (PatchChoice p) instance (Commute p) => Commute (TaggedPatch p) instance (Invert p) => Invert (TaggedPatch p) instance (MyEq p) => MyEq (TaggedPatch p) module Darcs.Patch.Depends get_common_and_uncommon :: (RepoPatch p) => (PatchSet p, PatchSet p) -> ([PatchInfo], RL (RL (PatchInfoAnd p)) :\/: RL (RL (PatchInfoAnd p))) get_tags_right :: RL (RL (PatchInfoAnd p)) -> [PatchInfo] get_common_and_uncommon_or_missing :: (RepoPatch p) => (PatchSet p, PatchSet p) -> Either PatchInfo ([PatchInfo], RL (RL (PatchInfoAnd p)) :\/: RL (RL (PatchInfoAnd p))) optimize_patchset :: PatchSet p -> PatchSet p deep_optimize_patchset :: PatchSet p -> PatchSet p slightly_optimize_patchset :: PatchSet p -> PatchSet p get_patches_beyond_tag :: (RepoPatch p) => PatchInfo -> PatchSet p -> FlippedSeal (RL (RL (PatchInfoAnd p))) -- | get_patches_in_tag t ps returns a SealedPatchSet of -- all patches in ps which are contained in t. get_patches_in_tag :: (RepoPatch p) => PatchInfo -> PatchSet p -> SealedPatchSet p patchset_union :: (RepoPatch p) => [SealedPatchSet p] -> SealedPatchSet p patchset_intersection :: (RepoPatch p) => [SealedPatchSet p] -> SealedPatchSet p commute_to_end :: (RepoPatch p) => FL (Named p) -> PatchSet p -> (FL (Named p) :< RL (RL (PatchInfoAnd p))) instance Error MissingPatch module Darcs.Patch.Match data PatchMatch -- | A Matcher is made of a MatchFun which we will use to -- match patches and a String representing it. data Matcher p -- | A type for predicates over patches which do not care about contexts type MatchFun p = Sealed2 (PatchInfoAnd p) -> Bool patch_match :: String -> PatchMatch match_pattern :: (Patchy p) => PatchMatch -> Matcher p -- | apply_matcher applies a matcher to a patch. apply_matcher :: Matcher p -> PatchInfoAnd p -> Bool make_matcher :: String -> (Sealed2 (PatchInfoAnd p) -> Bool) -> Matcher p parseMatch :: (Patchy p) => PatchMatch -> Either String (MatchFun p) match_parser :: (Patchy p) => CharParser st (MatchFun p) -- | The string that is emitted when the user runs darcs help -- --match. helpOnMatchers :: String instance Show (Matcher p) module Darcs.Patch.Properties recommute :: (Patchy p) => (((p :> p) -> Maybe ((p :> p)))) -> (p :> p) -> Maybe Doc commute_inverses :: (Patchy p) => ((p :> p) -> Maybe ((p :> p))) -> (p :> p) -> Maybe Doc permutivity :: (Patchy p) => ((p :> p) -> Maybe ((p :> p))) -> (p :> (p :> p)) -> Maybe Doc partial_permutivity :: (Patchy p) => ((p :> p) -> Maybe ((p :> p))) -> (p :> (p :> p)) -> Maybe Doc identity_commutes :: (Patchy p) => p -> Maybe Doc inverse_doesnt_commute :: (Patchy p) => p -> Maybe Doc patch_and_inverse_commute :: (Patchy p) => ((p :> p) -> Maybe ((p :> p))) -> (p :> p) -> Maybe Doc merge_either_way :: (Patchy p) => (p :\/: p) -> Maybe Doc show_read :: (Show2 p, Patchy p) => p -> Maybe Doc merge_commute :: (Patchy p) => (p :\/: p) -> Maybe Doc merge_consistent :: (Patchy p) => (p -> Maybe Doc) -> (p :\/: p) -> Maybe Doc merge_arguments_consistent :: (Patchy p) => (p -> Maybe Doc) -> (p :\/: p) -> Maybe Doc join_inverses :: ((Prim :> Prim) -> Maybe (Prim)) -> Prim -> Maybe Doc join_commute :: ((Prim :> Prim) -> Maybe (Prim)) -> (Prim :> (Prim :> Prim)) -> Maybe Doc module Darcs.Patch.TouchesFiles look_touch :: (Patchy p) => [FilePath] -> p -> (Bool, [FilePath]) choose_touching :: (Patchy p) => [FilePath] -> FL p -> Sealed (FL p) select_touching :: (Patchy p) => [FilePath] -> PatchChoices p -> PatchChoices p deselect_not_touching :: (Patchy p) => [FilePath] -> PatchChoices p -> PatchChoices p select_not_touching :: (Patchy p) => [FilePath] -> PatchChoices p -> PatchChoices p module Darcs.Repository.ApplyPatches apply_patches :: (Patchy p) => [DarcsFlag] -> FL (PatchInfoAnd p) -> IO () apply_patches_with_feedback :: (Patchy p) => [DarcsFlag] -> String -> FL (PatchInfoAnd p) -> IO () module Darcs.Repository.HashedIO type HashedIO r p = StateT (HashDir r p) IO applyHashed :: (Patchy q) => Cache -> [DarcsFlag] -> String -> q -> IO String copyHashed :: String -> Cache -> Compression -> String -> IO () -- | Update timestamps on pristine files to match those in the working -- directory (which is passed to this function in form of a Slurpy). It -- needed for the mtime-based unsafeDiff optimisation to work -- efficiently. syncHashedPristine :: Cache -> Slurpy -> String -> IO () copyPartialsHashed :: (FilePathLike fp) => Cache -> Compression -> String -> [fp] -> IO () -- | Seems to list all hashes reachable from root. listHashedContents :: String -> Cache -> String -> IO [String] -- | Create a Slurpy representing the pristine content determined by the -- supplied root hash (which uniquely determines the pristine tree) slurpHashedPristine :: Cache -> Compression -> String -> IO Slurpy -- | Write contents of a Slurpy into hashed pristine. Only files that have -- not not yet been hashed (that is, the hash corresponding to their -- content is already present in hashed pristine) will be written out, so -- it is efficient to use this function to update existing pristine -- cache. Note that the pristine root hash will *not* be updated. You -- need to do that manually. writeHashedPristine :: Cache -> Compression -> Slurpy -> IO String clean_hashdir :: Cache -> HashedDir -> [String] -> IO () instance Eq ObjType instance WriteableDirectory (HashedIO RW p) instance ReadableDirectory (HashedIO r p) module Darcs.Repository.HashedRepo revert_tentative_changes :: IO () finalize_tentative_changes :: (RepoPatch p) => Repository p -> Compression -> IO () slurp_pristine :: Cache -> Compression -> String -> String -> IO Slurpy sync_repo :: Cache -> IO () clean_pristine :: Repository p -> IO () copy_pristine :: Cache -> Compression -> String -> String -> IO () copy_partials_pristine :: (FilePathLike fp) => Cache -> Compression -> String -> String -> [fp] -> IO () pristine_from_working :: Cache -> Compression -> IO () apply_to_tentative_pristine :: (Patchy q) => Cache -> [DarcsFlag] -> q -> IO () replacePristine :: Cache -> Compression -> FilePath -> IO () replacePristineFromSlurpy :: Cache -> Compression -> Slurpy -> IO () add_to_tentative_inventory :: (RepoPatch p) => Cache -> Compression -> PatchInfoAnd p -> IO FilePath remove_from_tentative_inventory :: (RepoPatch p) => Repository p -> Compression -> FL (Named p) -> IO () read_repo :: (RepoPatch p) => Repository p -> String -> IO (PatchSet p) read_tentative_repo :: (RepoPatch p) => Repository p -> String -> IO (PatchSet p) write_and_read_patch :: (RepoPatch p) => Cache -> Compression -> PatchInfoAnd p -> IO (PatchInfoAnd p) write_tentative_inventory :: (RepoPatch p) => Cache -> Compression -> PatchSet p -> IO () copy_repo :: (RepoPatch p) => Repository p -> [DarcsFlag] -> String -> IO () slurp_all_but_darcs :: FilePath -> IO Slurpy readHashedPristineRoot :: Repository p -> IO (Maybe String) module Darcs.Repository.Pristine data Pristine flagsToPristine :: [DarcsFlag] -> RepoFormat -> Pristine nopristine :: Pristine createPristine :: Pristine -> IO Pristine removePristine :: Pristine -> IO () identifyPristine :: IO (Pristine) slurpPristine :: Pristine -> IO (Maybe Slurpy) applyPristine :: (Patchy p) => Pristine -> p -> IO () createPristineFromWorking :: Pristine -> IO () syncPristine :: Pristine -> IO () replacePristine :: FilePath -> Pristine -> IO () replacePristineFromSlurpy :: Slurpy -> Pristine -> IO () getPristinePop :: PatchInfo -> Pristine -> IO (Maybe Population) pristineDirectory :: Pristine -> Maybe String pristineToFlagString :: Pristine -> String easyCreatePristineDirectoryTree :: Pristine -> FilePath -> IO Bool easyCreatePartialsPristineDirectoryTree :: (FilePathLike fp) => [fp] -> Pristine -> FilePath -> IO Bool module Darcs.Repository.DarcsRepo write_inventory :: (RepoPatch p) => FilePath -> PatchSet p -> IO () write_inventory_and_patches :: (RepoPatch p) => [DarcsFlag] -> PatchSet p -> IO () add_to_inventory :: FilePath -> [PatchInfo] -> IO () add_to_tentative_pristine :: (Effect p) => p -> IO () add_to_tentative_inventory :: (RepoPatch p) => [DarcsFlag] -> Named p -> IO FilePath remove_from_tentative_inventory :: (RepoPatch p) => Bool -> [DarcsFlag] -> FL (Named p) -> IO () finalize_tentative_changes :: IO () finalize_pristine_changes :: IO () revert_tentative_changes :: IO () read_repo :: (RepoPatch p) => [DarcsFlag] -> String -> IO (SealedPatchSet p) read_tentative_repo :: (RepoPatch p) => [DarcsFlag] -> String -> IO (SealedPatchSet p) write_and_read_patch :: (RepoPatch p) => [DarcsFlag] -> PatchInfoAnd p -> IO (PatchInfoAnd p) copy_patches :: [DarcsFlag] -> FilePath -> FilePath -> [PatchInfo] -> IO () module Darcs.Resolution standard_resolution :: (RepoPatch p) => p -> Sealed (FL Prim) external_resolution :: (RepoPatch p) => Slurpy -> String -> FL Prim -> FL Prim -> p -> IO (Sealed (FL Prim)) patchset_conflict_resolutions :: (RepoPatch p) => PatchSet p -> Sealed (FL Prim) module Darcs.Repository.Internal data Repository p Repo :: !String -> ![DarcsFlag] -> !RepoFormat -> !RepoType p -> Repository data RepoType p DarcsRepository :: !Pristine -> Cache -> RepoType -- | Repository IO monad. This monad-like datatype is responsible for -- sequencing IO actions that modify the tentative recorded state of the -- repository. data RIO p a ($-) :: ((forall p. (RepoPatch p) => Repository p -> IO a) -> IO a) -> (forall p. (RepoPatch p) => Repository p -> IO a) -> IO a maybeIdentifyRepository :: [DarcsFlag] -> String -> IO (Either String (Repository p)) identifyDarcs1Repository :: [DarcsFlag] -> String -> IO (Repository Patch) identifyRepositoryFor :: (RepoPatch p) => Repository p -> String -> IO (Repository p) findRepository :: [DarcsFlag] -> IO (Either String ()) amInRepository :: [DarcsFlag] -> IO (Either String ()) amNotInRepository :: [DarcsFlag] -> IO (Either String ()) slurp_pending :: (RepoPatch p) => Repository p -> IO Slurpy pristineFromWorking :: (RepoPatch p) => Repository p -> IO () revertRepositoryChanges :: (RepoPatch p) => Repository p -> IO () slurp_recorded :: (RepoPatch p) => Repository p -> IO Slurpy slurp_recorded_and_unrecorded :: (RepoPatch p) => Repository p -> IO (Slurpy, Slurpy) withRecorded :: (RepoPatch p) => Repository p -> ((AbsolutePath -> IO a) -> IO a) -> (AbsolutePath -> IO a) -> IO a checkPristineAgainstSlurpy :: (RepoPatch p) => Repository p -> Slurpy -> IO Bool get_unrecorded :: (RepoPatch p) => Repository p -> IO (FL Prim) get_unrecorded_unsorted :: (RepoPatch p) => Repository p -> IO (FL Prim) get_unrecorded_no_look_for_adds :: (RepoPatch p) => Repository p -> [FileName] -> IO (FL Prim) -- | Gets the unrecorded changes in the given paths in the current -- repository. get_unrecorded_in_files :: (RepoPatch p) => Repository p -> [FileName] -> IO (FL Prim) read_repo :: (RepoPatch p) => Repository p -> IO (PatchSet p) sync_repo :: Repository p -> IO () prefsUrl :: Repository p -> String makePatchLazy :: (RepoPatch p) => Repository p -> PatchInfoAnd p -> IO (PatchInfoAnd p) add_to_pending :: (RepoPatch p) => Repository p -> FL Prim -> IO () withRepoLock :: [DarcsFlag] -> (forall p. (RepoPatch p) => Repository p -> IO a) -> IO a withRepoReadLock :: [DarcsFlag] -> (forall p. (RepoPatch p) => Repository p -> IO a) -> IO a withRepository :: [DarcsFlag] -> (forall p. (RepoPatch p) => Repository p -> IO a) -> IO a withRepositoryDirectory :: [DarcsFlag] -> String -> (forall p. (RepoPatch p) => Repository p -> IO a) -> IO a withGutsOf :: Repository p -> IO () -> IO () tentativelyAddPatch :: (RepoPatch p) => Repository p -> [DarcsFlag] -> PatchInfoAnd p -> IO () tentativelyRemovePatches :: (RepoPatch p) => Repository p -> [DarcsFlag] -> FL (Named p) -> IO () -- | This fuction is unsafe because it accepts a patch that works on the -- tentative pending and we don't currently track the state of the -- tentative pending. tentativelyAddToPending :: (RepoPatch p) => Repository p -> [DarcsFlag] -> FL Prim -> IO () tentativelyReplacePatches :: (RepoPatch p) => Repository p -> [DarcsFlag] -> FL (Named p) -> IO () tentativelyMergePatches :: (RepoPatch p) => Repository p -> String -> [DarcsFlag] -> FL (PatchInfoAnd p) -> FL (PatchInfoAnd p) -> IO (Sealed (FL Prim)) considerMergeToWorking :: (RepoPatch p) => Repository p -> String -> [DarcsFlag] -> FL (PatchInfoAnd p) -> FL (PatchInfoAnd p) -> IO (Sealed (FL Prim)) finalizeRepositoryChanges :: (RepoPatch p) => Repository p -> IO () unrevertUrl :: Repository p -> String applyToWorking :: (Patchy p) => Repository p1 -> [DarcsFlag] -> p -> IO () patchSetToPatches :: (RepoPatch p) => RL (RL (PatchInfoAnd p)) -> FL (Named p) createPristineDirectoryTree :: (RepoPatch p) => Repository p -> FilePath -> IO () createPartialsPristineDirectoryTree :: (FilePathLike fp, RepoPatch p) => Repository p -> [fp] -> FilePath -> IO () replacePristine :: Repository p -> FilePath -> IO () replacePristineFromSlurpy :: Repository p -> Slurpy -> IO () optimizeInventory :: (RepoPatch p) => Repository p -> IO () cleanRepository :: (RepoPatch p) => Repository p -> IO () getMarkedupFile :: (RepoPatch p) => Repository p -> PatchInfo -> FilePath -> IO MarkedUpFile -- | A PatchSet is in reverse order, plus has information about which tags -- are clean, meaning all patches applied prior to them are in the tag -- itself, so we can stop reading at that point. Just to clarify, the -- first patch in a PatchSet is the one most recently applied to the -- repo. -- -- PatchSets have the property that if (info $ last $ head a) -- == (info $ last $ head b) then (tail a) and (tail -- b) are identical repositories -- -- Questions: -- -- Does this mean that in a patch set such as [[a b t1 c d e t2][f g -- t3] [h i]], t1, t2 and t3 are tags, and t2 and t3 are clean? -- -- Can we have PatchSet with length at least 3? Florent type PatchSet p = RL (RL (PatchInfoAnd p)) type SealedPatchSet p = Sealed (RL (RL (PatchInfoAnd p))) -- | Sets scripts in or below the current directory executable. A script is -- any file that starts with the bytes '#!'. This is used sometimes for -- --set-scripts-executable, but at other times --set-scripts-executable -- is handled by the hunk patch case of applyFL. setScriptsExecutable :: IO () -- | Similar to the ask function of the MonadReader class. This -- allows actions in the RIO monad to get the current repository. FIXME: -- Don't export this. If we don't export this it makes it harder for -- arbitrary IO actions to access the repository and hence our code is -- easier to audit. getRepository :: RIO p (Repository p) -- | This the RIO equivalent of liftIO. rIO :: IO a -> RIO p a testTentative :: (RepoPatch p) => Repository p -> IO () testRecorded :: (RepoPatch p) => Repository p -> IO () instance Eq UpdatePristine instance Eq MakeChanges instance Monad (RIO p) instance Functor (RIO p) module Darcs.Repository.Checkpoint get_checkpoint :: (RepoPatch p) => Repository p -> IO (Maybe (Sealed (Named p))) get_checkpoint_by_default :: (RepoPatch p) => Repository p -> IO (Maybe (Sealed (Named p))) identify_checkpoint :: (RepoPatch p) => Repository p -> IO (Maybe PatchInfo) write_checkpoint :: (RepoPatch p) => Repository p -> PatchInfo -> IO () write_recorded_checkpoint :: (RepoPatch p) => Repository p -> PatchInfo -> IO () write_checkpoint_patch :: (RepoPatch p) => Named p -> IO () module Darcs.Repository data Repository p ($-) :: ((forall p. (RepoPatch p) => Repository p -> IO a) -> IO a) -> (forall p. (RepoPatch p) => Repository p -> IO a) -> IO a maybeIdentifyRepository :: [DarcsFlag] -> String -> IO (Either String (Repository p)) identifyRepositoryFor :: (RepoPatch p) => Repository p -> String -> IO (Repository p) withRepoLock :: [DarcsFlag] -> (forall p. (RepoPatch p) => Repository p -> IO a) -> IO a withRepoReadLock :: [DarcsFlag] -> (forall p. (RepoPatch p) => Repository p -> IO a) -> IO a withRepository :: [DarcsFlag] -> (forall p. (RepoPatch p) => Repository p -> IO a) -> IO a withRepositoryDirectory :: [DarcsFlag] -> String -> (forall p. (RepoPatch p) => Repository p -> IO a) -> IO a withGutsOf :: Repository p -> IO () -> IO () makePatchLazy :: (RepoPatch p) => Repository p -> PatchInfoAnd p -> IO (PatchInfoAnd p) -- | writePatchSet is like patchSetToRepository, except that it doesn't -- touch the working directory or pristine cache. writePatchSet :: (RepoPatch p) => PatchSet p -> [DarcsFlag] -> IO (Repository p) findRepository :: [DarcsFlag] -> IO (Either String ()) amInRepository :: [DarcsFlag] -> IO (Either String ()) amNotInRepository :: [DarcsFlag] -> IO (Either String ()) slurp_pending :: (RepoPatch p) => Repository p -> IO Slurpy replacePristine :: Repository p -> FilePath -> IO () replacePristineFromSlurpy :: Repository p -> Slurpy -> IO () slurp_recorded :: (RepoPatch p) => Repository p -> IO Slurpy slurp_recorded_and_unrecorded :: (RepoPatch p) => Repository p -> IO (Slurpy, Slurpy) withRecorded :: (RepoPatch p) => Repository p -> ((AbsolutePath -> IO a) -> IO a) -> (AbsolutePath -> IO a) -> IO a get_unrecorded :: (RepoPatch p) => Repository p -> IO (FL Prim) get_unrecorded_unsorted :: (RepoPatch p) => Repository p -> IO (FL Prim) get_unrecorded_no_look_for_adds :: (RepoPatch p) => Repository p -> [FileName] -> IO (FL Prim) -- | Gets the unrecorded changes in the given paths in the current -- repository. get_unrecorded_in_files :: (RepoPatch p) => Repository p -> [FileName] -> IO (FL Prim) read_repo :: (RepoPatch p) => Repository p -> IO (PatchSet p) sync_repo :: Repository p -> IO () prefsUrl :: Repository p -> String add_to_pending :: (RepoPatch p) => Repository p -> FL Prim -> IO () tentativelyAddPatch :: (RepoPatch p) => Repository p -> [DarcsFlag] -> PatchInfoAnd p -> IO () tentativelyRemovePatches :: (RepoPatch p) => Repository p -> [DarcsFlag] -> FL (Named p) -> IO () -- | This fuction is unsafe because it accepts a patch that works on the -- tentative pending and we don't currently track the state of the -- tentative pending. tentativelyAddToPending :: (RepoPatch p) => Repository p -> [DarcsFlag] -> FL Prim -> IO () tentativelyReplacePatches :: (RepoPatch p) => Repository p -> [DarcsFlag] -> FL (Named p) -> IO () tentativelyMergePatches :: (RepoPatch p) => Repository p -> String -> [DarcsFlag] -> FL (PatchInfoAnd p) -> FL (PatchInfoAnd p) -> IO (Sealed (FL Prim)) considerMergeToWorking :: (RepoPatch p) => Repository p -> String -> [DarcsFlag] -> FL (PatchInfoAnd p) -> FL (PatchInfoAnd p) -> IO (Sealed (FL Prim)) revertRepositoryChanges :: (RepoPatch p) => Repository p -> IO () finalizeRepositoryChanges :: (RepoPatch p) => Repository p -> IO () createRepository :: [DarcsFlag] -> IO () copyRepository :: (RepoPatch p) => Repository p -> IO () copy_oldrepo_patches :: (RepoPatch p) => [DarcsFlag] -> Repository p -> FilePath -> IO () -- | patchSetToRepository takes a patch set, and writes a new repository in -- the current directory that contains all the patches in the patch set. -- This function is used when 'darcs get'ing a repository with the -- --to-match flag and the new repository is not in hashed format. This -- function does not (yet) work for hashed repositories. If the passed -- DarcsFlags tell darcs to create a hashed repository, this -- function will call error. patchSetToRepository :: (RepoPatch p) => Repository p -> PatchSet p -> [DarcsFlag] -> IO (Repository p) unrevertUrl :: Repository p -> String applyToWorking :: (Patchy p) => Repository p1 -> [DarcsFlag] -> p -> IO () patchSetToPatches :: (RepoPatch p) => RL (RL (PatchInfoAnd p)) -> FL (Named p) createPristineDirectoryTree :: (RepoPatch p) => Repository p -> FilePath -> IO () createPartialsPristineDirectoryTree :: (FilePathLike fp, RepoPatch p) => Repository p -> [fp] -> FilePath -> IO () optimizeInventory :: (RepoPatch p) => Repository p -> IO () cleanRepository :: (RepoPatch p) => Repository p -> IO () checkPristineAgainstSlurpy :: (RepoPatch p) => Repository p -> Slurpy -> IO Bool getMarkedupFile :: (RepoPatch p) => Repository p -> PatchInfo -> FilePath -> IO MarkedUpFile -- | A PatchSet is in reverse order, plus has information about which tags -- are clean, meaning all patches applied prior to them are in the tag -- itself, so we can stop reading at that point. Just to clarify, the -- first patch in a PatchSet is the one most recently applied to the -- repo. -- -- PatchSets have the property that if (info $ last $ head a) -- == (info $ last $ head b) then (tail a) and (tail -- b) are identical repositories -- -- Questions: -- -- Does this mean that in a patch set such as [[a b t1 c d e t2][f g -- t3] [h i]], t1, t2 and t3 are tags, and t2 and t3 are clean? -- -- Can we have PatchSet with length at least 3? Florent type PatchSet p = RL (RL (PatchInfoAnd p)) type SealedPatchSet p = Sealed (RL (RL (PatchInfoAnd p))) -- | PatchInfoAnd p represents a hope we have to get a -- patch through its info. We're not sure we have the patch, but we know -- its info. data PatchInfoAnd p -- | Sets scripts in or below the current directory executable. A script is -- any file that starts with the bytes '#!'. This is used sometimes for -- --set-scripts-executable, but at other times --set-scripts-executable -- is handled by the hunk patch case of applyFL. setScriptsExecutable :: IO () checkUnrelatedRepos :: [DarcsFlag] -> [PatchInfo] -> PatchSet p -> PatchSet p -> IO () testTentative :: (RepoPatch p) => Repository p -> IO () testRecorded :: (RepoPatch p) => Repository p -> IO () instance Eq PorNP module Darcs.Arguments -- | The DarcsFlag type is a list of all flags that can ever be -- passed to darcs, or to one of its commands. data DarcsFlag Help :: DarcsFlag ListOptions :: DarcsFlag NoTest :: DarcsFlag Test :: DarcsFlag HelpOnMatch :: DarcsFlag OnlyChangesToFiles :: DarcsFlag LeaveTestDir :: DarcsFlag NoLeaveTestDir :: DarcsFlag Timings :: DarcsFlag Debug :: DarcsFlag DebugVerbose :: DarcsFlag DebugHTTP :: DarcsFlag Verbose :: DarcsFlag NormalVerbosity :: DarcsFlag Quiet :: DarcsFlag Target :: String -> DarcsFlag Cc :: String -> DarcsFlag Output :: AbsolutePathOrStd -> DarcsFlag OutputAutoName :: AbsolutePath -> DarcsFlag Subject :: String -> DarcsFlag InReplyTo :: String -> DarcsFlag SendmailCmd :: String -> DarcsFlag Author :: String -> DarcsFlag PatchName :: String -> DarcsFlag OnePatch :: String -> DarcsFlag SeveralPatch :: String -> DarcsFlag AfterPatch :: String -> DarcsFlag UpToPatch :: String -> DarcsFlag TagName :: String -> DarcsFlag LastN :: Int -> DarcsFlag PatchIndexRange :: Int -> Int -> DarcsFlag NumberPatches :: DarcsFlag OneTag :: String -> DarcsFlag AfterTag :: String -> DarcsFlag UpToTag :: String -> DarcsFlag Context :: AbsolutePath -> DarcsFlag Count :: DarcsFlag LogFile :: AbsolutePath -> DarcsFlag RmLogFile :: DarcsFlag DistName :: String -> DarcsFlag All :: DarcsFlag Recursive :: DarcsFlag NoRecursive :: DarcsFlag Reorder :: DarcsFlag RestrictPaths :: DarcsFlag DontRestrictPaths :: DarcsFlag AskDeps :: DarcsFlag NoAskDeps :: DarcsFlag IgnoreTimes :: DarcsFlag LookForAdds :: DarcsFlag NoLookForAdds :: DarcsFlag AnyOrder :: DarcsFlag CreatorHash :: String -> DarcsFlag Intersection :: DarcsFlag Union :: DarcsFlag Complement :: DarcsFlag Sign :: DarcsFlag SignAs :: String -> DarcsFlag NoSign :: DarcsFlag SignSSL :: String -> DarcsFlag HappyForwarding :: DarcsFlag Verify :: AbsolutePath -> DarcsFlag VerifySSL :: AbsolutePath -> DarcsFlag SSHControlMaster :: DarcsFlag NoSSHControlMaster :: DarcsFlag EditDescription :: DarcsFlag NoEditDescription :: DarcsFlag Toks :: String -> DarcsFlag EditLongComment :: DarcsFlag NoEditLongComment :: DarcsFlag PromptLongComment :: DarcsFlag AllowConflicts :: DarcsFlag MarkConflicts :: DarcsFlag NoAllowConflicts :: DarcsFlag Boring :: DarcsFlag AllowCaseOnly :: DarcsFlag AllowWindowsReserved :: DarcsFlag DontGrabDeps :: DarcsFlag DontPromptForDependencies :: DarcsFlag PromptForDependencies :: DarcsFlag Compress :: DarcsFlag NoCompress :: DarcsFlag UnCompress :: DarcsFlag WorkRepoDir :: String -> DarcsFlag WorkRepoUrl :: String -> DarcsFlag RemoteRepo :: String -> DarcsFlag NewRepo :: String -> DarcsFlag Reply :: String -> DarcsFlag ApplyAs :: String -> DarcsFlag MachineReadable :: DarcsFlag HumanReadable :: DarcsFlag Pipe :: DarcsFlag Interactive :: DarcsFlag DiffCmd :: String -> DarcsFlag ExternalMerge :: String -> DarcsFlag Summary :: DarcsFlag NoSummary :: DarcsFlag Unified :: DarcsFlag Reverse :: DarcsFlag CheckPoint :: DarcsFlag Partial :: DarcsFlag Complete :: DarcsFlag Lazy :: DarcsFlag Ephemeral :: DarcsFlag FixFilePath :: AbsolutePath -> AbsolutePath -> DarcsFlag DiffFlags :: String -> DarcsFlag XMLOutput :: DarcsFlag ForceReplace :: DarcsFlag OnePattern :: PatchMatch -> DarcsFlag SeveralPattern :: PatchMatch -> DarcsFlag AfterPattern :: PatchMatch -> DarcsFlag UpToPattern :: PatchMatch -> DarcsFlag NonApply :: DarcsFlag NonVerify :: DarcsFlag NonForce :: DarcsFlag DryRun :: DarcsFlag SetDefault :: DarcsFlag NoSetDefault :: DarcsFlag FancyMoveAdd :: DarcsFlag NoFancyMoveAdd :: DarcsFlag Disable :: DarcsFlag SetScriptsExecutable :: DarcsFlag DontSetScriptsExecutable :: DarcsFlag UseHashedInventory :: DarcsFlag UseOldFashionedInventory :: DarcsFlag UseFormat2 :: DarcsFlag PristinePlain :: DarcsFlag PristineNone :: DarcsFlag NoUpdateWorking :: DarcsFlag Sibling :: AbsolutePath -> DarcsFlag Relink :: DarcsFlag RelinkPristine :: DarcsFlag NoLinks :: DarcsFlag Files :: DarcsFlag NoFiles :: DarcsFlag Directories :: DarcsFlag NoDirectories :: DarcsFlag Pending :: DarcsFlag NoPending :: DarcsFlag PosthookCmd :: String -> DarcsFlag NoPosthook :: DarcsFlag AskPosthook :: DarcsFlag RunPosthook :: DarcsFlag PrehookCmd :: String -> DarcsFlag NoPrehook :: DarcsFlag AskPrehook :: DarcsFlag RunPrehook :: DarcsFlag UMask :: String -> DarcsFlag StoreInMemory :: DarcsFlag HTTPPipelining :: DarcsFlag NoHTTPPipelining :: DarcsFlag NoCache :: DarcsFlag AllowUnrelatedRepos :: DarcsFlag NullFlag :: DarcsFlag flagToString :: [DarcsOption] -> DarcsFlag -> Maybe String isin :: (String -> DarcsFlag) -> [DarcsFlag] -> Bool arein :: [DarcsOption] -> [DarcsFlag] -> Bool definePatches :: (RepoPatch p) => FL (PatchInfoAnd p) -> IO () defineChanges :: (Patchy p) => p -> IO () fixFilePathOrStd :: [DarcsFlag] -> FilePath -> IO AbsolutePathOrStd fixUrl :: [DarcsFlag] -> String -> IO String fixSubPaths :: [DarcsFlag] -> [FilePath] -> IO [SubPath] areFileArgs :: [SubPath] -> Bool -- | A type for darcs' options. The value contains the command line -- switch(es) for the option, a help string, and a function to build a -- DarcsFlag from the command line arguments. for each -- constructor, shortSwitches represents the list of short command line -- switches which invoke the option, longSwitches the list of long -- command line switches, optDescr the description of the option, and -- argDescr the description of its argument, if any. mkFlag is a function -- which makes a DarcsFlag from the arguments of the option. data DarcsOption -- | DarcsArgOption shortSwitches longSwitches mkFlag ArgDescr -- OptDescr The constructor for options with a string argument, such -- as --tag DarcsArgOption :: [Char] -> [String] -> (String -> DarcsFlag) -> String -> String -> DarcsOption -- | DarcsAbsPathOption shortSwitches longSwitches mkFlag ArgDescr -- OptDescr The constructor for options with an absolute path -- argument, such as --sibling DarcsAbsPathOption :: [Char] -> [String] -> (AbsolutePath -> DarcsFlag) -> String -> String -> DarcsOption -- | DarcsAbsPathOrStdOption shortSwitches longSwitches mkFlag ArgDescr -- OptDescr The constructor for options with a path argument, such -- as -o DarcsAbsPathOrStdOption :: [Char] -> [String] -> (AbsolutePathOrStd -> DarcsFlag) -> String -> String -> DarcsOption -- | DarcsOptAbsPathOrStdOption shortSwitches longSwitches defaultPath -- mkFlag ArgDescr OptDescr where defaultPath is a default value for -- the Path, as a string to be parsed as if it had been given on the -- command line. The constructor for options with an optional path -- argument, such as -O DarcsOptAbsPathOption :: [Char] -> [String] -> String -> (AbsolutePath -> DarcsFlag) -> String -> String -> DarcsOption -- | DarcsNoArgOption shortSwitches longSwitches mkFlag optDescr -- The constructon fon options with no arguments. DarcsNoArgOption :: [Char] -> [String] -> DarcsFlag -> String -> DarcsOption -- | A constructor for grouping related options together, such as -- --hashed, --darcs-2 and -- --old-fashioned-inventory. DarcsMultipleChoiceOption :: [DarcsOption] -> DarcsOption option_from_darcsoption :: AbsolutePath -> DarcsOption -> [OptDescr DarcsFlag] help :: DarcsOption -- | list_option is an option which lists the command's arguments list_options :: DarcsOption -- | list_files returns the list of all non-boring files in the -- repository list_files :: IO [String] help_on_match :: DarcsOption any_verbosity :: [DarcsOption] disable :: DarcsOption notest :: DarcsOption test :: DarcsOption working_repo_dir :: DarcsOption testByDefault :: [DarcsFlag] -> [DarcsFlag] -- | remote_repo is the option used to specify the URL of the remote -- repository to work with remote_repo :: DarcsOption leave_test_dir :: DarcsOption possibly_remote_repo_dir :: DarcsOption -- | get_repourl takes a list of flags and returns the url of the -- repository specified by Repodir "directory" in that list of -- flags, if any. This flag is present if darcs was invoked with -- --repodir=DIRECTORY get_repourl :: [DarcsFlag] -> Maybe String -- | list_registered_files returns the list of all registered files -- in the repository. list_registered_files :: IO [String] -- | list_unregistered_files returns the list of all non-boring -- unregistered files in the repository. list_unregistered_files :: IO [String] author :: DarcsOption -- | get_author takes a list of flags and returns the author of the -- change specified by Author "Leo Tolstoy" in that list of -- flags, if any. Otherwise, if Pipe is present, asks the user -- who is the author and returns the answer. If neither are present, try -- to guess the author, from _darcs/prefs, and if it's not -- possible, ask the user. get_author :: [DarcsFlag] -> IO String -- | get_easy_author tries to get the author name first from the -- repository preferences, then from global preferences, then from -- environment variables. Returns Nothing if it could not get it. get_easy_author :: IO (Maybe String) -- | get_sendmail_cmd takes a list of flags and returns the sendmail -- command to be used by darcs send. Looks for a command -- specified by SendmailCmd "command" in that list of flags, if -- any. This flag is present if darcs was invoked with -- --sendmail-command=COMMAND Alternatively the user can set -- $SENDMAIL which will be used as a fallback if present. get_sendmail_cmd :: [DarcsFlag] -> IO String patchname_option :: DarcsOption distname_option :: DarcsOption logfile :: DarcsOption rmlogfile :: DarcsOption from_opt :: DarcsOption subject :: DarcsOption -- | get_subject takes a list of flags and returns the subject of -- the mail to be sent by darcs send. Looks for a subject -- specified by Subject "subject" in that list of flags, if any. -- This flag is present if darcs was invoked with -- --subject=SUBJECT get_subject :: [DarcsFlag] -> Maybe String in_reply_to :: DarcsOption get_in_reply_to :: [DarcsFlag] -> Maybe String target :: DarcsOption cc :: DarcsOption -- | get_cc takes a list of flags and returns the addresses to send -- a copy of the patch bundle to when using darcs send. looks -- for a cc address specified by Cc "address" in that list of -- flags. Returns the addresses as a comma separated string. get_cc :: [DarcsFlag] -> String output :: DarcsOption output_auto_name :: DarcsOption recursive :: String -> DarcsOption inventory_choices :: DarcsOption get_inventory_choices :: DarcsOption askdeps :: DarcsOption ignoretimes :: DarcsOption lookforadds :: DarcsOption ask_long_comment :: DarcsOption sendmail_cmd :: DarcsOption sign :: DarcsOption verify :: DarcsOption edit_description :: DarcsOption reponame :: DarcsOption tagname :: DarcsOption creatorhash :: DarcsOption apply_conflict_options :: DarcsOption reply :: DarcsOption pull_conflict_options :: DarcsOption use_external_merge :: DarcsOption deps_sel :: DarcsOption nocompress :: DarcsOption uncompress_nocompress :: DarcsOption repo_combinator :: DarcsOption options_latex :: [DarcsOption] -> String reorder_patches :: DarcsOption noskip_boring :: DarcsOption allow_problematic_filenames :: DarcsOption applyas :: DarcsOption human_readable :: DarcsOption changes_reverse :: DarcsOption only_to_files :: DarcsOption changes_format :: DarcsOption match_one_context :: DarcsOption match_one_nontag :: DarcsOption send_to_context :: DarcsOption -- | get_context takes a list of flags and returns the context -- specified by Context c in that list of flags, if any. This -- flag is present if darcs was invoked with --context=FILE get_context :: [DarcsFlag] -> Maybe AbsolutePath pipe_interactive :: DarcsOption all_interactive :: DarcsOption all_pipe_interactive :: DarcsOption summary :: DarcsOption unified :: DarcsOption tokens :: DarcsOption checkpoint :: DarcsOption partial :: DarcsOption partial_check :: DarcsOption diff_cmd_flag :: DarcsOption diffflags :: DarcsOption unidiff :: DarcsOption xmloutput :: DarcsOption force_replace :: DarcsOption dry_run :: [DarcsOption] dry_run_noxml :: DarcsOption -- | print_dry_run_message_and_exit action opts patches -- prints a string representing the action that would be taken if the -- --dry-run option had not been passed to darcs. Then darcs -- exits successfully. action is the name of the action being -- taken, like "push" opts is the list of flags which -- were sent to darcs patches is the sequence of patches which -- would be touched by action. print_dry_run_message_and_exit :: (RepoPatch p) => String -> [DarcsFlag] -> FL (PatchInfoAnd p) -> IO () -- | showFriendly flags patch returns a Doc -- representing the right way to show patch given the list -- flags of flags darcs was invoked with. showFriendly :: (Patchy p) => [DarcsFlag] -> p -> Doc match_one :: DarcsOption match_several :: DarcsOption match_range :: DarcsOption match_several_or_range :: DarcsOption happy_forwarding :: DarcsOption match_several_or_last :: DarcsOption set_default :: DarcsOption fancy_move_add :: DarcsOption set_scripts_executable :: DarcsOption sibling :: DarcsOption -- | flagsToSiblings collects the contents of all Sibling -- flags in a list of flags. flagsToSiblings :: [DarcsFlag] -> [AbsolutePath] relink :: DarcsOption relink_pristine :: DarcsOption nolinks :: DarcsOption files :: DarcsOption directories :: DarcsOption pending :: DarcsOption posthook_cmd :: DarcsOption posthook_prompt :: DarcsOption -- | get_posthook_cmd takes a list of flags and returns the posthook -- command specified by PosthookCmd a in that list of flags, if -- any. get_posthook_cmd :: [DarcsFlag] -> Maybe String prehook_cmd :: DarcsOption prehook_prompt :: DarcsOption -- | get_prehook_cmd takes a list of flags and returns the prehook -- command specified by PrehookCmd a in that list of flags, if -- any. get_prehook_cmd :: [DarcsFlag] -> Maybe String nullFlag :: DarcsOption umask_option :: DarcsOption store_in_memory :: DarcsOption -- | patch_select_flag f holds whenever f is a way -- of selecting patches such as PatchName n. patch_select_flag :: DarcsFlag -> Bool network_options :: [DarcsOption] allow_unrelated_repos :: DarcsOption instance Eq FlagContent instance Show FlagContent instance Ord FlagContent module Darcs.Commands data CommandControl Command_data :: DarcsCommand -> CommandControl Hidden_command :: DarcsCommand -> CommandControl Group_name :: String -> CommandControl data DarcsCommand DarcsCommand :: String -> String -> String -> Int -> [String] -> ([DarcsFlag] -> [String] -> IO ()) -> ([DarcsFlag] -> IO (Either String ())) -> IO [String] -> ([DarcsFlag] -> AbsolutePath -> [String] -> IO [String]) -> [DarcsOption] -> [DarcsOption] -> DarcsCommand command_name :: DarcsCommand -> String command_help :: DarcsCommand -> String command_description :: DarcsCommand -> String command_extra_args :: DarcsCommand -> Int command_extra_arg_help :: DarcsCommand -> [String] command_command :: DarcsCommand -> [DarcsFlag] -> [String] -> IO () command_prereq :: DarcsCommand -> [DarcsFlag] -> IO (Either String ()) command_get_arg_possibilities :: DarcsCommand -> IO [String] command_argdefaults :: DarcsCommand -> [DarcsFlag] -> AbsolutePath -> [String] -> IO [String] command_basic_options :: DarcsCommand -> [DarcsOption] command_advanced_options :: DarcsCommand -> [DarcsOption] SuperCommand :: String -> String -> String -> ([DarcsFlag] -> IO (Either String ())) -> [CommandControl] -> DarcsCommand command_name :: DarcsCommand -> String command_help :: DarcsCommand -> String command_description :: DarcsCommand -> String command_prereq :: DarcsCommand -> [DarcsFlag] -> IO (Either String ()) command_sub_commands :: DarcsCommand -> [CommandControl] command_alias :: String -> DarcsCommand -> DarcsCommand command_stub :: String -> String -> String -> DarcsCommand -> DarcsCommand command_options :: AbsolutePath -> DarcsCommand -> ([OptDescr DarcsFlag], [OptDescr DarcsFlag]) command_alloptions :: DarcsCommand -> ([DarcsOption], [DarcsOption]) disambiguate_commands :: [CommandControl] -> String -> [String] -> Either String (CommandArgs, [String]) data CommandArgs CommandOnly :: DarcsCommand -> CommandArgs SuperCommandOnly :: DarcsCommand -> CommandArgs SuperCommandSub :: DarcsCommand -> DarcsCommand -> CommandArgs get_command_help :: Maybe DarcsCommand -> DarcsCommand -> String get_command_mini_help :: Maybe DarcsCommand -> DarcsCommand -> String get_subcommands :: DarcsCommand -> [CommandControl] usage :: [CommandControl] -> String subusage :: DarcsCommand -> String chomp_newline :: String -> String extract_commands :: [CommandControl] -> [DarcsCommand] super_name :: Maybe DarcsCommand -> String nodefaults :: [DarcsFlag] -> AbsolutePath -> [String] -> IO [String] -- | Output functions equivalent to (putStrLn, hPutStrLn stderr, putDocLn) loggers :: [DarcsFlag] -> (String -> IO (), String -> IO (), Doc -> IO ()) module Darcs.PrintPatch -- | printPatch prints a patch on standard output. printPatch :: (Patchy p) => p -> IO () -- | contextualPrintPatch prints a patch, together with its context, -- on standard output. contextualPrintPatch :: (Patchy p) => Slurpy -> p -> IO () -- | printPatchPager runs '$PAGER' and shows a patch in it. printPatchPager :: (Patchy p) => p -> IO () -- | printFriendly opts patch prints patch in -- accordance with the flags in opts, ie, whether --verbose or -- --summary were passed at the command-line. printFriendly :: (Patchy p) => [DarcsFlag] -> p -> IO () module Darcs.Test get_test :: [DarcsFlag] -> IO (IO ExitCode) run_posthook :: [DarcsFlag] -> AbsolutePath -> IO ExitCode run_prehook :: [DarcsFlag] -> AbsolutePath -> IO ExitCode module Darcs.Commands.Add add :: DarcsCommand module Darcs.Commands.Convert convert :: DarcsCommand module Darcs.Commands.Init initialize :: DarcsCommand initialize_cmd :: [DarcsFlag] -> [String] -> IO () module Darcs.Commands.MarkConflicts markconflicts :: DarcsCommand -- | resolve is an alias for mark-conflicts. resolve :: DarcsCommand module Darcs.Commands.Mv mv :: DarcsCommand move :: DarcsCommand module Darcs.Commands.Optimize optimize :: DarcsCommand module Darcs.Commands.Remove remove :: DarcsCommand rm :: DarcsCommand unadd :: DarcsCommand module Darcs.Commands.Replace replace :: DarcsCommand module Darcs.Commands.SetPref setpref :: DarcsCommand module Darcs.Commands.ShowAuthors show_authors :: DarcsCommand module Darcs.Commands.ShowBug show_bug :: DarcsCommand module Darcs.Commands.ShowFiles show_files :: DarcsCommand show_manifest :: DarcsCommand module Darcs.Commands.ShowRepo show_repo :: DarcsCommand module Darcs.Commands.ShowTags show_tags :: DarcsCommand module Darcs.Commands.TrackDown trackdown :: DarcsCommand module Darcs.Commands.TransferMode transfer_mode :: DarcsCommand module Darcs.Commands.WhatsNew whatsnew :: DarcsCommand module Darcs.Match -- | match_first_patchset fs ps returns the part of ps -- before its first matcher, ie the one that comes first dependencywise. -- Hence, patches in match_first_patchset fs ps are the ones we -- don't want. -- -- Question: are they really? Florent match_first_patchset :: (RepoPatch p) => [DarcsFlag] -> PatchSet p -> SealedPatchSet p -- | match_second_patchset fs ps returns the part of ps -- before its second matcher, ie the one that comes last dependencywise. match_second_patchset :: (RepoPatch p) => [DarcsFlag] -> PatchSet p -> SealedPatchSet p match_patch :: (RepoPatch p) => [DarcsFlag] -> PatchSet p -> Sealed2 (Named p) -- | match_a_patch fs p tells whether p matches the -- matchers in the flags fs match_a_patch :: (Patchy p) => [DarcsFlag] -> Named p -> Bool -- | match_a_patchread fs p tells whether p matches the -- matchers in the flags listed in fs. match_a_patchread :: (Patchy p) => [DarcsFlag] -> PatchInfoAnd p -> Bool get_first_match :: (RepoPatch p) => Repository p -> [DarcsFlag] -> IO () get_nonrange_match :: (RepoPatch p) => Repository p -> [DarcsFlag] -> IO () get_partial_first_match :: (RepoPatch p) => Repository p -> [DarcsFlag] -> [FileName] -> IO () get_partial_second_match :: (RepoPatch p) => Repository p -> [DarcsFlag] -> [FileName] -> IO () get_partial_nonrange_match :: (RepoPatch p) => Repository p -> [DarcsFlag] -> [FileName] -> IO () -- | first_match fs tells whether fs implies a first -- match, that is if we match against patches from a point in the -- past on, rather than against all patches since the creation of the -- repository. first_match :: [DarcsFlag] -> Bool -- | first_match fs tells whether fs implies a second -- match, that is if we match against patches up to a point in the -- past on, rather than against all patches until now. second_match :: [DarcsFlag] -> Bool -- | have_nonrange_match flags tells whether there is a flag in -- flags which corresponds to a match that is non-range. -- Thus, --match, --patch and --index make -- have_nonrange_match true, but not --from-patch or -- --to-patch. have_nonrange_match :: [DarcsFlag] -> Bool -- | have_patchset_match flags tells whether there is a -- patchset match in the flag list. A patchset match is -- --match or --patch, or --context, but not -- --from-patch nor (!) --index. Question: Is it -- supposed not to be a subset of have_nonrange_match? have_patchset_match :: [DarcsFlag] -> Bool get_one_patchset :: (RepoPatch p) => Repository p -> [DarcsFlag] -> IO (SealedPatchSet p) checkMatchSyntax :: [DarcsFlag] -> IO () instance Eq InclusiveOrExclusive instance (RepoPatch p) => MatchMonad SlurpMonad p instance (RepoPatch p) => MatchMonad IO p module Darcs.Commands.Diff diff_command :: DarcsCommand module Darcs.Commands.Dist dist :: DarcsCommand module Darcs.Commands.Get get :: DarcsCommand module Darcs.Commands.Put put :: DarcsCommand module Darcs.Commands.ShowContents show_contents :: DarcsCommand module Darcs.Commands.Show show_command :: DarcsCommand list :: DarcsCommand query :: DarcsCommand module Darcs.Population -- | the population of a darcs repository (simpler Slurpy) data Population patchChanges :: Prim -> [(String, DirMark)] applyToPop :: PatchInfo -> FL Prim -> Population -> Population -- | read the population from a given directory dirname all -- folders and documents get the given time t -- -- This needs to be here in order to avoid a circular dependency between -- Population and Pristine. getPopFrom :: FilePath -> PatchInfo -> IO Population setPopState :: PatchInfo -> Population -> Population -- | info of a directory member data DirMark AddedFile :: DirMark RemovedFile :: DirMark MovedFile :: String -> DirMark ModifiedFile :: DirMark DullFile :: DirMark AddedDir :: DirMark RemovedDir :: DirMark MovedDir :: !String -> DirMark DullDir :: DirMark -- | get the pristine population from a repo getRepoPop :: FilePath -> IO Population getRepoPopVersion :: FilePath -> PatchInfo -> IO Population modified_to_xml :: Info -> Doc lookup_pop :: FilePath -> Population -> Maybe Population lookup_creation_pop :: PatchInfo -> FilePath -> Population -> Maybe Population module Darcs.Commands.Annotate annotate :: DarcsCommand created_as_xml :: PatchInfo -> String -> Doc module Darcs.SelectChanges with_selected_changes' :: WithPatches Prim a with_selected_changes_to_files' :: WithPatchesToFiles Prim a with_selected_last_changes_to_files' :: WithPatchesToFiles Prim a with_selected_last_changes_reversed' :: WithPatches Prim a with_selected_changes :: (RepoPatch p) => WithPatches (PatchInfoAnd p) a with_selected_changes_to_files :: (RepoPatch p) => WithPatchesToFiles (PatchInfoAnd p) a with_selected_changes_reversed :: (RepoPatch p) => WithPatches (PatchInfoAnd p) a with_selected_last_changes_to_files :: (RepoPatch p) => WithPatchesToFiles (PatchInfoAnd p) a with_selected_last_changes_to_files_reversed :: (RepoPatch p) => WithPatchesToFiles (PatchInfoAnd p) a with_selected_last_changes_reversed :: (RepoPatch p) => WithPatches (PatchInfoAnd p) a view_changes :: (RepoPatch p) => [DarcsFlag] -> Slurpy -> [FilePath] -> FL (PatchInfoAnd p) -> IO () with_selected_patch_from_repo :: (RepoPatch p) => String -> Repository p -> [DarcsFlag] -> ((FL (PatchInfoAnd p) :> PatchInfoAnd p) -> IO ()) -> IO () instance Eq WhichChanges instance Show WhichChanges module Darcs.Commands.Apply apply :: DarcsCommand module Darcs.Commands.Changes changes :: DarcsCommand module Darcs.Commands.Pull pull :: DarcsCommand module Darcs.Commands.Push push :: DarcsCommand module Darcs.Commands.Record record :: DarcsCommand commit :: DarcsCommand get_date :: [DarcsFlag] -> IO String get_log :: [DarcsFlag] -> Maybe (String, [String]) -> IO String -> FL Prim -> IO (String, [String], Maybe String) file_exists :: Slurpy -> SubPath -> IO Bool module Darcs.Commands.AmendRecord amendrecord :: DarcsCommand module Darcs.Commands.Tag tag :: DarcsCommand module Darcs.Commands.Send send :: DarcsCommand module Darcs.Commands.Unrecord unrecord :: DarcsCommand unpull :: DarcsCommand obliterate :: DarcsCommand get_last_patches :: (RepoPatch p) => [DarcsFlag] -> PatchSet p -> FlippedSeal (RL (PatchInfoAnd p)) module Darcs.Commands.Rollback rollback :: DarcsCommand module Darcs.Commands.Unrevert unrevert :: DarcsCommand write_unrevert :: (RepoPatch p) => Repository p -> FL Prim -> Slurpy -> FL Prim -> IO () module Darcs.Commands.Revert revert :: DarcsCommand module Darcs.Repository.Repair replayRepository :: (RepoPatch p) => Repository p -> [DarcsFlag] -> (RepositoryConsistency p -> IO a) -> IO a data RepositoryConsistency p RepositoryConsistent :: RepositoryConsistency p BrokenPristine :: Slurpy -> RepositoryConsistency p BrokenPatches :: Slurpy -> (PatchSet p) -> RepositoryConsistency p module Darcs.Commands.Check check :: DarcsCommand module Darcs.Commands.Repair repair :: DarcsCommand module Darcs.TheCommands -- | The commands that darcs knows about (e.g. whatsnew, record), organized -- into thematic groups. Note that hidden commands are also listed here. command_control_list :: [CommandControl] module Darcs.Commands.Help help_cmd :: [DarcsFlag] -> [String] -> IO () command_control_list :: [CommandControl] print_version :: IO () list_available_commands :: IO () module Darcs.ArgumentDefaults get_default_flags :: String -> [DarcsOption] -> [DarcsFlag] -> IO [DarcsFlag] module Darcs.RunCommand run_the_command :: String -> [String] -> IO ()