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

Darcs.Patch.Match

Synopsis

- data PatchMatch
- data Matcher p
- type MatchFun p = Sealed2 (PatchInfoAnd p) -> Bool
- patchMatch :: String -> PatchMatch
- matchPattern :: Patchy p => PatchMatch -> Matcher p
- applyMatcher :: Matcher p -> PatchInfoAnd p -> Bool
- makeMatcher :: String -> (Sealed2 (PatchInfoAnd p) -> Bool) -> Matcher p
- parseMatch :: Patchy p => PatchMatch -> Either String (MatchFun p)
- matchParser :: Patchy p => CharParser st (MatchFun p)
- helpOnMatchers :: String

# Documentation

data PatchMatch

Instances

Eq PatchMatch |
Show PatchMatch |

data Matcher p

A `Matcher` is made of a `MatchFun` which we will use to match patches and a `String` representing it.

Instances

Show (Matcher p) |

type MatchFun p = Sealed2 (PatchInfoAnd p) -> Bool

A type for predicates over patches which do not care about contexts

patchMatch :: String -> PatchMatch

matchPattern :: Patchy p => PatchMatch -> Matcher p

applyMatcher :: Matcher p -> PatchInfoAnd p -> Bool

`applyMatcher` applies a matcher to a patch.

makeMatcher :: String -> (Sealed2 (PatchInfoAnd p) -> Bool) -> Matcher p

parseMatch :: Patchy p => PatchMatch -> Either String (MatchFun p)

matchParser :: Patchy p => CharParser st (MatchFun p)

helpOnMatchers :: String

The string that is emitted when the user runs `darcs help --match`.