Diff 1.0 → 1.0.1
raw patch · 3 files changed
+30/−2 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Data.Algorithm.DiffContext: type ContextDiff c = [Hunk c]
+ Data.Algorithm.DiffContext: type Hunk c = [Diff [c]]
Files
- CHANGELOG.md +27/−0
- Diff.cabal +1/−1
- src/Data/Algorithm/DiffContext.hs +2/−1
CHANGELOG.md view
@@ -1,3 +1,30 @@+# 1.0++ - Add Unix diff style annotations to output of `prettyContextDiff`,+ e.g `@@ -1,5 +1,4 @@`. This required three changes to the+ signature of `getContextDiff` due to the addition of a wrapper type+ `Numbered`, which enumerates the elements of the input list.++ - Signature change 1: The element pretty printer type changes from+ `(a -> Doc)` to `(Numbered a -> Doc)`. An unnumber function is+ provided so that the old behavior can be obtained by changing that+ argument from `pretty` to `(pretty . unnumber)`++ - Signature change 2: The result type of getContextDiff changes from+ `ContextDiff a` to `ContextDiff (Numbered a)`. A function+ `unNumberContextDiff` is provided to convert the result back to+ the old type.++ - Signature change 3: the context argument is now `Maybe Int` rather+ than `Int`, reflecting the change made to `getContextDiffNew` in 0.5.++ - A `prettyContextDiffOld` function is provided to get the old+ style output.++ - The old broken version of getContextDiffOld is removed.++ - Document the behavior of `groupBy'`.+ # 0.5 - Bring space complexity down to D^2 (Bodigrim).
Diff.cabal view
@@ -1,6 +1,6 @@ Cabal-Version: 1.18 name: Diff-version: 1.0+version: 1.0.1 synopsis: Diff algorithm in pure Haskell description: Implementation of the standard diff algorithm in Haskell. .
src/Data/Algorithm/DiffContext.hs view
@@ -11,7 +11,8 @@ -- Generates a grouped diff with merged runs, and outputs them in the manner of diff -u ----------------------------------------------------------------------------- module Data.Algorithm.DiffContext- ( getContextDiff+ ( ContextDiff, Hunk+ , getContextDiff , prettyContextDiff , prettyContextDiffOld , getContextDiffNumbered