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

Safe Haskell | None
Language | Haskell2010

Darcs.Patch.RegChars

Synopsis

- regChars :: String -> Char -> Bool

# Documentation

regChars :: String -> Char -> Bool #

`regChars` returns a filter function that tells if a char is a member of the regChar expression or not. The regChar expression is basically a set of chars, but it can contain ranges with use of the `-` (dash), and it can also be specified as a complement set by prefixing with `^` (caret). The dash and caret, as well as the backslash, can all be escaped with a backslash to suppress their special meaning.

NOTE: The `.` (dot) is allowed to be escaped. It has no special meaning if it is not escaped, but the default `filename_toks` in Darcs.Commands.Replace uses an escaped dot (WHY?).