Module Patdiff.Configuration

This module extends Patdiff_kernel.Configuration with an on-disk config format and functions to parse them.

include module type of sig ... end
val default_context : int
val default_line_big_enough : int
val default_word_big_enough : int
val too_short_to_split : int
val warn_if_no_trailing_newline_in_both_default : bool
type t = private Patdiff_kernel__Configuration.t = {
output : Patdiff_kernel.Output.t;
rules : Patdiff_kernel.Format.Rules.t;
ext_cmp : string option;
float_tolerance : Core_kernel.Percent.t option;
produce_unified_lines : bool;
unrefined : bool;
keep_ws : bool;
split_long_lines : bool;
interleave : bool;
assume_text : bool;
context : int;
line_big_enough : int;
word_big_enough : int;
shallow : bool;
quiet : bool;
double_check : bool;
mask_uniques : bool;
prev_alt : string option;
next_alt : string option;
location_style : Patdiff_kernel.Format.Location_style.t;
warn_if_no_trailing_newline_in_both : bool;
}
val compare : t -> t -> int
val warn_if_no_trailing_newline_in_both : t -> bool
val location_style : t -> Patdiff_kernel.Format.Location_style.t
val next_alt : t -> string option
val prev_alt : t -> string option
val mask_uniques : t -> bool
val double_check : t -> bool
val quiet : t -> bool
val shallow : t -> bool
val word_big_enough : t -> int
val line_big_enough : t -> int
val context : t -> int
val assume_text : t -> bool
val interleave : t -> bool
val split_long_lines : t -> bool
val keep_ws : t -> bool
val unrefined : t -> bool
val produce_unified_lines : t -> bool
val float_tolerance : t -> Core_kernel.Percent.t option
val ext_cmp : t -> string option
val rules : t -> Patdiff_kernel.Format.Rules.t
val output : t -> Patdiff_kernel.Output.t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val invariant : t Base__.Invariant_intf.inv
val create_exn : output:Patdiff_kernel.Output.t -> rules:Patdiff_kernel.Format.Rules.t -> float_tolerance:Core_kernel.Percent.t option -> produce_unified_lines:bool -> unrefined:bool -> keep_ws:bool -> split_long_lines:bool -> interleave:bool -> assume_text:bool -> context:int -> line_big_enough:int -> word_big_enough:int -> shallow:bool -> quiet:bool -> double_check:bool -> mask_uniques:bool -> prev_alt:string option -> next_alt:string option -> location_style:Patdiff_kernel.Format.Location_style.t -> warn_if_no_trailing_newline_in_both:bool -> t
val override : ?⁠output:Patdiff_kernel.Output.t -> ?⁠rules:Patdiff_kernel.Format.Rules.t -> ?⁠float_tolerance:Core_kernel.Percent.t option -> ?⁠produce_unified_lines:bool -> ?⁠unrefined:bool -> ?⁠keep_ws:bool -> ?⁠split_long_lines:bool -> ?⁠interleave:bool -> ?⁠assume_text:bool -> ?⁠context:int -> ?⁠line_big_enough:int -> ?⁠word_big_enough:int -> ?⁠shallow:bool -> ?⁠quiet:bool -> ?⁠double_check:bool -> ?⁠mask_uniques:bool -> ?⁠prev_alt:string option -> ?⁠next_alt:string option -> ?⁠location_style:Patdiff_kernel.Format.Location_style.t -> ?⁠warn_if_no_trailing_newline_in_both:bool -> t -> t
val default : t
val load : ?⁠quiet_errors:bool -> string -> t option
val dark_bg : t Core.Lazy.t
val light_bg : t Core.Lazy.t
module On_disk : sig ... end
val parse : On_disk.t -> t
val save_default : filename:string -> unit
val get_config : ?⁠filename:string -> unit -> t

Reads a config from filename, which by default is ~/.patdiff. If ~filename:"" is passed or filename cannot be read, returns default.