You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If someone out there is interested in contributing, this issue should be relatively easy to fix. Directly looking at stdlib/sys.ml won't tell you much, because most of the functions are implemented as external C stubs; one should look instead at the use of the C functions raising this exception (through "caml_sys_error", "caml_raise_sys_error" or "caml_sys_io_error"). The following regexp gives all call sites for any of these functions:
find . -name '.c' | xargs grep -e "caml\wsys\w*error" -A 10 -B 10 --color=always | less -R
It is then a matter of knowing where the C stubs using these functions are themselves called from the OCaml side, and annotating the .mli documentation accordingly -- as is already done for the functions in pervasives.mli.
To a first approximation, all Sys functions can raise Sys_error or might raise it in the future. A blanket statement at the beginning of the Sys module might be better than a per-function description.
Original bug ID: 6051
Reporter: @dbuenzli
Status: closed (set by @damiendoligez on 2014-07-22T21:38:58Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.00.1
Target version: 4.02.0+dev
Fixed in version: 4.02.0+dev
Category: documentation
Tags: junior_job
Monitored by: @gasche
Bug description
There are quite a few functions in Sys that may raise Sys_error (e.g. Sys.remove). It would be nice to document that in the mli.
The text was updated successfully, but these errors were encountered: