Import Upstream version 20180207
[hcoop/debian/mlton.git] / lib / mlton / basic / dynamic-wind.sig
CommitLineData
7f918cf1
CE
1(* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
3 *
4 * MLton is released under a BSD-style license.
5 * See the file MLton-LICENSE for details.
6 *)
7
8signature DYNAMIC_WIND =
9 sig
10 (* wind(f, g) returns f(), and computes g() when f finishes or raises *)
11 val wind: (unit -> 'a) * (unit -> unit) -> 'a
12 (* windFail(f, g) returns f(), and computes g() only if f raises *)
13 val windFail: (unit -> 'a) * (unit -> unit) -> 'a
14 val withEscape: (('a -> 'b) -> 'a) -> 'a
15 end