summaryrefslogtreecommitdiff
path: root/stdlib/stdlib.mli
diff options
context:
space:
mode:
authorGuillaume Munch-Maccagnoni <Guillaume.Munch-Maccagnoni@Inria.fr>2018-10-25 17:38:07 +0200
committerGuillaume Munch-Maccagnoni <Guillaume.Munch-Maccagnoni@Inria.fr>2019-02-03 12:27:27 +0100
commitf68692ebc229af3e41818b91ab50c667cd0677db (patch)
tree4940961539dbd8fa2e82d0e4b35ebb9f9a5df8a5 /stdlib/stdlib.mli
parent23d582f58ea0e2cd6b9b9df808ea86780bb1b79d (diff)
downloadocaml-f68692ebc229af3e41818b91ab50c667cd0677db.tar.gz
Improve protect
- Treat as an error the case where ~finally raises an exception - Move to Fun module - Describe the purpose in the documentation - Remove boilerplate https://github.com/ocaml/ocaml/pull/2118
Diffstat (limited to 'stdlib/stdlib.mli')
-rw-r--r--stdlib/stdlib.mli9
1 files changed, 0 insertions, 9 deletions
diff --git a/stdlib/stdlib.mli b/stdlib/stdlib.mli
index d2b97a2711..3ee5eb626c 100644
--- a/stdlib/stdlib.mli
+++ b/stdlib/stdlib.mli
@@ -44,15 +44,6 @@ exception Exit
(** The [Exit] exception is not raised by any library function. It is
provided for use in your programs. *)
-val protect : finally:(unit -> unit) -> (unit -> 'a) -> 'a
-(** [protect ~finally work] invokes [work ()] and then [finally ()]
- before [work] returns with its value or an exception. In the latter
- case the exception is re-raised after [finally ()].
- If [finally ()] raises, this exception is not caught and may shadow
- one [work ()] may have raised.
-
- @since 4.08.0 *)
-
exception Match_failure of (string * int * int)
[@ocaml.warn_on_literal_pattern]
(** Exception raised when none of the cases of a pattern-matching