The main improvement is that log_issue and raise_error are now uniform, and more flexible. The first argument is always a "position" which is anything from which we can obtain a range (e.g. an actual range, a term, an environment, etc). The last arg is the message, which can be a string or a list of documents. The variants raise_error_doc, raise_error_text, etc, are gone (except for OCaml code, but they are not used internally).
val raise_error
(#pos_t:Type) {| hasRange pos_t |} (pos : pos_t) // A "position", of any type with a range
(code : error_code) // An error code
(#msg_t:_) {| is_error_message msg_t |} (msg : msg_t) // A "message", currently can be a 'string' or 'list document'
: 'a
val log_issue
(#pos_t:Type) {| hasRange pos_t |} (pos : pos_t) // A "position", of any type with a range
(code : error_code) // An error code
(#msg_t:_) {| is_error_message msg_t |} (msg : msg_t) // A "message", currently can be a 'string' or 'list document'
: unit
The main improvement is that
log_issue
andraise_error
are now uniform, and more flexible. The first argument is always a "position" which is anything from which we can obtain a range (e.g. an actual range, a term, an environment, etc). The last arg is the message, which can be a string or a list of documents. The variantsraise_error_doc
,raise_error_text
, etc, are gone (except for OCaml code, but they are not used internally).