Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- canonizeFL :: (IsHunk prim, PrimCoalesce prim, PrimConstruct prim) => DiffAlgorithm -> FL prim wX wY -> FL prim wX wY
Documentation
canonizeFL :: (IsHunk prim, PrimCoalesce prim, PrimConstruct prim) => DiffAlgorithm -> FL prim wX wY -> FL prim wX wY Source #
Put a sequence of primitive patches into canonical form.
Even if the patches are just hunk patches, this is not necessarily the same set of results as you would get if you applied the sequence to a specific tree and recalculated a diff.
XXX Why not? How does it differ? The implementation for Prim.V1 does sortCoalesceFL and then invokes the diff algorithm for each hunk. How can that be any different to applying the sequence and then taking the diff? Is this merely because diff does not sort by file path?
Besides, diff and apply must be inverses in the sense that for any two states {start, end}, we have
diff start (apply (diff start end)) == end