Patdiff.Patdiff_coreSourceinclude module type of struct include Patdiff_kernel.Patdiff_core endremove_ws calls String.strip and replaces whitespace with " "
include Patdiff_kernel.Patdiff_core.Sval diff :
context:int ->
line_big_enough:int ->
keep_ws:bool ->
prev:string array ->
next:string array ->
Patdiff_kernel.Hunks.tdiff ~context ~keep_ws ~prev ~next uses Patience_diff.String to get a list of hunks describing the comparison between prev and next.
val refine :
rules:Patdiff_kernel.Format.Rules.t ->
produce_unified_lines:bool ->
output:Patdiff_kernel.Output.t ->
keep_ws:bool ->
split_long_lines:bool ->
interleave:bool ->
word_big_enough:int ->
Patdiff_kernel.Hunks.t ->
Patdiff_kernel.Hunks.trefine hunks maps each Range.Replace (prev, next) in hunks to a diff of prev against next.
val explode :
string array ->
keep_ws:bool ->
[ `Newline of int * string option | `Word of string ] arrayval print :
file_names:(Patdiff_kernel.File_name.t * Patdiff_kernel.File_name.t) ->
rules:Patdiff_kernel.Format.Rules.t ->
output:Patdiff_kernel.Output.t ->
location_style:Patdiff_kernel.Format.Location_style.t ->
Patdiff_kernel.Hunks.t ->
unitPrint a hunk list, usually from diff or refine
val output_to_string :
?print_global_header:bool ->
file_names:(Patdiff_kernel.File_name.t * Patdiff_kernel.File_name.t) ->
rules:Patdiff_kernel.Format.Rules.t ->
output:Patdiff_kernel.Output.t ->
location_style:Patdiff_kernel.Format.Location_style.t ->
Patdiff_kernel.Hunks.t ->
stringOutput a hunk list, usually from diff or refine, to a string
val iter_ansi :
rules:Patdiff_kernel.Format.Rules.t ->
f_hunk_break:((int * int) -> (int * int) -> unit) ->
f_line:(string -> unit) ->
Patdiff_kernel.Hunks.t ->
unitIter along the lines of the diff and the breaks between hunks. Offers more flexibility regarding what the caller wants to do with the lines
val patdiff :
?context:int ->
?keep_ws:bool ->
?rules:Patdiff_kernel.Format.Rules.t ->
?output:Patdiff_kernel.Output.t ->
?produce_unified_lines:bool ->
?split_long_lines:bool ->
?print_global_header:bool ->
?location_style:Patdiff_kernel.Format.Location_style.t ->
?interleave:bool ->
?line_big_enough:int ->
?word_big_enough:int ->
prev:Patdiff_kernel.Diff_input.t ->
next:Patdiff_kernel.Diff_input.t ->
unit ->
stringRuns the equivalent of the command line version of patdiff on two given contents prev and next. Uses Patience_diff.String.