/usr/share/doc/libghc-diff-doc/html/Diff.txt is in libghc-diff-doc 0.3.2-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | -- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | O(ND) diff algorithm in haskell.
--
-- Implementation of the standard diff algorithm, and utilities for
-- pretty printing.
@package Diff
@version 0.3.2
-- | This is an implementation of the O(ND) diff algorithm as described in
-- "An O(ND) Difference Algorithm and Its Variations (1986)"
-- <a>http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927</a>.
-- It is O(mn) in space. The algorithm is the same one used by standared
-- Unix diff.
module Data.Algorithm.Diff
-- | A value is either from the <a>First</a> list, the <a>Second</a> or
-- from <a>Both</a>. <a>Both</a> contains both the left and right values,
-- in case you are using a form of equality that doesn't check all data
-- (for example, if you are using a newtype to only perform equality on
-- side of a tuple).
data Diff a
First :: a -> Diff a
Second :: a -> Diff a
Both :: a -> a -> Diff a
-- | Takes two lists and returns a list of differences between them. This
-- is <a>getDiffBy</a> with <a>==</a> used as predicate.
getDiff :: (Eq t) => [t] -> [t] -> [Diff t]
-- | A form of <a>getDiff</a> with no <a>Eq</a> constraint. Instead, an
-- equality predicate is taken as the first argument.
getDiffBy :: (t -> t -> Bool) -> [t] -> [t] -> [Diff t]
-- | Takes two lists and returns a list of differences between them,
-- grouped into chunks. This is <a>getGroupedDiffBy</a> with <a>==</a>
-- used as predicate.
getGroupedDiff :: (Eq t) => [t] -> [t] -> [Diff [t]]
getGroupedDiffBy :: (t -> t -> Bool) -> [t] -> [t] -> [Diff [t]]
instance GHC.Classes.Eq Data.Algorithm.Diff.DL
instance GHC.Show.Show Data.Algorithm.Diff.DL
instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.Algorithm.Diff.Diff a)
instance GHC.Show.Show a => GHC.Show.Show (Data.Algorithm.Diff.Diff a)
instance GHC.Classes.Eq Data.Algorithm.Diff.DI
instance GHC.Show.Show Data.Algorithm.Diff.DI
instance GHC.Classes.Ord Data.Algorithm.Diff.DL
-- | Author : Stephan Wehr (wehr<tt>factisresearch.com) and JP Moresmau
-- (jp</tt>moresmau.fr)
--
-- Generates a string output that is similar to diff normal mode
module Data.Algorithm.DiffOutput
-- | pretty print the differences. The output is similar to the output of
-- the diff utility
ppDiff :: [Diff [String]] -> String
-- | pretty print of diff operations
prettyDiffs :: [DiffOperation LineRange] -> Doc
type LineNo = Int
data LineRange
LineRange :: (LineNo, LineNo) -> [String] -> LineRange
[lrNumbers] :: LineRange -> (LineNo, LineNo)
[lrContents] :: LineRange -> [String]
data DiffOperation a
Deletion :: a -> LineNo -> DiffOperation a
Addition :: a -> LineNo -> DiffOperation a
Change :: a -> a -> DiffOperation a
instance GHC.Show.Show a => GHC.Show.Show (Data.Algorithm.DiffOutput.DiffOperation a)
instance GHC.Show.Show Data.Algorithm.DiffOutput.LineRange
-- | Author : David Fox (ddssff at the email service from google)
--
-- Generates a grouped diff with merged runs, and outputs them in the
-- manner of diff -u
module Data.Algorithm.DiffContext
-- | Do a grouped diff and then split up the chunks into runs that contain
-- differences surrounded by N lines of unchanged text. If there is less
-- then 2N+1 lines of unchanged text between two changes, the runs are
-- left merged.
getContextDiff :: Eq a => Int -> [a] -> [a] -> ContextDiff a
-- | Pretty print a ContextDiff in the manner of diff -u.
prettyContextDiff :: Doc -> Doc -> (c -> Doc) -> ContextDiff c -> Doc
|