package goblint-cil
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=e6b654a67a46fb5a71a6c9d9ed24f46100d3f33537fef1edf5f57d3058d0dc58
sha512=fbf66413e777b887d11c40adaf3099e6be444a9609c41508d24fe1fdb20d720fad241d2b8cc80fd6dc8829ea02cfbd7b7fc239a94b807e3df29d3f72f9f20c80
doc/goblint-cil/GoblintCil/Errormsg/index.html
Module GoblintCil.Errormsg
Utility functions for error-reporting
val logChannel : out_channel ref
A channel for printing log messages
val debugFlag : bool ref
If set then print debugging info
val verboseFlag : bool ref
val colorFlag : bool ref
Set to true if you want error and warning messages to be colored
val warnFlag : bool ref
Set to true if you want to see all warnings.
val error : ('a, unit, Pretty.doc, unit) format4 -> 'a
Prints an error message of the form Error: ...
. Use in conjunction with s, for example: E.s (E.error ... )
.
val bug : ('a, unit, Pretty.doc, unit) format4 -> 'a
Similar to error
except that its output has the form Bug: ...
val unimp : ('a, unit, Pretty.doc, unit) format4 -> 'a
Similar to error
except that its output has the form Unimplemented: ...
val hadErrors : bool ref
This is set whenever one of the above error functions are called. It must be cleared manually
val warn : ('a, unit, Pretty.doc, unit) format4 -> 'a
Like Errormsg.error
but does not raise the Errormsg.Error
exception. Return type is unit.
val warnOpt : ('a, unit, Pretty.doc, unit) format4 -> 'a
Like Errormsg.warn
but optional. Printed only if the Errormsg.warnFlag
is set
val log : ('a, unit, Pretty.doc, unit) format4 -> 'a
Print something to logChannel
val logg : ('a, unit, Pretty.doc, unit) format4 -> 'a
same as Errormsg.log
but do not wrap lines
val null : ('a, unit, Pretty.doc, unit) format4 -> 'a
Do not actually print (i.e. print to /dev/null)
val pushContext : (unit -> Pretty.doc) -> unit
Registers a context printing function
val withContext : (unit -> Pretty.doc) -> ('a -> 'b) -> 'a -> 'b
To ensure that the context is registered and removed properly, use the function below
val transformLocation :
(file:(string * bool) option ->
line:int ->
((string * bool) option * int) option)
ref
type location = {
file : string;
(*The file name
*)line : int;
(*The line number
*)hfile : string;
(*The high-level file name, or "" if not present
*)hline : int;
(*The high-level line number, or 0 if not present
*)
}
Type for source-file locations
val d_loc : unit -> location -> Pretty.doc
val d_hloc : unit -> location -> Pretty.doc
val getLocation : unit -> location
val locUnknown : location
An unknown location for use when you need one but you don't have one
val readingFromStdin : bool ref
Records whether the stdin is open for reading the goal *
val startParsing : ?useBasename:bool -> string -> Lexing.lexbuf
val startParsingFromString :
?file:string ->
?line:int ->
string ->
Lexing.lexbuf