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

Safe HaskellNone




class NameHack p where Source

When commuting a Normal patch past a Suspended one, we need to adjust the internals of the Suspended one to take account of the effect of the Normal patch. This includes the name of the Normal patch - but the layering is such that we are actually commuting patches of type Named (Rebasing p) - i.e. Rebasing p doesn't actually contain the name. We therefore need to add a hook to the Commute instances for Named which Rebasing can then implement.

There is a default so that other patch types only need to declare the instance.

Minimal complete definition



nameHack :: DiffAlgorithm -> Maybe (PatchInfo -> FL p wX wY -> FL p wX wY, PatchInfo -> FL p wW wZ -> FL p wW wZ) Source