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

Safe Haskell | None
Language | Haskell2010

Darcs.Patch.Prim.V1.Core

Synopsis

- data Prim wX wY where
  - Move :: !FileName -> !FileName -> Prim wX wY
  - DP :: !FileName -> !(DirPatchType wX wY) -> Prim wX wY
  - FP :: !FileName -> !(FilePatchType wX wY) -> Prim wX wY
  - ChangePref :: !String -> !String -> !String -> Prim wX wY
- data DirPatchType wX wY
  - = RmDir
  - | AddDir
- data FilePatchType wX wY
  - = RmFile
  - | AddFile
  - | Hunk !Int [ByteString] [ByteString]
  - | TokReplace !String !String !String
  - | Binary ByteString ByteString
- isIdentity :: Prim wX wY -> EqCheck wX wY
- comparePrim :: Prim wX wY -> Prim wW wZ -> Ordering

# Documentation

data Prim wX wY where #

Constructors

Move :: !FileName -> !FileName -> Prim wX wY |
DP :: !FileName -> !(DirPatchType wX wY) -> Prim wX wY |
FP :: !FileName -> !(FilePatchType wX wY) -> Prim wX wY |
ChangePref :: !String -> !String -> !String -> Prim wX wY |

Instances

MyEq Prim # |
Methods unsafeCompare :: Prim wA wB -> Prim wC wD -> Bool # (=\/=) :: Prim wA wB -> Prim wA wC -> EqCheck wB wC # (=/\=) :: Prim wA wC -> Prim wB wC -> EqCheck wA wB #
PatchDebug Prim # |
Methods patchDebugDummy :: Prim wX wY -> () #
PatchInspect Prim # |
Methods listTouchedFiles :: Prim wX wY -> [FilePath] # hunkMatches :: (ByteString -> Bool) -> Prim wX wY -> Bool #
Invert Prim # |
Methods invert :: Prim wX wY -> Prim wY wX #
IsHunk Prim # |
Methods isHunk :: Prim wX wY -> Maybe (FileHunk wX wY) #
PrimConstruct Prim # |
Methods addfile :: FilePath -> Prim wX wY # rmfile :: FilePath -> Prim wX wY # adddir :: FilePath -> Prim wX wY # rmdir :: FilePath -> Prim wX wY # move :: FilePath -> FilePath -> Prim wX wY # changepref :: String -> String -> String -> Prim wX wY # hunk :: FilePath -> Int -> [ByteString] -> [ByteString] -> Prim wX wY # tokreplace :: FilePath -> String -> String -> String -> Prim wX wY # binary :: FilePath -> ByteString -> ByteString -> Prim wX wY # primFromHunk :: FileHunk wX wY -> Prim wX wY # anIdentity :: Prim wX wX #
PrimClassify Prim # |
Methods primIsAddfile :: Prim wX wY -> Bool # primIsRmfile :: Prim wX wY -> Bool # primIsAdddir :: Prim wX wY -> Bool # primIsRmdir :: Prim wX wY -> Bool # primIsMove :: Prim wX wY -> Bool # primIsHunk :: Prim wX wY -> Bool # primIsTokReplace :: Prim wX wY -> Bool # primIsBinary :: Prim wX wY -> Bool # primIsSetpref :: Prim wX wY -> Bool # is_filepatch :: Prim wX wY -> Maybe FileName #
Eq (Prim wX wY) # |
Methods (==) :: Prim wX wY -> Prim wX wY -> Bool # (/=) :: Prim wX wY -> Prim wX wY -> Bool #
type ApplyState Prim # |
type ApplyState Prim = Tree
type PrimOf Prim # |
type PrimOf Prim = Prim

data DirPatchType wX wY #

Constructors

RmDir |
AddDir |

Instances

MyEq DirPatchType # |
Methods unsafeCompare :: DirPatchType wA wB -> DirPatchType wC wD -> Bool # (=\/=) :: DirPatchType wA wB -> DirPatchType wA wC -> EqCheck wB wC # (=/\=) :: DirPatchType wA wC -> DirPatchType wB wC -> EqCheck wA wB #
Eq (DirPatchType wX wY) # |
Methods (==) :: DirPatchType wX wY -> DirPatchType wX wY -> Bool # (/=) :: DirPatchType wX wY -> DirPatchType wX wY -> Bool #
Ord (DirPatchType wX wY) # |
Methods compare :: DirPatchType wX wY -> DirPatchType wX wY -> Ordering # (<) :: DirPatchType wX wY -> DirPatchType wX wY -> Bool # (<=) :: DirPatchType wX wY -> DirPatchType wX wY -> Bool # (>) :: DirPatchType wX wY -> DirPatchType wX wY -> Bool # (>=) :: DirPatchType wX wY -> DirPatchType wX wY -> Bool # max :: DirPatchType wX wY -> DirPatchType wX wY -> DirPatchType wX wY # min :: DirPatchType wX wY -> DirPatchType wX wY -> DirPatchType wX wY #

data FilePatchType wX wY #

Constructors

RmFile |
AddFile |
Hunk !Int [ByteString] [ByteString] |
TokReplace !String !String !String |
Binary ByteString ByteString |

Instances

MyEq FilePatchType # |
Methods unsafeCompare :: FilePatchType wA wB -> FilePatchType wC wD -> Bool # (=\/=) :: FilePatchType wA wB -> FilePatchType wA wC -> EqCheck wB wC # (=/\=) :: FilePatchType wA wC -> FilePatchType wB wC -> EqCheck wA wB #
Eq (FilePatchType wX wY) # |
Methods (==) :: FilePatchType wX wY -> FilePatchType wX wY -> Bool # (/=) :: FilePatchType wX wY -> FilePatchType wX wY -> Bool #
Ord (FilePatchType wX wY) # |
Methods compare :: FilePatchType wX wY -> FilePatchType wX wY -> Ordering # (<) :: FilePatchType wX wY -> FilePatchType wX wY -> Bool # (<=) :: FilePatchType wX wY -> FilePatchType wX wY -> Bool # (>) :: FilePatchType wX wY -> FilePatchType wX wY -> Bool # (>=) :: FilePatchType wX wY -> FilePatchType wX wY -> Bool # max :: FilePatchType wX wY -> FilePatchType wX wY -> FilePatchType wX wY # min :: FilePatchType wX wY -> FilePatchType wX wY -> FilePatchType wX wY #

isIdentity :: Prim wX wY -> EqCheck wX wY #

comparePrim :: Prim wX wY -> Prim wW wZ -> Ordering #

`comparePrim` `p1 p2` is used to provide an arbitrary ordering between `p1` and `p2`. Basically, identical patches are equal and `Move < DP < FP < ChangePref`. Everything else is compared in dictionary order of its arguments.