1 (* Copyright (C
) 2010,2013,2016-2017 Matthew Fluet
.
2 * Copyright (C
) 1999-2008 Henry Cejtin
, Matthew Fluet
, Suresh
3 * Jagannathan
, and Stephen Weeks
.
4 * Copyright (C
) 1997-2000 NEC Research Institute
.
6 * MLton is released under a BSD
-style license
.
7 * See the file MLton
-LICENSE for details
.
10 structure MLton
: MLTON
=
15 (* The ref stuff is so that
the (de
)serializer always deals
with pointers
18 (* val serialize
= fn x
=> serialize (ref x
)
19 * val deserialize
= fn x
=> !(deserialize x
)
22 val share
= Primitive
.MLton
.share
24 structure GC
= MLtonGC
27 (GC
.setHashConsDuringGC
true
31 C_Size
.toInt (Primitive
.MLton
.size x
)
33 (* fun cleanAtExit () = let open Cleaner
in clean atExit
end *)
35 val debug
= Primitive
.Controls
.debug
36 val eq
= Primitive
.MLton
.eq
37 val equal
= Primitive
.MLton
.equal
38 val hash
= Primitive
.MLton
.hash
39 (* val errno
= Primitive
.errno
*)
40 val safe
= Primitive
.Controls
.safe
42 structure Array
= Array
43 structure BinIO = MLtonIO (BinIO)
44 (*structure CallStack
= MLtonCallStack
*)
45 structure CharArray
= struct
49 structure CharVector
= struct
53 structure Cont
= MLtonCont
54 structure Exn
= MLtonExn
55 structure Finalizable
= MLtonFinalizable
61 structure Itimer
= MLtonItimer
72 structure Platform
= MLtonPlatform
73 structure Pointer
= MLtonPointer
74 structure ProcEnv
= MLtonProcEnv
75 structure Process
= MLtonProcess
76 (* structure Ptrace
= MLtonPtrace
*)
77 structure Profile
= MLtonProfile
78 structure Random
= MLtonRandom
88 open Primitive
.PackReal32
94 open Primitive
.PackReal64
96 structure Rlimit
= MLtonRlimit
97 structure Rusage
= MLtonRusage
98 structure Signal
= MLtonSignal
99 structure Syslog
= MLtonSyslog
100 structure TextIO = MLtonIO (TextIO)
101 structure Thread
= MLtonThread
102 structure Vector = Vector
103 structure Weak
= MLtonWeak
104 structure World
= MLtonWorld
130 structure Word8Array
= struct
134 structure Word8Vector
= struct
140 (Primitive
.TopLevel
.setHandler MLtonExn
.defaultTopLevelHandler
141 ; Primitive
.TopLevel
.setSuffix Exit
.defaultTopLevelSuffix
)
144 (* Patch OS
.FileSys
.tmpName to use mkstemp
. *)
156 MLton
.TextIO.mkstemp (MLton
.TextIO.tempPrefix
"file")
157 val _
= TextIO.closeOut out