h&4p2      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl Safe-InferredP diff-locExtend  with an "origin" point from which vectors can be drawn to all points. To make the interface slightly more general, only the partial application  (origin .-.) needs to be supplied.Laws:  <= x diff-locAction d'un Monode Ordonn. Ordered monoid actions.An ordered set of points Ord p.1An ordered monoid of translations (or "vectors") (Ord (Trans p), Monoid ( p)).In addition to the m and n- laws, ordered monoids must have a monotone (o): #v <= v' ==> w <= w' => (v o w) <= (v' o w') -Points can be translated along vectors using ().Given two ordered points i <= j, j  i finds a vector n such that  i + n = j.In other words, we only require the existence of "positive" translations (this is unlike affine spaces, where translations exist between any two points). This makes it possible to implement this class for line-column locations (DiffLoc.Colline)), where translations are not invertible.() is not part of a standard definition of ordered monoid actions. Feel free to suggest a better name for this structure or a way to not depend on this operation.Laws:  (x  v)  w = x  (v o w) x p y ==> x  (y  x) = y (x  v)  x = x diff-loc'Type of translations between points of p.diff-locTranslate a point.diff-loc!Translation between two points. j .-.? i must be defined (q) if i <= j,There is an unsafe wrapper () in DiffLoc.Unsafe.diff-locShift algebra.Laws:  <$>   r s =   r ( s)   <$>   r s =   r (  s)  <$>   r s =   r ( s)   <$>   r s =   r (  s)   r b = Just d <==>   r d = Just b   r s = Just z <==>   r z = Just s   r s = Just z &&   s r = Just q ==> z o r = q o s   r s = Just z &&   s r = Just q ==> r o z = s o q  Duality laws:  src = tgt .  tgt = src .  shiftBlock = coshiftBlock .  coshiftBlock = shiftBlock .  coshiftR = shiftR .  shiftR = coshiftR .  diff-loc)Partial ordering of interval-like things.diff-locPrecedes but not adjacent, provided you have a notion of adjacence. Otherwise it's fine to equate this with precedes.rdiff-locAn unsafe variant of (). This will be redefined in DiffLoc.Unsafe.diff-loc$Translate the origin along a vector.  x <= y  = ofOrigin x <= ofOrigin y  x  v =  (x  v)  x   y = x  y diff-loc.Find the vector from the origin to this point.  x <= y  =! fromOrigin x <= fromOrigin y  ( x) = x  ( v) = v  (x .+ v) =  x <> v     6r6 Safe-Inferred 1?Hdiff-locType of nonnegative offsets.diff-locOne-dimensional indices with an origin (an initial index). Indices must be greater than the origin, hence the constructor is hidden.Use  to construct indices, with TypeApplications, to make the indexing scheme explicit, and  to destruct them. /(origin :: IndexFrom n a) <= i -- for all i diff-locOne-dimensional indices.sdiff-locReify a t. knownNum @42 = 42 diff-locConstructor for . See also   in DiffLoc.Unsafe, a variant of & that throws errors instead of using Maybe.diff-loc specialized to 0-indexing.diff-loc specialized to 1-indexing.diff-locDestructor for .diff-loc specialized to 0-indexing.diff-loc specialized to 1-indexing.diff-loc+Convert from zero-indexing to one-indexing.diff-loc+Convert from one-indexing to zero-indexing. diff-locConstruct a nonnegative . See also   in DiffLoc.Unsafe, a variant of  & that throws errors instead of using Maybe.!diff-locUnwrap . ! ! Safe-Inferred5? <udiff-locA newtype to carry a v instance.0diff-loc mapDiff (addDiff r d) x == (shiftBlock r <=< mapDiff (d :: Diff N)) xnot (isZeroLength x) ==> comapDiff (addDiff r d) x == (comapDiff d <=< coshiftBlock (r :: Replace N)) x3diff-locTranslate a span in the source of a diff to a span in its target. Nothing) if the span overlaps with a replacement. For exaple, given the following 0 (or  ) from "aAacCc" to "aAabbbcCc": 7source aAa cCc - + bbb target aAabbbcCc1r0 = Replace 3 (offset 0) (offset 3) :: Replace Nd0 = addDiff r0 emptyDiff"The span of "A" remains unchanged.mapDiff d0 (1 :.. offset 1)Just (1 :.. offset 1)shiftBlock r0 (1 :.. offset 1)Just (1 :.. offset 1)comapDiff d0 (1 :.. offset 1)Just (1 :.. offset 1) coshiftBlock r0 (1 :.. offset 1)Just (1 :.. offset 1)+The span of "C" is shifted by 3 characters.mapDiff d0 (4 :.. offset 1)Just (7 :.. offset 1)shiftBlock r0 (4 :.. offset 1)Just (7 :.. offset 1)comapDiff d0 (7 :.. offset 1)Just (4 :.. offset 1) coshiftBlock r0 (7 :.. offset 1)Just (4 :.. offset 1)The span of "ac" overlaps with the replacement, so the mapping is undefined.mapDiff d0 (2 :.. offset 2)NothingshiftBlock r0 (2 :.. offset 2)NothingcomapDiff d0 (2 :.. offset 5)Nothing coshiftBlock r0 (2 :.. offset 5)Nothing Properties\(FSN d s) -> not (isZeroLength s) ==> partialSemiInverse (mapDiff d) (comapDiff d) s\(FSN d s) -> not (isZeroLength s) ==> partialSemiInverse (comapDiff d) (mapDiff d) swhere partialSemiInverse f g x is the property 5if f x == Just y -- for some y then g y == Just x4diff-locTranslate a span in the target of a diff to a span in its source. Nothing) if the span overlaps with a replacement. See also 3.5diff-loc 5 = foldr 2 1 012345012345 Safe-Inferred%h;diff-locSans commentaire.<diff-locThe space between two >s.4This type represents offsets between text locations x <= y as the number of newlines inbetween and the number of characters from the last new line to y, if there is at least one newline, or the number of characters from x to y.Example  abc de fghThe offset from "b" to "h" is  Vallee 2 2 (two newlines to reach line 3, and from the beginning of that line, advance two characters to reach h).The offset from "b" to "c" is  Vallee 0 1 (advance one character).The offset from "b" to "h" is actually the same as from "a" to "h" and from "c" to "h". Line-column offsets are thus not invertible. This was one of the main constraints in the design of the  class.>diff-locLine and column coordinates.The generalization over types of line and column numbers frees us from any specific indexing scheme, notably whether columns are zero- or one-indexed.Example  abc de fgh3Assuming the lines and columns are both 1-indexed, "b" is at location  (Colline 1 2) and "h" is at location  (Colline 3 3).;<=>?>?<=; Safe-Inferred1'Jdiff-locAn unsafe variant of () which throws an exception on Nothing. This operator may appear in class laws, imposing an implicit requirement that its operands must be ordered.Kdiff-locConstructor for . The index must be greater than the origin, otherwise an error is raised. origin <= indexFrom i Ldiff-locK specialized to 0-indexing.Mdiff-locK specialized to 1-indexing.Ndiff-loc Construct an . The offset must be nonnegative, otherwise an error is raised.JKLMNJKLMNJ6 Safe-Inferred5/Odiff-loc3A minimalistic representation of text replacements.A replacement O i n m is given by a start location i, the length n4 of the interval to replace (source) and the length m of its replacement (target). This representation does not keep track of the actual data being inserted.This may overapproximate the underlying text replacement, with intervals being wider than necessary. For example, the transformation from "abc" to "ac" could be represented by mkReplace 1 1 03 (replace "b" with "" at location 1), and also by mkReplace 0 2 1' (replace "ab" with "a" at location 0). source abc abc - b ab + a target a c a cInsertions are replacements with source intervals of length zero. Deletions are replacements with target intervals of length zero.Qdiff-loc(i R n)) represents a span of text between index i and index i+n.The type of indices p" is expected to be an instance of . The length n in an interval  (i :.. n) may be zero.The elements of the interval can be thought of as indexing the interstices between characters. A span of length zero is a single interstice between two characters, where some chunk of text may be inserted.Example: drawing of 1 :.. 2 in "abcde". ; a b c d e 0 1 2 3 4 5 ^b+c+ length = 2 ^ ^ start = 1Sdiff-loc#Does the interval have length zero?Vdiff-loc$The composition of two replacements l <> r represents the replacement r followed by l3, as one replacement of an span that contains both r and l.The right-to-left order of composition has the nice property that when l ` r, l <> r. can also be viewed intuitively as performing l and r simultaneously. Properties6(x <> y) <> z === x <> (y <> z :: Replace (Plain Int))OPQRSQRSOPR3w6 Safe-Inferred15?1[diff-locPositive numbers.\diff-locNatural numbers.]diff-loc Integers.^diff-locA trick to reduce noise by hiding newtype wrapper constructors. This makes the documentation more palatable.(show (NoShow (Plain 3) :: Plain :$: Int)"3"show (Colline 4 2 :.. Vallee (offset 3) (offset 3) :: Interval (Colline N N))."Colline 4 2 :.. Vallee (offset 3) (offset 3)"`diff-loc'A shorthand for the common use case of `.[\]^_``]\[^_  Safe-Inferred1:   !012345;<=>?OPQRS[\]^_`  !"##$%&'()*+,-./0123456789:;<=>?@ABCDEFGHHIIJKLMNOPQRS TU   VWXYZ[\]^_`abcdefghijklmnopqrstuvwuvxrsyuz{|u}~'diff-loc-0.1.0.0-KP4V8J8pbmm97Zjr7kx3QZ DiffLoc.Shift DiffLoc.Index DiffLoc.DiffDiffLoc.CollineDiffLoc.UnsafeDiffLoc.IntervalDiffLoc.Starter.-. indexFromoffsetReplaceDiffLocOriginoriginAmorTrans.+.-.?ShiftBlocksrctgt shiftBlock coshiftBlockshiftRcoshiftRdual BlockOrderprecedesdistantlyPrecedesofOrigin fromOriginOffset IndexFromPlain indexFromM indexFromM0 indexFromM1 fromIndex fromIndex0 fromIndex1oneIndex zeroIndexoffsetM fromOffset$fOriginIndexFrom$fShowIndexFrom $fShowOffset $fAmorPlain $fEqOffset $fOrdOffset$fSemigroupOffset$fMonoidOffset $fEqIndexFrom$fOrdIndexFrom$fAmorIndexFrom $fEqPlain $fOrdPlain $fShowPlainADiff emptyDiffaddDiffmapDiff comapDiff listToDiff$fMeasuredMaybeR $fShowADiff $fEqADiff$fEqR$fShowRValléeValleeColline$fOriginColline $fAmorColline$fMonoidVallee$fSemigroupVallee $fEqVallee $fOrdVallee $fShowVallee $fEqColline $fOrdColline $fShowColline indexFrom0 indexFrom1Interval:.. isZeroLength$fBlockOrderInterval$fShiftReplace$fSemigroupReplace $fShowReplace $fEqReplace$fShowInterval $fEqIntervalN'NZ:$:NoShowDiff$fNum:$: $fNum:$:0 $fNum:$:1 $fShow:$: $fShow:$:0 $fShow:$:1$fEq:$:$fOrd:$:$fSemigroup:$: $fMonoid:$: $fAmor:$: $fOrigin:$:ghc-prim GHC.ClassesOrdbaseGHC.BaseMonoid<><= GHC.MaybeJustknownNum GHC.TypeNatsKnownNatR)fingertree-0.1.5.0-9ZJLFPO1ZTy5beXkZxUpJfData.FingerTreeMeasured+