<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Darcs.Patch.Choices</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[ window.onload = function () {pageLoad();setSynopsis("mini_Darcs-Patch-Choices.html");}; //]]> </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Darcs-Patch-Choices.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">darcs-2.8.3: a distributed, interactive, smart revision control system</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe-Infered</td></tr></table><p class="caption">Darcs.Patch.Choices</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>PatchChoices divides a sequence of patches into three sets: <a href="first.html">first</a>, <a href="middle.html">middle</a> and <a href="last.html">last</a>, such that all patches can be applied, if you first apply the first ones then the middle ones and then the last ones. Obviously if there are dependencies between the patches that will put a constraint on how you can choose to divide them up. The PatchChoices data type and associated functions are here to deal with many of the common cases that come up when choosing a subset of a group of patches. </p><p><code><a href="Darcs-Patch-Choices.html#v:forceLast">forceLast</a></code> tells PatchChoices that a particular patch is required to be in the <a href="last.html">last</a> group, which also means that any patches that depend on it must be in the <a href="last.html">last</a> group. </p><p>Internally, a PatchChoices doesn't always reorder the patches until it is asked for the final output (e.g. by <code>get_first_choice</code>). Instead, each patch is placed in a state of definitely first, definitely last and undecided; undecided leans towards <a href="middle.html">middle</a>. The patches that are first are commuted to the head immediately, but patches that are middle and last are mixed together. In case you're wondering about the first-middle-last language, it's because in some cases the <a href="yes.html">yes</a> answers will be last (as is the case for the revert command), and in others first (as in record, pull and push). </p><p>Some patch marked <a href="middle.html">middle</a> may in fact be unselectable because of dependencies: when a patch is marked <a href="last.html">last</a>, its dependencies are not updated until patchSlot is called on them. </p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:PatchChoices">PatchChoices</a> p x y</li><li class="src short"><a href="#v:patchChoices">patchChoices</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> p x y -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y</li><li class="src short"><a href="#v:patchChoicesTps">patchChoicesTps</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> p x y -> (<a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y, <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p) x y)</li><li class="src short"><a href="#v:patchChoicesTpsSub">patchChoicesTpsSub</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Darcs-Patch-Choices.html#t:Tag">Tag</a> -> <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> p x y -> (<a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y, <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p) x y)</li><li class="src short"><a href="#v:patchSlot">patchSlot</a> :: <span class="keyword">forall</span> p a b x y. <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p a b -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y -> (<a href="Darcs-Patch-Choices.html#t:Slot">Slot</a>, <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y)</li><li class="src short"><a href="#v:patchSlot-39-">patchSlot'</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p a b -> <a href="/usr/share/doc/ghc/html/libraries/mtl-2.1.1/Control-Monad-State-Lazy.html#t:StateT">StateT</a> (<a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y) <a href="/usr/share/doc/ghc/html/libraries/transformers-0.3.0.0/Data-Functor-Identity.html#t:Identity">Identity</a> <a href="Darcs-Patch-Choices.html#t:Slot">Slot</a></li><li class="src short"><a href="#v:getChoices">getChoices</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y -> (<a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p) <a href="Darcs-Witnesses-Ordered.html#t::-62-">:></a> (<a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p) <a href="Darcs-Witnesses-Ordered.html#t::-62-">:></a> <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p))) x y</li><li class="src short"><a href="#v:refineChoices">refineChoices</a> :: (<a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Functor">Functor</a> m) => (<span class="keyword">forall</span> u v. <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p) u v -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p u v -> m (<a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p u v)) -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y -> m (<a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y)</li><li class="src short"><a href="#v:separateFirstMiddleFromLast">separateFirstMiddleFromLast</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x z -> (<a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p) <a href="Darcs-Witnesses-Ordered.html#t::-62-">:></a> <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p)) x z</li><li class="src short"><a href="#v:separateFirstFromMiddleLast">separateFirstFromMiddleLast</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x z -> (<a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p) <a href="Darcs-Witnesses-Ordered.html#t::-62-">:></a> <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p)) x z</li><li class="src short"><a href="#v:forceFirst">forceFirst</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Patch-Choices.html#t:Tag">Tag</a> -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b</li><li class="src short"><a href="#v:forceFirsts">forceFirsts</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => [<a href="Darcs-Patch-Choices.html#t:Tag">Tag</a>] -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b</li><li class="src short"><a href="#v:forceLast">forceLast</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Patch-Choices.html#t:Tag">Tag</a> -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b</li><li class="src short"><a href="#v:forceLasts">forceLasts</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => [<a href="Darcs-Patch-Choices.html#t:Tag">Tag</a>] -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b</li><li class="src short"><a href="#v:forceMatchingFirst">forceMatchingFirst</a> :: <span class="keyword">forall</span> p a b. <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => (<span class="keyword">forall</span> x y. <a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p x y -> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b</li><li class="src short"><a href="#v:forceMatchingLast">forceMatchingLast</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => (<span class="keyword">forall</span> x y. <a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p x y -> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b</li><li class="src short"><a href="#v:selectAllMiddles">selectAllMiddles</a> :: <span class="keyword">forall</span> p x y. <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y</li><li class="src short"><a href="#v:makeUncertain">makeUncertain</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Patch-Choices.html#t:Tag">Tag</a> -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b</li><li class="src short"><a href="#v:makeEverythingLater">makeEverythingLater</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y</li><li class="src short"><a href="#v:makeEverythingSooner">makeEverythingSooner</a> :: <span class="keyword">forall</span> p x y. <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y</li><li class="src short"><span class="keyword">data</span> <a href="#t:TaggedPatch">TaggedPatch</a> p x y</li><li class="src short"><span class="keyword">data</span> <a href="#t:Tag">Tag</a> </li><li class="src short"><a href="#v:tag">tag</a> :: <a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p x y -> <a href="Darcs-Patch-Choices.html#t:Tag">Tag</a></li><li class="src short"><a href="#v:tpPatch">tpPatch</a> :: <a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p x y -> p x y</li><li class="src short"><span class="keyword">data</span> <a href="#t:Slot">Slot</a> <ul class="subs"><li>= <a href="#v:InFirst">InFirst</a> </li><li>| <a href="#v:InMiddle">InMiddle</a> </li><li>| <a href="#v:InLast">InLast</a> </li></ul></li><li class="src short"><a href="#v:substitute">substitute</a> :: <span class="keyword">forall</span> p x y. <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Witnesses-Sealed.html#t:Sealed2">Sealed2</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p <a href="Darcs-Witnesses-Ordered.html#t::-124--124-:">:||:</a> <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p)) -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:PatchChoices" class="def">PatchChoices</a> p x y <a href="src/Darcs-Patch-Choices.html#PatchChoices" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:patchChoices" class="def">patchChoices</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> p x y -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y<a href="src/Darcs-Patch-Choices.html#patchChoices" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:patchChoicesTps" class="def">patchChoicesTps</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> p x y -> (<a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y, <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p) x y)<a href="src/Darcs-Patch-Choices.html#patchChoicesTps" class="link">Source</a></p><div class="doc"><p>Tag a sequence of patches. </p></div></div><div class="top"><p class="src"><a name="v:patchChoicesTpsSub" class="def">patchChoicesTpsSub</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Darcs-Patch-Choices.html#t:Tag">Tag</a> -> <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> p x y -> (<a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y, <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p) x y)<a href="src/Darcs-Patch-Choices.html#patchChoicesTpsSub" class="link">Source</a></p><div class="doc"><p>Tag a sequence of patches as subpatches of an existing tag. This is intended for use when substituting a patch for an equivalent patch or patches. </p></div></div><div class="top"><p class="src"><a name="v:patchSlot" class="def">patchSlot</a> :: <span class="keyword">forall</span> p a b x y. <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p a b -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y -> (<a href="Darcs-Patch-Choices.html#t:Slot">Slot</a>, <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y)<a href="src/Darcs-Patch-Choices.html#patchSlot" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:patchSlot-39-" class="def">patchSlot'</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p a b -> <a href="/usr/share/doc/ghc/html/libraries/mtl-2.1.1/Control-Monad-State-Lazy.html#t:StateT">StateT</a> (<a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y) <a href="/usr/share/doc/ghc/html/libraries/transformers-0.3.0.0/Data-Functor-Identity.html#t:Identity">Identity</a> <a href="Darcs-Patch-Choices.html#t:Slot">Slot</a><a href="src/Darcs-Patch-Choices.html#patchSlot%27" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:getChoices" class="def">getChoices</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y -> (<a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p) <a href="Darcs-Witnesses-Ordered.html#t::-62-">:></a> (<a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p) <a href="Darcs-Witnesses-Ordered.html#t::-62-">:></a> <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p))) x y<a href="src/Darcs-Patch-Choices.html#getChoices" class="link">Source</a></p><div class="doc"><p><code>getChoices</code> evaluates a <code>PatchChoices</code> into the first, middle and last sequences by doing the commutes that were needed. </p></div></div><div class="top"><p class="src"><a name="v:refineChoices" class="def">refineChoices</a> :: (<a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Functor">Functor</a> m) => (<span class="keyword">forall</span> u v. <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p) u v -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p u v -> m (<a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p u v)) -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y -> m (<a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y)<a href="src/Darcs-Patch-Choices.html#refineChoices" class="link">Source</a></p><div class="doc"><p><code>refineChoices act</code> performs <code>act</code> on the middle part of a sequence of choices, in order to hopefully get more patches into the <code>first</code> and <code>last</code> parts of a <code>PatchChoices</code>. </p></div></div><div class="top"><p class="src"><a name="v:separateFirstMiddleFromLast" class="def">separateFirstMiddleFromLast</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x z -> (<a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p) <a href="Darcs-Witnesses-Ordered.html#t::-62-">:></a> <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p)) x z<a href="src/Darcs-Patch-Choices.html#separateFirstMiddleFromLast" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:separateFirstFromMiddleLast" class="def">separateFirstFromMiddleLast</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x z -> (<a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p) <a href="Darcs-Witnesses-Ordered.html#t::-62-">:></a> <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p)) x z<a href="src/Darcs-Patch-Choices.html#separateFirstFromMiddleLast" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:forceFirst" class="def">forceFirst</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Patch-Choices.html#t:Tag">Tag</a> -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b<a href="src/Darcs-Patch-Choices.html#forceFirst" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:forceFirsts" class="def">forceFirsts</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => [<a href="Darcs-Patch-Choices.html#t:Tag">Tag</a>] -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b<a href="src/Darcs-Patch-Choices.html#forceFirsts" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:forceLast" class="def">forceLast</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Patch-Choices.html#t:Tag">Tag</a> -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b<a href="src/Darcs-Patch-Choices.html#forceLast" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:forceLasts" class="def">forceLasts</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => [<a href="Darcs-Patch-Choices.html#t:Tag">Tag</a>] -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b<a href="src/Darcs-Patch-Choices.html#forceLasts" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:forceMatchingFirst" class="def">forceMatchingFirst</a> :: <span class="keyword">forall</span> p a b. <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => (<span class="keyword">forall</span> x y. <a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p x y -> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b<a href="src/Darcs-Patch-Choices.html#forceMatchingFirst" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:forceMatchingLast" class="def">forceMatchingLast</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => (<span class="keyword">forall</span> x y. <a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p x y -> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b<a href="src/Darcs-Patch-Choices.html#forceMatchingLast" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:selectAllMiddles" class="def">selectAllMiddles</a> :: <span class="keyword">forall</span> p x y. <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y<a href="src/Darcs-Patch-Choices.html#selectAllMiddles" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:makeUncertain" class="def">makeUncertain</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Patch-Choices.html#t:Tag">Tag</a> -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p a b<a href="src/Darcs-Patch-Choices.html#makeUncertain" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:makeEverythingLater" class="def">makeEverythingLater</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y<a href="src/Darcs-Patch-Choices.html#makeEverythingLater" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:makeEverythingSooner" class="def">makeEverythingSooner</a> :: <span class="keyword">forall</span> p x y. <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y<a href="src/Darcs-Patch-Choices.html#makeEverythingSooner" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:TaggedPatch" class="def">TaggedPatch</a> p x y <a href="src/Darcs-Patch-Choices.html#TaggedPatch" class="link">Source</a></p><div class="subs instances"><p id="control.i:TaggedPatch" class="caption collapser" onclick="toggleSection('i:TaggedPatch')">Instances</p><div id="section.i:TaggedPatch" class="show"><table><tr><td class="src"><a href="Darcs-Witnesses-Eq.html#t:MyEq">MyEq</a> p => <a href="Darcs-Witnesses-Eq.html#t:MyEq">MyEq</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Darcs-Patch-Commute.html#t:Commute">Commute</a> p => <a href="Darcs-Patch-Commute.html#t:Commute">Commute</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Darcs-Patch-Invert.html#t:Invert">Invert</a> p => <a href="Darcs-Patch-Invert.html#t:Invert">Invert</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Darcs-Patch-Merge.html#t:Merge">Merge</a> p => <a href="Darcs-Patch-Merge.html#t:Merge">Merge</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Darcs-Patch-Inspect.html#t:PatchInspect">PatchInspect</a> p => <a href="Darcs-Patch-Inspect.html#t:PatchInspect">PatchInspect</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p)</td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Tag" class="def">Tag</a> <a href="src/Darcs-Patch-Choices.html#Tag" class="link">Source</a></p><div class="doc"><p><code>TG</code> <code>mp i</code> acts as a temporary identifier to help us keep track of patches during the selection process. These are useful for finding patches that may have moved around during patch selection (being pushed forwards or backwards as dependencies arise). </p><p>The identifier is implemented as a tuple <code>TG mp i</code>. The <code>i</code> is just some arbitrary label, expected to be unique within the patches being scrutinised. The <code>mp</code> is motivated by patch splitting; it provides a convenient way to generate a new identifier from the patch being split. For example, if we split a patch identified as <code>TG Nothing 5</code>, the resulting sub-patches could be identified as <code>TG (TG Nothing 5) 1</code>, <code>TG (TG Nothing 5) 2</code>, etc. </p></div><div class="subs instances"><p id="control.i:Tag" class="caption collapser" onclick="toggleSection('i:Tag')">Instances</p><div id="section.i:Tag" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> <a href="Darcs-Patch-Choices.html#t:Tag">Tag</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> <a href="Darcs-Patch-Choices.html#t:Tag">Tag</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:tag" class="def">tag</a> :: <a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p x y -> <a href="Darcs-Patch-Choices.html#t:Tag">Tag</a><a href="src/Darcs-Patch-Choices.html#tag" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:tpPatch" class="def">tpPatch</a> :: <a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p x y -> p x y<a href="src/Darcs-Patch-Choices.html#tpPatch" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Slot" class="def">Slot</a> <a href="src/Darcs-Patch-Choices.html#Slot" class="link">Source</a></p><div class="doc"><p>See module documentation for <code><a href="Darcs-Patch.html#t:Choices">Choices</a></code> </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:InFirst" class="def">InFirst</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:InMiddle" class="def">InMiddle</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:InLast" class="def">InLast</a></td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><a name="v:substitute" class="def">substitute</a> :: <span class="keyword">forall</span> p x y. <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p => <a href="Darcs-Witnesses-Sealed.html#t:Sealed2">Sealed2</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p <a href="Darcs-Witnesses-Ordered.html#t::-124--124-:">:||:</a> <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> (<a href="Darcs-Patch-Choices.html#t:TaggedPatch">TaggedPatch</a> p)) -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y -> <a href="Darcs-Patch-Choices.html#t:PatchChoices">PatchChoices</a> p x y<a href="src/Darcs-Patch-Choices.html#substitute" class="link">Source</a></p><div class="doc"><p><code><a href="Darcs-Patch-Choices.html#v:substitute">substitute</a></code> <code>(a :||: bs)</code> <code>pcs</code> replaces <code>a</code> with <code>bs</code> in <code>pcs</code> preserving the choice associated with <code>a</code> </p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.10.0</p></div></body></html>