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

Safe HaskellNone
LanguageHaskell2010

Darcs.Patch.PatchInfoAnd

Synopsis

Documentation

data Hopefully a wX wY Source #

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.

Instances
Show (a wX wY) => Show (Hopefully a wX wY) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

showsPrec :: Int -> Hopefully a wX wY -> ShowS #

show :: Hopefully a wX wY -> String #

showList :: [Hopefully a wX wY] -> ShowS #

data PatchInfoAndG (rt :: RepoType) p wA wB Source #

PatchInfoAnd p wA wB 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.

Instances
Eq2 (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

unsafeCompare :: PatchInfoAndG rt p wA wB -> PatchInfoAndG rt p wC wD -> Bool Source #

(=\/=) :: PatchInfoAndG rt p wA wB -> PatchInfoAndG rt p wA wC -> EqCheck wB wC Source #

(=/\=) :: PatchInfoAndG rt p wA wC -> PatchInfoAndG rt p wB wC -> EqCheck wA wB Source #

PatchListFormat (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Show2 p => Show2 (PatchInfoAnd rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

showDict2 :: ShowDict (PatchInfoAnd rt p wX wY) Source #

PatchDebug p => PatchDebug (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

patchDebugDummy :: PatchInfoAndG rt p wX wY -> () Source #

(PatchId p ~ PatchInfo, Commute p) => Commute (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

commute :: (PatchInfoAndG rt p :> PatchInfoAndG rt p) wX wY -> Maybe ((PatchInfoAndG rt p :> PatchInfoAndG rt p) wX wY) Source #

(PatchId p ~ PatchInfo, Merge p) => Merge (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

merge :: (PatchInfoAndG rt p :\/: PatchInfoAndG rt p) wX wY -> (PatchInfoAndG rt p :/\: PatchInfoAndG rt p) wX wY Source #

(PatchId p ~ PatchInfo, CleanMerge p) => CleanMerge (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

cleanMerge :: (PatchInfoAndG rt p :\/: PatchInfoAndG rt p) wX wY -> Maybe ((PatchInfoAndG rt p :/\: PatchInfoAndG rt p) wX wY) Source #

PatchInspect p => PatchInspect (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Apply p => Apply (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Associated Types

type ApplyState (PatchInfoAndG rt p) :: (Type -> Type) -> Type Source #

Methods

apply :: ApplyMonad (ApplyState (PatchInfoAndG rt p)) m => PatchInfoAndG rt p wX wY -> m () Source #

unapply :: ApplyMonad (ApplyState (PatchInfoAndG rt p)) m => PatchInfoAndG rt p wX wY -> m () Source #

(Summary p, PatchListFormat p, ShowPatch p) => ShowPatch (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

content :: PatchInfoAndG rt p wX wY -> Doc Source #

description :: PatchInfoAndG rt p wX wY -> Doc Source #

summary :: PatchInfoAndG rt p wX wY -> Doc Source #

summaryFL :: FL (PatchInfoAndG rt p) wX wY -> Doc Source #

thing :: PatchInfoAndG rt p wX wY -> String Source #

things :: PatchInfoAndG rt p wX wY -> String Source #

ShowContextPatch p => ShowContextPatch (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

ShowPatchBasic p => ShowPatchBasic (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

showPatch :: ShowPatchFor -> PatchInfoAndG rt p wX wY -> Doc Source #

IdEq2 (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

(=\^/=) :: PatchInfoAndG rt p wA wB -> PatchInfoAndG rt p wA wC -> EqCheck wB wC Source #

(=/^\=) :: PatchInfoAndG rt p wA wC -> PatchInfoAndG rt p wB wC -> EqCheck wA wB Source #

Ident (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

ident :: PatchInfoAndG rt p wX wY -> PatchId (PatchInfoAndG rt p) Source #

IsHunk (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

isHunk :: PatchInfoAndG rt p wX wY -> Maybe (FileHunk wX wY) Source #

(ReadPatch p, Ident p, PatchId p ~ PatchInfo) => ReadPatch (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

RepairToFL p => Repair (PatchInfoAnd rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

applyAndTryToFix :: ApplyMonad (ApplyState (PatchInfoAnd rt p)) m => PatchInfoAnd rt p wX wY -> m (Maybe (String, PatchInfoAnd rt p wX wY)) Source #

PrimPatchBase p => PrimPatchBase (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Associated Types

type PrimOf (PatchInfoAndG rt p) :: Type -> Type -> Type Source #

Effect p => Effect (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

effect :: PatchInfoAndG rt p wX wY -> FL (PrimOf (PatchInfoAndG rt p)) wX wY Source #

(Commute p, Conflict p) => Conflict (PatchInfoAnd rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

resolveConflicts :: RL (PatchInfoAnd rt p) wO wX -> RL (PatchInfoAnd rt p) wX wY -> [ConflictDetails (PrimOf (PatchInfoAnd rt p)) wY] Source #

Show2 p => Show1 (PatchInfoAnd rt p wX) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

showDict1 :: Dict (Show (PatchInfoAnd rt p wX wX0)) Source #

Show (p wA wB) => Show (PatchInfoAndG rt p wA wB) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

showsPrec :: Int -> PatchInfoAndG rt p wA wB -> ShowS #

show :: PatchInfoAndG rt p wA wB -> String #

showList :: [PatchInfoAndG rt p wA wB] -> ShowS #

type ApplyState (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

type PatchId (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

type PrimOf (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

type PrimOf (PatchInfoAndG rt p) = PrimOf p

data WPatchInfo wA wB Source #

WPatchInfo wA wB represents the info of a patch, marked with the patch's witnesses.

Instances
Eq2 WPatchInfo Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

unsafeCompare :: WPatchInfo wA wB -> WPatchInfo wC wD -> Bool Source #

(=\/=) :: WPatchInfo wA wB -> WPatchInfo wA wC -> EqCheck wB wC Source #

(=/\=) :: WPatchInfo wA wC -> WPatchInfo wB wC -> EqCheck wA wB Source #

compareWPatchInfo :: WPatchInfo wA wB -> WPatchInfo wC wD -> EqCheck (wA, wB) (wC, wD) Source #

piap :: PatchInfo -> p wA wB -> PatchInfoAndG rt p wA wB Source #

piap i p creates a PatchInfoAnd containing p with info i.

n2pia :: (Ident p, PatchId p ~ PatchInfo) => p wX wY -> PatchInfoAndG rt p wX wY Source #

n2pia creates a PatchInfoAnd representing a Named patch.

fmapPIAP :: (p wX wY -> q wX wY) -> PatchInfoAndG rt p wX wY -> PatchInfoAndG rt q wX wY Source #

fmapFLPIAP :: (FL p wX wY -> FL q wX wY) -> PatchInfoAnd rt p wX wY -> PatchInfoAnd rt q wX wY Source #

conscientiously :: (Doc -> Doc) -> PatchInfoAndG rt p wA wB -> p wA wB Source #

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. Note: this function must be lazy in its second argument, which is why we use a lazy pattern match.

hopefully :: PatchInfoAndG rt p wA wB -> p wA wB Source #

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

winfo :: PatchInfoAnd rt p wA wB -> WPatchInfo wA wB Source #

hopefullyM :: PatchInfoAndG rt p wA wB -> Maybe (p wA wB) Source #

hopefullyM is a version of hopefully which calls fail in a monad instead of erroring.

createHashed :: String -> (String -> IO (Sealed (a wX))) -> IO (Sealed (Hopefully a wX)) Source #

extractHash :: PatchInfoAndG rt p wA wB -> Either (p wA wB) String Source #

actually :: a wX wY -> Hopefully a wX wY Source #

patchDesc :: forall rt p wX wY. PatchInfoAnd rt p wX wY -> String Source #