SCM Repository
Annotation of /sml/trunk/src/system/abcdef.sml
Parent Directory
|
Revision Log
Revision 1669 - (view) (download)
1 : | blume | 675 | structure X = struct |
2 : | blume | 678 | exception Foo |
3 : | mblume | 1656 | fun foo n : int = let |
4 : | blume | 675 | fun a (x, 0) = d x |
5 : | | a (x, n) = b (x, n - 1) | ||
6 : | and b (x, n) = c (x, n) | ||
7 : | and c (x, n) = a (x, n) | ||
8 : | and d x = e (x, 3) | ||
9 : | mblume | 1645 | (* |
10 : | blume | 682 | handle e => (print "exn\n"; raise e) |
11 : | mblume | 1645 | *) |
12 : | blume | 675 | and e (x, 0) = f x |
13 : | | e (x, n) = e (x, n - 1) | ||
14 : | mblume | 1669 | and f 0 = (* BackTrace.trigger () *) raise Fail "triggered" |
15 : | blume | 675 | | f n = n * g (n - 1) |
16 : | and g n = a (n, 3) | ||
17 : | in | ||
18 : | mblume | 1656 | f n; |
19 : | OS.Process.success | ||
20 : | blume | 675 | end |
21 : | mblume | 1656 | |
22 : | fun main _ = | ||
23 : | BackTrace.monitor (fn () => foo 3) | ||
24 : | blume | 675 | end |
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |