Module Dunolint.Rule

type ('predicate, 'invariant) t = [
  1. | `enforce of 'invariant
  2. | `return
    (*

    return stops the evaluation of the rule without trying to enforce any invariant.

    *)
  3. | `skip_subtree
    (*

    This causes the linter to finish the linting of the current rule, however any remaining rule will be skipped, and the entire subtree will not be linted.

    *)
  4. | `cond of ('predicate Blang.t * ('predicate, 'invariant) t) Base.list
]
val compare : ('predicate -> 'predicate -> Base.int) -> ('invariant -> 'invariant -> Base.int) -> ('predicate, 'invariant) t -> ('predicate, 'invariant) t -> Base.int
val equal : ('predicate -> 'predicate -> Base.bool) -> ('invariant -> 'invariant -> Base.bool) -> ('predicate, 'invariant) t -> ('predicate, 'invariant) t -> Base.bool
val sexp_of_t : ('predicate -> Sexplib0.Sexp.t) -> ('invariant -> Sexplib0.Sexp.t) -> ('predicate, 'invariant) t -> Sexplib0.Sexp.t
val t_of_sexp : (Sexplib0.Sexp.t -> 'predicate) -> (Sexplib0.Sexp.t -> 'invariant) -> Sexplib0.Sexp.t -> ('predicate, 'invariant) t
val __t_of_sexp__ : (Sexplib0.Sexp.t -> 'predicate) -> (Sexplib0.Sexp.t -> 'invariant) -> Sexplib0.Sexp.t -> ('predicate, 'invariant) t
val eval : ('predicate, 'invariant) t -> f:('predicate -> Trilang.t) -> [ `enforce of 'invariant | `return | `skip_subtree ]