package patdiff

  1. Overview
  2. Docs

A rule consists of a styled prefix, a styled suffix, and a style. Rules are applied to strings using functions defined in Output_ops.

module Affix : sig ... end

An affix is either a prefix or a suffix.

type t = private {
  1. pre : Affix.t;
  2. suf : Affix.t;
  3. styles : Style.t list;
}
val sexp_of_t : t -> Sexplib0.Sexp.t
val create : ?pre:Affix.t -> ?suf:Affix.t -> Style.t list -> t

Rule creation: Most rules have a style, and maybe a prefix. For instance, a line_next rule might have a bold "+" prefix and a green style.

val blank : t
val unstyled_prefix : string -> t
val strip_styles : t -> t