package rocq-runtime
Install
Dune Dependency
Authors
Maintainers
Sources
md5=8d522602d23e7a665631826dab9aa92b
sha512=f4f76a6a178e421c99ee7a331a2fd97a06e9c5d0168d7e60c44e3820d8e1a124370ea104ad90c7f87a9a1e9d87b2d0d7d2d387c998feeaed4a75ed04e176a4be
doc/rocq-runtime.lib/CWarnings/index.html
Module CWarnings
Source
Categories and warnings form a DAG with a common root all
and warnings as the leaves.
Each warning belongs to some categories maybe including "default"
. It is possible to query the status of a warning
(unlike categories). XXX we should probably have "default-error"
too.
A msg
belongs to a warning
.
Emit a message in some warning.
Creation functions
Note that names are in a combined namespace including the special name "none"
.
When from
is not specified it defaults to [all]
. Empty list from
is not allowed. "default" is not allowed in from
.
from
works the same as with create_category
. In particular default status is specified through the default
argument not by using the "default" category.
val create_hybrid :
?from:category list ->
?default:status ->
name:string ->
unit ->
category * warning
As create_warning
, but the warning can also be used as a category i.e. have sub-warnings.
val create_in :
warning ->
('a -> Pp.t) ->
?loc:Loc.t ->
?quickfix:Quickfix.t list ->
'a ->
unit
Create a msg with registered printer.
Register the printer for a given message. If a printer is already registered it is replaced.
val create :
name:string ->
?category:category ->
?default:status ->
('a -> Pp.t) ->
?loc:Loc.t ->
'a ->
unit
Combined creation function. name
must be a fresh name.
val create_with_quickfix :
name:string ->
?category:category ->
?default:status ->
('a -> Pp.t) ->
?loc:Loc.t ->
?quickfix:Quickfix.t list ->
'a ->
unit
Combined creation function. name
must be a fresh name.
Misc APIs
Cleans up a user provided warnings status string, e.g. removing unknown warnings (in which case a warning is emitted) or subsumed warnings .
with_warn "-xxx,+yyy..." f x
calls f x
after setting the warnings as specified in the string (keeping other previously set warnings), and restores current warnings after f()
returns or raises an exception. If both f and restoring the warnings raise exceptions, the latter is raised.
Warn with "unknown-warning" if any unknown warnings are in the string with non-disabled status.
For command line -w, this avoids using the warning system to avoid breaking "-w -unknown-warning".
Categories used in rocq-runtime. Might not be exhaustive.