You can search for identifiers within the package.
in-package search v0.2.0
Source file error.ml
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970(** Warnings and errors. *)openLplibopenBase(** [err_fmt] warning/error output formatter. *)leterr_fmt=Stdlib.refFormat.err_formatter(** [no_warnings] disables warnings when set to [true]. *)letno_warnings=Stdlib.reffalse(** [wrn popt fmt] prints a yellow warning message with [Format] format [fmt].
Note that the output buffer is flushed by the function, and that output is
prefixed with the position [popt] if given. A newline is automatically put
at the end of the message as well. *)letwrn:Pos.popt->'aoutfmt->'a=funposfmt->Color.update_with_color!err_fmt;letopenStdlibinletfprintf=if!no_warningsthenFormat.ifprintfelseoutinmatchposwith|None->fprintf!err_fmt(Color.yelfmt^^"@.")|Some_->fprintf!err_fmt(Color.yel("[%a] "^^fmt)^^"@.")Pos.pppos(** [no_wrn f x] disables warnings before executing [f x] and then restores
the initial state of warnings. The result of [f x] is returned. *)letno_wrn:('a->'b)->'a->'b=funfx->letopenStdlibinletw=!no_warningsinno_warnings:=true;letres=fxinno_warnings:=w;res(** Exception raised in case of failure. Note that we use an optional optional
source position. [None] is used on errors that are independent from source
code position (e.g., errors related to command-line arguments parsing). In
cases where positions are expected [Some None] is used to indicate the
absence of a position. This may happen when terms are generated (e.g., by
a form of desugaring). The last argument is used to provide an optional
description of the error, displayed differently from the error itself. *)exceptionFatalofPos.poptoption*string*string(** [fatal_msg fmt] may be called an arbitrary number of times to build up the
error message of the [fatal] or [fatal_no_pos] functions prior to calling
them. Note that the messages are stored in a buffer that is flushed by the
[fatal] or [fatal_no_pos] function. Hence, they must be called. *)letfatal_msg:'aoutfmt->'a=funfmt->outFormat.str_formatterfmt(** [fatal popt fmt] raises the [Fatal(popt,msg,err_desc)] exception, in which
[msg] is built from the format [fmt] (provided the necessary arguments).
[err_desc] continues the error message and is printed in normal format
instead of red color. *)letfatal:Pos.popt->?err_desc:string->('a,'b)koutfmt->'a=funpos?(err_desc="")fmt->letcont_=raise(Fatal(Some(pos),Format.flush_str_formatter(),err_desc))inFormat.kfprintfcontFormat.str_formatterfmt(** [fatal_no_pos fmt] is similar to [fatal _ fmt], but it is used to raise an
error that has no precise attached source code position. *)letfatal_no_pos:?err_desc:string->('a,'b)koutfmt->'a=fun?(err_desc="")fmt->letcont_=raise(Fatal(None,Format.flush_str_formatter(),err_desc))inFormat.kfprintfcontFormat.str_formatterfmtletfatal_optional_position=function|None->fatal_no_pos|Somep->fatalp