diff options
| author | coqbot-app[bot] | 2021-02-03 18:38:16 +0000 |
|---|---|---|
| committer | GitHub | 2021-02-03 18:38:16 +0000 |
| commit | 730e0f46deb5cef9f6c61cfefe66e0404fb722be (patch) | |
| tree | 75bba9ef80c938a90afb653410aace2974054b2c /lib/util.mli | |
| parent | 8615aac5fc342b2184b3431abec15dbab621efba (diff) | |
| parent | 570744638ab4b08286562c0f4d45a7928ed008b0 (diff) | |
Merge PR #13776: Fix #13739 - disable some warnings when calling Function.
Reviewed-by: gares
Ack-by: Zimmi48
Ack-by: SkySkimmer
Diffstat (limited to 'lib/util.mli')
| -rw-r--r-- | lib/util.mli | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/util.mli b/lib/util.mli index fe34525671..aefb015c38 100644 --- a/lib/util.mli +++ b/lib/util.mli @@ -112,6 +112,15 @@ type 'a delayed = unit -> 'a val delayed_force : 'a delayed -> 'a +(** [try_finally f x g y] applies the main code [f] to [x] and + returns the result after having applied the finalization + code [g] to [y]. If the main code raises the exception + [exn], the finalization code is executed and [exn] is raised. + If the finalization code itself fails, the exception + returned is always the one from the finalization code. + Credit X.Leroy, D.Remy. *) +val try_finally: ('a -> 'b) -> 'a -> ('c -> unit) -> 'c -> 'b + (** {6 Enriched exceptions} *) type iexn = Exninfo.iexn |
