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
Sys_error est je pense très mal documentée.
Dans Core Library, il est correctement dit:
Exception raised by the input/output functions to report an
operating system error.
Mais dans Pervasives, la plupart des fonctions qui peuvent la lever
(output_, etc.) ne le disent pas. C'est d'autant plus trompeur que certaines
le disent (open_, close_*) ce qui sugèrerait que seules celles-ci peuvent
effectivement la lever.
Par ailleurs, c'est à la limite de l'erreur de documentation de faire
[Index of exceptions]
et de ne pas trouver Sys_error et toutes les autres exceptions qui sont
primitives! (Pour la même raison, on peut vérifier qu'on ne trouve pas le
type int dans index of types, etc.) J'en comprends bien la raison, mais
l'utilisateur lambda aura du mal à la comprendre... et une fois comprise à
accepter l'explication.
Amicalement,
Didier
The text was updated successfully, but these errors were encountered:
Inconsistent documentation of Sys_error: most of the functions from Pervasives that can raise it are not documented as such, but some are. There is now a note at the beginning of the Input/Output section that says all functions can raise Sys_error. Accordingly, I have removed the special mention of Sys_error in open_out and open_in. I left it in for close_in and close_out because it gives specific details. (branch 4.01, rev 13930)
All the built-in identifiers like [Sys_error] and [int] are missing from the indexes. This is harder to fix.
All the built-in identifiers like [Sys_error] and [int] are missing from the indexes. This is harder to fix.
I think it would be useful to have built-in identifiers re-exported in Pervasives
type nonrec int = int
exception Sys_error = Sys_error
This would improve the documentation situation for built-ins, since they'd be automatically included in the index, and it'd also help with shadowing: it's often useful (e.g. in generated code) to have a canonical top-level name, such as Pervasives.int, for an identifier.
Are there technical obstacles to extending Pervasives in this way?
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.
Original bug ID: 3468
Reporter: administrator
Status: acknowledged
Resolution: open
Priority: normal
Severity: minor
Category: documentation
Bug description
Full_Name: Didier Remy
Version: 3.08
OS:
Submission from: quincy.inria.fr (128.93.8.52)
Sys_error est je pense très mal documentée.
Dans Core Library, il est correctement dit:
Mais dans Pervasives, la plupart des fonctions qui peuvent la lever
(output_, etc.) ne le disent pas. C'est d'autant plus trompeur que certaines
le disent (open_, close_*) ce qui sugèrerait que seules celles-ci peuvent
effectivement la lever.
Par ailleurs, c'est à la limite de l'erreur de documentation de faire
[Index of exceptions]
et de ne pas trouver Sys_error et toutes les autres exceptions qui sont
primitives! (Pour la même raison, on peut vérifier qu'on ne trouve pas le
type int dans index of types, etc.) J'en comprends bien la raison, mais
l'utilisateur lambda aura du mal à la comprendre... et une fois comprise à
accepter l'explication.
Amicalement,
The text was updated successfully, but these errors were encountered: