|
| Darcs.Repository.Internal |
|
|
|
| Synopsis |
|
|
|
| Documentation |
|
| newtype RIO p a |
| Repository IO monad. This monad-like datatype is responsible for
sequencing IO actions that modify the tentative recorded state of
the repository.
| | Constructors | | RIO | | | unsafeUnRIO :: Repository p -> IO a | converts RIO a to IO a.
|
|
| Instances | |
|
|
| (>>>=) :: RIO p a -> (a -> RIO p b) -> RIO p b |
| This is just like >>= from the Monad class except that it
respects type witness safe repository transformations. Even so, it
only tracks modifications to the tentative recorded state.
|
|
| (>>>) :: RIO p a -> RIO p b -> RIO p b |
| This corresponds to >> from the Monad class.
|
|
| returnR :: a -> RIO p a |
| This corresponds to return from the Monad class.
|
|
| rIO :: IO a -> RIO p a |
| This the RIO equivalent of liftIO.
|
|
| getRepository :: RIO p (Repository p) |
| 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.
|
|
| maybeIdentifyRepository :: [DarcsFlag] -> String -> IO (Either String (Repository p)) |
|
| identifyDarcs1Repository :: [DarcsFlag] -> String -> IO (Repository Patch) |
|
| identifyRepositoryFor :: forall p. RepoPatch p => Repository p -> String -> IO (Repository p) |
|
| isRight :: Either a b -> Bool |
|
| currentDirIsRepository :: IO Bool |
|
| amInRepository :: [DarcsFlag] -> IO (Either String ()) |
|
| seekRepo |
| :: Either String () | what to return if we don't find a repository
| | -> IO (Either String ()) | | | hunt upwards for the darcs repository
This keeps changing up one parent directory, testing at each
step if the current directory is a repository or not. $
WARNING this changes the current directory for good if matchFn succeeds
|
|
|
| amNotInRepository :: [DarcsFlag] -> IO (Either String ()) |
|
| findRepository :: [DarcsFlag] -> IO (Either String ()) |
|
| slurp_pending :: RepoPatch p => Repository p -> IO Slurpy |
|
| slurp_recorded :: RepoPatch p => Repository p -> IO Slurpy |
|
| slurp_recorded_and_unrecorded :: RepoPatch p => Repository p -> IO (Slurpy, Slurpy) |
|
| pendingName :: RepoType p -> String |
|
| read_pending :: RepoPatch p => Repository p -> IO (Sealed (FL Prim)) |
|
| add_to_pending :: RepoPatch p => Repository p -> FL Prim -> IO () |
|
| readPrims :: ByteString -> Sealed (FL Prim) |
|
| read_pendingfile :: String -> IO (Sealed (FL Prim)) |
|
| make_new_pending :: forall p. RepoPatch p => Repository p -> FL Prim -> IO () |
|
| sift_for_pending :: FL Prim -> Sealed (FL Prim) |
|
| get_unrecorded_no_look_for_adds :: RepoPatch p => Repository p -> [FileName] -> IO (FL Prim) |
|
| get_unrecorded_unsorted :: RepoPatch p => Repository p -> IO (FL Prim) |
|
| get_unrecorded :: RepoPatch p => Repository p -> IO (FL Prim) |
|
| get_unrecorded_in_files_unsorted :: RepoPatch p => Repository p -> [FileName] -> IO (FL Prim) |
| Gets the unrecorded changes in the given paths in the current repository,
without sorting them for presentation to the user
|
|
| get_unrecorded_in_files :: RepoPatch p => Repository p -> [FileName] -> IO (FL Prim) |
| Gets the unrecorded changes in the given paths in the current repository.
|
|
| get_unrecorded_private :: RepoPatch p => ([DarcsFlag] -> [DarcsFlag]) -> Repository p -> [FileName] -> IO (FL Prim) |
| The unrecorded includes the pending and the working directory changes.
The third argument is a list of paths: if this list is [], it will diff
the whole repo, but if there are elements in it, the function will return
only changes to files under those paths. The paths must be fixed paths
starting with ., but need not yet be unique.
|
|
| read_repo :: RepoPatch p => Repository p -> IO (PatchSet p) |
|
| readTentativeRepo :: RepoPatch p => Repository p -> IO (PatchSet p) |
|
| makePatchLazy :: RepoPatch p => Repository p -> PatchInfoAnd p -> IO (PatchInfoAnd p) |
|
| sync_repo :: Repository p -> IO () |
|
| prefsUrl :: Repository p -> String |
|
| unrevertUrl :: Repository p -> String |
|
| applyToWorking :: Patchy p => Repository p1 -> [DarcsFlag] -> p -> IO () |
|
| handle_pend_for_add :: forall p q. (RepoPatch p, Effect q) => Repository p -> q -> IO () |
|
| is_simple :: Prim -> Bool |
|
| crude_sift :: FL Prim -> FL Prim |
|
| data HashedVsOld a |
|
|
| decideHashedOrNormal :: Monad m => RepoFormat -> HashedVsOld (m a) -> m a |
|
| 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)) |
|
| data MakeChanges |
| Constructors | | MakeChanges | | | DontMakeChanges | |
| Instances | |
|
|
| tentativelyMergePatches_ :: forall p. RepoPatch p => MakeChanges -> Repository p -> String -> [DarcsFlag] -> FL (PatchInfoAnd p) -> FL (PatchInfoAnd p) -> IO (Sealed (FL Prim)) |
|
| announce_merge_conflicts :: String -> [DarcsFlag] -> FL Prim -> IO Bool |
|
| check_unrecorded_conflicts :: forall p. RepoPatch p => [DarcsFlag] -> FL (Named p) -> IO Bool |
|
| tentativelyAddPatch :: RepoPatch p => Repository p -> [DarcsFlag] -> PatchInfoAnd p -> IO () |
|
| data UpdatePristine |
| Constructors | | UpdatePristine | | | DontUpdatePristine | |
| Instances | |
|
|
| tentativelyAddPatch_ :: RepoPatch p => UpdatePristine -> Repository p -> [DarcsFlag] -> PatchInfoAnd p -> IO () |
|
| applyToTentativePristine :: (Effect q, Patchy q) => Repository p -> q -> IO () |
|
| tentativelyAddToPending :: forall p. RepoPatch p => Repository p -> [DarcsFlag] -> FL Prim -> 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.
|
|
| setTentativePending :: forall p. RepoPatch p => Repository p -> FL Prim -> IO () |
| setTentativePending is basically unsafe. It overwrites the pending state with a new one, not related to
the repository state.
|
|
| prepend :: forall p. RepoPatch p => Repository p -> FL Prim -> IO () |
| prepend is basically unsafe. It overwrites the pending state
with a new one, not related to the repository state.
|
|
| tentativelyRemovePatches :: RepoPatch p => Repository p -> [DarcsFlag] -> FL (Named p) -> IO () |
|
| tentativelyRemovePatches_ :: forall p. RepoPatch p => UpdatePristine -> Repository p -> [DarcsFlag] -> FL (Named p) -> IO () |
|
| tentativelyReplacePatches :: forall p. RepoPatch p => Repository p -> [DarcsFlag] -> FL (Named p) -> IO () |
|
| finalize_pending :: RepoPatch p => Repository p -> IO () |
|
| finalizeRepositoryChanges :: RepoPatch p => Repository p -> IO () |
|
| testTentative :: RepoPatch p => Repository p -> IO () |
|
| testRecorded :: RepoPatch p => Repository p -> IO () |
|
| testAny :: RepoPatch p => (Repository p -> ((AbsolutePath -> IO ()) -> IO ()) -> (AbsolutePath -> IO ()) -> IO ()) -> Repository p -> IO () |
|
| revertRepositoryChanges :: RepoPatch p => Repository p -> IO () |
|
| patchSetToPatches :: RepoPatch p => RL (RL (PatchInfoAnd p)) -> FL (Named p) |
|
| getUMask :: [DarcsFlag] -> Maybe String |
|
| withGutsOf :: Repository p -> IO () -> IO () |
|
| withRepository :: [DarcsFlag] -> (forall p. RepoPatch p => Repository p -> IO a) -> IO a |
|
| withRepositoryDirectory :: forall a. [DarcsFlag] -> String -> (forall p. RepoPatch p => Repository p -> IO a) -> IO a |
|
| works around the lack of impredicative instantiation in GHC
|
|
| ($-) :: ((forall p. RepoPatch p => Repository p -> IO a) -> IO a) -> (forall p. RepoPatch p => Repository p -> IO a) -> IO a |
|
| withRepoLock :: [DarcsFlag] -> (forall p. RepoPatch p => Repository p -> IO a) -> IO a |
|
| withRepoReadLock :: [DarcsFlag] -> (forall p. RepoPatch p => Repository p -> IO a) -> IO a |
|
| remove_from_unrevert_context :: forall p. RepoPatch p => Repository p -> FL (Named p) -> IO () |
|
| optimizeInventory :: RepoPatch p => Repository p -> IO () |
|
| cleanRepository :: RepoPatch p => Repository p -> IO () |
|
| replacePristineFromSlurpy :: Repository p -> Slurpy -> IO () |
|
| createPristineDirectoryTree :: RepoPatch p => Repository p -> FilePath -> IO () |
|
| createPartialsPristineDirectoryTree :: (FilePathLike fp, RepoPatch p) => Repository p -> [fp] -> FilePath -> IO () |
|
| pristineFromWorking :: RepoPatch p => Repository p -> IO () |
|
| withRecorded :: RepoPatch p => Repository p -> ((AbsolutePath -> IO a) -> IO a) -> (AbsolutePath -> IO a) -> IO a |
|
| checkPristineAgainstSlurpy :: RepoPatch p => Repository p -> Slurpy -> IO Bool |
|
| withTentative :: forall p a. RepoPatch p => Repository p -> ((AbsolutePath -> IO a) -> IO a) -> (AbsolutePath -> IO a) -> IO a |
|
| getMarkedupFile :: RepoPatch p => Repository p -> PatchInfo -> FilePath -> IO MarkedUpFile |
|
| do_mark_all :: RepoPatch p => FL (PatchInfoAnd p) -> (FilePath, MarkedUpFile) -> (FilePath, MarkedUpFile) |
|
| setScriptsExecutable :: IO () |
| 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.
|
|
| Produced by Haddock version 2.4.2 |