- val eprint : Base.String.t -> Base.Unit.t
- eprint messageprints to stderr- message, followed by a newline and flush. This is the same as- prerr_endline.
- val eprints : Base.String.t -> 'a -> ('a -> Sexp.t) -> Base.Unit.t
- eprints message a sexp_of_aprints to stderr- messageand- aas a sexp, followed by a newline and flush.
- val eprint_s : Sexp.t -> Base.Unit.t
- eprint_s sexpprints- sexpto stderr, followed by a newline and a flush.
- val eprintf : ('r, Base.Unit.t, Base.String.t, Base.Unit.t) Stdlib.format4 -> 'r
- eprintf message arg1 ... argnprints to stderr- message, with sprintf-style format characters instantiated, followed by a newline and flush.
- module Make : functor () sig ... end
- Debug.Makeproduces a- debugfunction used to wrap a function to display arguments before calling and display results after returning. Intended usage is:
- val am : Source_code_position.t -> Base.Unit.t
- am,- ams, and- amfoutput a source code position and backtrace to stderr.- amfaccepts a printf-style format string.- amsaccepts a message, value, and sexp converter for that value. Typical usage looks like:- ...; Debug.am [%here]; ...; Debug.amf [%here] "hello (%s, %s)" (X.to_string x) (Y.to_string y); ...; Debug.ams [%here] "hello" (x, y) <:sexp_of< X.t * Y.t >>; ...;- The - am*functions output source code positions in the standard format "FILE:LINE:COL", which means that one can use a tool like emacs grep-mode on a buffer containing debug messages to step through one's code by stepping through the messages.
- val ams : Source_code_position.t -> Base.String.t -> 'a -> ('a -> Sexp.t) -> Base.Unit.t
- val amf : Source_code_position.t -> ('r, Base.Unit.t, Base.String.t, Base.Unit.t) Stdlib.format4 -> 'r
- val should_print_backtrace : Base.Bool.t Base.Ref.t
- should_print_backtracegoverns whether the- am*functions print a backtrace.