1 (* Copyright (C
) 1999-2006 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
.
9 structure General
: GENERAL_EXTRA
=
11 type unit
= Primitive
.Unit
.unit
15 exception Match
= Match
18 exception Domain
= Domain
19 exception Fail
of string
20 exception Overflow
= Overflow
23 exception Subscript
= Subscript
25 datatype order
= datatype Primitive
.Order
.order
27 val ! = Primitive
.Ref
.deref
28 val op := = Primitive
.Ref
.assign
29 fun (f
o g
) x
= f (g x
)
32 val exnName
= Primitive
.Exn
.name
35 val messagers
: (exn
-> string option
) list ref
= ref
[]
37 val addExnMessager
: (exn
-> string option
) -> unit
=
38 fn f
=> messagers
:= f
:: !messagers
40 val rec exnMessage
: exn
-> string =
55 structure GeneralGlobal
: GENERAL_GLOBAL
= General