Commit | Line | Data |
---|---|---|
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 | ||
8 | signature EXN = | |
9 | sig | |
10 | type t = exn | |
11 | ||
12 | exception Bind | |
13 | exception Match | |
14 | exception Overflow | |
15 | exception Subscript | |
16 | ||
17 | val finally: (unit -> 'a) * (unit -> unit) -> 'a | |
18 | val history: t -> string list | |
19 | val name: t -> string | |
20 | val layout: t -> Layout.t | |
21 | val toString: t -> string | |
22 | (* try (t, k, h) evaluates t (), and if it yields value v, evaluates k v. | |
23 | * If t () raises exception e, then h e is evaluated. | |
24 | * This is not the same as "k (t ()) handle e => h e", because it doesn't | |
25 | * evaluate k v in the context of the handler. See "Exceptional Syntax" | |
26 | * by Benton and Kennedy. | |
27 | *) | |
28 | val try: (unit -> 'a) * ('a -> 'b) * (t -> 'b) -> 'b | |
29 | val withEscape: (('a -> 'b) -> 'a) -> 'a | |
30 | end |