Module Jkind.Violation

type violation =
  1. | Not_a_subjkind : (Allowance.allowed * 'r1) Types.jkind * ('l * 'r2) Types.jkind * Sub_failure_reason.t list -> violation
  2. | No_intersection : 'd Types.jkind * ('l * Allowance.allowed) Types.jkind -> violation
type t

Set ?missing_cmi to mark t as having arisen from a missing cmi

val of_ : context:jkind_context -> ?missing_cmi:Path.t -> violation -> t
val is_missing_cmi : t -> bool

Is this error from a missing cmi?

val report_with_offender : offender:(Format.formatter -> unit) -> level:int -> Format.formatter -> t -> unit

Prints a violation and the thing that had an unexpected jkind (offender, which you supply an arbitrary printer for).

val report_with_offender_sort : offender:(Format.formatter -> unit) -> level:int -> Format.formatter -> t -> unit

Like report_with_offender, but additionally prints that the issue is that a representable jkind was expected.

val report_with_name : name:string -> level:int -> Format.formatter -> t -> unit

Simpler version of report_with_offender for when the thing that had an unexpected jkind is available as a string.