Module Theory.Source

The source code artifact of a compilation unit.

Contains the information about the source code of a program unit. Note, that it is not an attribute of a program that denotes the semantics of that program, but an artifact that is associated with the compile unit.

The information about the source code is represented as an extesnsible KB.Value.t. To add a new property of the Source class use KB.Class.property, to access existing properties use KB.Value.get and KB.Value.put.

type cls
include KB.Value.S with type t = (cls, unit) KB.cls KB.Value.t
type t = (cls, unit) KB.cls KB.Value.t
include Ppx_sexp_conv_lib.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
val empty : t
include Base.Comparable.S with type t := t
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Base__.Or_error.t
type comparator_witness
val comparator : (t, comparator_witness) Base__.Comparator.comparator
val validate_lbound : min:t Base__.Maybe_bound.t -> t Base__.Validate.check
val validate_ubound : max:t Base__.Maybe_bound.t -> t Base__.Validate.check
val validate_bound : min:t Base__.Maybe_bound.t -> max:t Base__.Maybe_bound.t -> t Base__.Validate.check
include Core_kernel.Binable.S with type t := t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_shape_t : Bin_prot.Shape.t
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
val cls : (cls, unit) KB.cls

the class index for the core-theory:source class

val language : (cls, language) KB.slot

the language of the source code

val code : (cls, string) KB.slot

the source code text

val file : (cls, string option) KB.slot

the file name of the unit's source code