package windtrap

  1. Overview
  2. Docs

Module MyersSource

Minimal polymorphic Myers diff implementation.

Sourcemodule type Equal = sig ... end
Sourcemodule Line : sig ... end
Sourceval compute : (module Equal with type t = 'a) -> 'a list -> 'a list -> 'a Line.t list

compute (module E) before after returns a shortest edit script from before to after.

Sourceval diff : ?context:int -> ?expected_label:string -> ?actual_label:string -> string -> string -> string

diff expected actual renders a unified diff for text inputs.

Sourceval print_diff : ?context:int -> ?expected_label:string -> ?actual_label:string -> string -> string -> unit

print_diff expected actual writes diff to stdout.