1 (* Copyright (C
) 1999-2006, 2008 Henry Cejtin
, Matthew Fluet
, Suresh
2 * Jagannathan
, and Stephen Weeks
.
3 * Copyright (C
) 1997-2000 NEC Research Institute
.
5 * MLton is released under a BSD
-style license
.
6 * See the file MLton
-LICENSE for details
.
16 val bug
= PrimitiveFFI
.MLton
.bug
19 val dontInline
: (unit
-> 'a
) -> 'a
=
22 val rec recur
: Int32
.int -> 'a
=
27 val _
= recur (Int32
.- (i
, 1))
29 recur (Int32
.- (i
, 2))
36 (* Install an emergency
exception handler
. *)
38 structure P
= Primitive
39 structure PFFI
= PrimitiveFFI
43 (PFFI
.Stdio
.print
"unhandled exception: "
45 P
.Exn
.Fail8 msg
=> (PFFI
.Stdio
.print
"Fail "
46 ; PFFI
.Stdio
.print msg
)
47 | _
=> PFFI
.Stdio
.print (P
.Exn
.name exn
)
48 ; PFFI
.Stdio
.print
"\n"
49 ; P
.MLton
.bug ("unhandled exception in Basis Library")))
53 (* Install an emergency suffix
. *)
55 structure P
= Primitive
60 ; P
.MLton
.bug ("missing suffix in Basis Library")))