Module Patdiff__.Patdiff_core
include module type of sig ... end
module type S = Patdiff_kernel__.Patdiff_core_intf.S
include Patdiff_kernel.Patdiff_core.S
val diff : context:int -> line_big_enough:int -> keep_ws:bool -> prev:string array -> next:string array -> Patdiff_kernel.Hunks.t
diff ~context ~keep_ws ~prev ~next
usesPatience_diff.String
to get a list of hunks describing the comparison betweenprev
andnext
.
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.t
refine hunks
maps eachRange.Replace (prev, next)
inhunks
to a diff ofprev
againstnext
.
val explode : string array -> keep_ws:bool -> [ `Newline of int * string option | `Word of string ] array
val 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 -> unit
Print a hunk list, usually from
diff
orrefine
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 -> string
Output a hunk list, usually from
diff
orrefine
, 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 -> unit
Iter 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 -> string
Runs the equivalent of the command line version of patdiff on two given contents
prev
andnext
. UsesPatience_diff.String
.