Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/branches/rt-transition/idl-specs/sml-basis.sml
ViewVC logotype

Annotation of /sml/branches/rt-transition/idl-specs/sml-basis.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2848 - (view) (download)
Original Path: sml/branches/rt-transition/system/Basis/Implementation/RuntimeIDL/sml-basis.sml

1 : jhr 2848
2 :     (*
3 :     * This file was automatically generated by ml-idl
4 :     * (Tue Jul 3 16:34:27 2007)
5 :     *)
6 :    
7 :     structure SMLBasis : SML_BASIS = struct
8 :     structure C = Unsafe.CInterface
9 :     type idl_string = String.string
10 :     type cfun_idl_string = String.string
11 :     type ML_word8vec_t = Word8Vector.vector
12 :     type cfun_ML_word8vec_t = Word8Vector.vector
13 :     type ML_word8vec_opt_t = Word8Vector.vector option
14 :     type cfun_ML_word8vec_opt_t = Word8Vector.vector option
15 :     type ML_word8arr_t = Word8Array.array
16 :     type cfun_ML_word8arr_t = Word8Array.array
17 :     type ML_charvec_t = CharVector.vector
18 :     type cfun_ML_charvec_t = CharVector.vector
19 :     type ML_charvec_opt_t = CharVector.vector option
20 :     type cfun_ML_charvec_opt_t = CharVector.vector option
21 :     type ML_chararr_t = CharArray.array
22 :     type cfun_ML_chararr_t = CharArray.array
23 :     type ML_unit_t = unit
24 :     type cfun_ML_unit_t = unit
25 :     type ML_bool_t = bool
26 :     type cfun_ML_bool_t = bool
27 :     type ML_int_t = int
28 :     type cfun_ML_int_t = int
29 :     type ML_int32_t = Int32.int
30 :     type cfun_ML_int32_t = Int32.int
31 :     type ML_string_t = string
32 :     type cfun_ML_string_t = string
33 :     type ML_string_opt_t = string option
34 :     type cfun_ML_string_opt_t = string option
35 :     type ML_string_list_t = string list
36 :     type cfun_ML_string_list_t = string list
37 :     type ML_int_opt_t = int option
38 :     type cfun_ML_int_opt_t = int option
39 :     type ML_iodesc_t = word
40 :     type cfun_ML_iodesc_t = word
41 :     type ML_directory_t = Unsafe.Object.object
42 :     type cfun_ML_directory_t = Unsafe.Object.object
43 :     type Time_t = {seconds:Int32.int,uSeconds:Int32.int}
44 :     type cfun_Time_t = (Int32.int * Int32.int)
45 :     type ML_polldesc_list_t = (word * word) list
46 :     type cfun_ML_polldesc_list_t = (word * word) list
47 :     type ML_pollinfo_list_t = (word * word) list
48 :     type cfun_ML_pollinfo_list_t = (word * word) list
49 :     type Date_t = {tm_sec:Int.int,tm_min:Int.int,tm_hour:Int.int,tm_mday:Int.int,tm_mon:Int.int,tm_year:Int.int,tm_wday:Int.int,tm_yday:Int.int,tm_isdst:Int.int}
50 :     type cfun_Date_t = (Int.int * Int.int * Int.int * Int.int * Int.int * Int.int * Int.int * Int.int * Int.int)
51 :     val TO_NEAREST = 0 : Int.int
52 :     val TO_NEGINF = 1 : Int.int
53 :     val TO_POSINF = 2 : Int.int
54 :     val TO_ZERO = 3 : Int.int
55 :     val cfun_getRoundingMode : unit -> Int.int = C.c_function "SMLBasis" "getRoundingMode"
56 :     fun getRoundingMode() = let
57 :     val (m_result) = cfun_getRoundingMode ()
58 :     val result = (fn (x) => x)(m_result)
59 :     in
60 :     (result)
61 :     end
62 :     val cfun_setRoundingMode : Int.int -> unit = C.c_function "SMLBasis" "setRoundingMode"
63 :     fun setRoundingMode(mode) = let
64 :     val m_mode = (fn (x) => x)(mode)
65 :     val () = cfun_setRoundingMode (m_mode)
66 :     val _ = (fn _ => ()) (m_mode)
67 :     in
68 :     ()
69 :     end
70 :     val OPEN_RD = 1 : Int.int
71 :     val OPEN_WR = 2 : Int.int
72 :     val OPEN_RDWR = 3 : Int.int
73 :     val OPEN_CREATE = 4 : Int.int
74 :     val OPEN_TRUNC = 8 : Int.int
75 :     val OPEN_APPEND = 16 : Int.int
76 :     val cfun_openFile : (cfun_ML_string_t * Int.int) -> cfun_ML_iodesc_t = C.c_function "SMLBasis" "openFile"
77 :     fun openFile(s,flags) = let
78 :     val m_s = (fn x => x)(s)
79 :     val m_flags = (fn (x) => x)(flags)
80 :     val (m_result) = cfun_openFile (m_s,m_flags)
81 :     val result = (fn x => x)(m_result)
82 :     val _ = (fn _ => ()) (m_s)
83 :     val _ = (fn _ => ()) (m_flags)
84 :     in
85 :     (result)
86 :     end
87 :     val cfun_closeFile : cfun_ML_iodesc_t -> unit = C.c_function "SMLBasis" "closeFile"
88 :     fun closeFile(iod) = let
89 :     val m_iod = (fn x => x)(iod)
90 :     val () = cfun_closeFile (m_iod)
91 :     val _ = (fn _ => ()) (m_iod)
92 :     in
93 :     ()
94 :     end
95 :     val cfun_cmpIODesc : (cfun_ML_iodesc_t * cfun_ML_iodesc_t) -> Int.int = C.c_function "SMLBasis" "cmpIODesc"
96 :     fun cmpIODesc(iod1,iod2) = let
97 :     val m_iod1 = (fn x => x)(iod1)
98 :     val m_iod2 = (fn x => x)(iod2)
99 :     val (m_result) = cfun_cmpIODesc (m_iod1,m_iod2)
100 :     val result = (fn (x) => x)(m_result)
101 :     val _ = (fn _ => ()) (m_iod1)
102 :     val _ = (fn _ => ()) (m_iod2)
103 :     in
104 :     (result)
105 :     end
106 :     val cfun_readTextVec : (cfun_ML_bool_t * cfun_ML_iodesc_t * Int.int) -> cfun_ML_charvec_opt_t = C.c_function "SMLBasis" "readTextVec"
107 :     fun readTextVec(noblock,iod,nbytes) = let
108 :     val m_noblock = (fn x => x)(noblock)
109 :     val m_iod = (fn x => x)(iod)
110 :     val m_nbytes = (fn (x) => x)(nbytes)
111 :     val (m_result) = cfun_readTextVec (m_noblock,m_iod,m_nbytes)
112 :     val result = (fn x => x)(m_result)
113 :     val _ = (fn _ => ()) (m_noblock)
114 :     val _ = (fn _ => ()) (m_iod)
115 :     val _ = (fn _ => ()) (m_nbytes)
116 :     in
117 :     (result)
118 :     end
119 :     val cfun_readTextArr : (cfun_ML_bool_t * cfun_ML_iodesc_t * cfun_ML_chararr_t * Int.int * Int.int) -> cfun_ML_int_t = C.c_function "SMLBasis" "readTextArr"
120 :     fun readTextArr(noblock,iod,arr,nbytes,offset) = let
121 :     val m_noblock = (fn x => x)(noblock)
122 :     val m_iod = (fn x => x)(iod)
123 :     val m_arr = (fn x => x)(arr)
124 :     val m_nbytes = (fn (x) => x)(nbytes)
125 :     val m_offset = (fn (x) => x)(offset)
126 :     val (m_result) = cfun_readTextArr (m_noblock,m_iod,m_arr,m_nbytes,m_offset)
127 :     val result = (fn x => x)(m_result)
128 :     val _ = (fn _ => ()) (m_noblock)
129 :     val _ = (fn _ => ()) (m_iod)
130 :     val _ = (fn _ => ()) (m_arr)
131 :     val _ = (fn _ => ()) (m_nbytes)
132 :     val _ = (fn _ => ()) (m_offset)
133 :     in
134 :     (result)
135 :     end
136 :     val cfun_writeTextVec : (cfun_ML_bool_t * cfun_ML_iodesc_t * cfun_ML_charvec_t * Int.int * Int.int) -> cfun_ML_int_t = C.c_function "SMLBasis" "writeTextVec"
137 :     fun writeTextVec(noblock,iod,buf,offset,nbytes) = let
138 :     val m_noblock = (fn x => x)(noblock)
139 :     val m_iod = (fn x => x)(iod)
140 :     val m_buf = (fn x => x)(buf)
141 :     val m_offset = (fn (x) => x)(offset)
142 :     val m_nbytes = (fn (x) => x)(nbytes)
143 :     val (m_result) = cfun_writeTextVec (m_noblock,m_iod,m_buf,m_offset,m_nbytes)
144 :     val result = (fn x => x)(m_result)
145 :     val _ = (fn _ => ()) (m_noblock)
146 :     val _ = (fn _ => ()) (m_iod)
147 :     val _ = (fn _ => ()) (m_buf)
148 :     val _ = (fn _ => ()) (m_offset)
149 :     val _ = (fn _ => ()) (m_nbytes)
150 :     in
151 :     (result)
152 :     end
153 :     val cfun_writeTextArr : (cfun_ML_bool_t * cfun_ML_iodesc_t * cfun_ML_chararr_t * Int.int * Int.int) -> cfun_ML_int_t = C.c_function "SMLBasis" "writeTextArr"
154 :     fun writeTextArr(noblock,iod,buf,offset,nbytes) = let
155 :     val m_noblock = (fn x => x)(noblock)
156 :     val m_iod = (fn x => x)(iod)
157 :     val m_buf = (fn x => x)(buf)
158 :     val m_offset = (fn (x) => x)(offset)
159 :     val m_nbytes = (fn (x) => x)(nbytes)
160 :     val (m_result) = cfun_writeTextArr (m_noblock,m_iod,m_buf,m_offset,m_nbytes)
161 :     val result = (fn x => x)(m_result)
162 :     val _ = (fn _ => ()) (m_noblock)
163 :     val _ = (fn _ => ()) (m_iod)
164 :     val _ = (fn _ => ()) (m_buf)
165 :     val _ = (fn _ => ()) (m_offset)
166 :     val _ = (fn _ => ()) (m_nbytes)
167 :     in
168 :     (result)
169 :     end
170 :     val cfun_readBinVec : (cfun_ML_bool_t * cfun_ML_iodesc_t * Int.int) -> cfun_ML_word8vec_opt_t = C.c_function "SMLBasis" "readBinVec"
171 :     fun readBinVec(noblock,iod,nbytes) = let
172 :     val m_noblock = (fn x => x)(noblock)
173 :     val m_iod = (fn x => x)(iod)
174 :     val m_nbytes = (fn (x) => x)(nbytes)
175 :     val (m_result) = cfun_readBinVec (m_noblock,m_iod,m_nbytes)
176 :     val result = (fn x => x)(m_result)
177 :     val _ = (fn _ => ()) (m_noblock)
178 :     val _ = (fn _ => ()) (m_iod)
179 :     val _ = (fn _ => ()) (m_nbytes)
180 :     in
181 :     (result)
182 :     end
183 :     val cfun_readBinArr : (cfun_ML_bool_t * cfun_ML_iodesc_t * cfun_ML_word8arr_t * Int.int * Int.int) -> cfun_ML_int_t = C.c_function "SMLBasis" "readBinArr"
184 :     fun readBinArr(noblock,iod,arr,nbytes,offset) = let
185 :     val m_noblock = (fn x => x)(noblock)
186 :     val m_iod = (fn x => x)(iod)
187 :     val m_arr = (fn x => x)(arr)
188 :     val m_nbytes = (fn (x) => x)(nbytes)
189 :     val m_offset = (fn (x) => x)(offset)
190 :     val (m_result) = cfun_readBinArr (m_noblock,m_iod,m_arr,m_nbytes,m_offset)
191 :     val result = (fn x => x)(m_result)
192 :     val _ = (fn _ => ()) (m_noblock)
193 :     val _ = (fn _ => ()) (m_iod)
194 :     val _ = (fn _ => ()) (m_arr)
195 :     val _ = (fn _ => ()) (m_nbytes)
196 :     val _ = (fn _ => ()) (m_offset)
197 :     in
198 :     (result)
199 :     end
200 :     val cfun_writeBinVec : (cfun_ML_bool_t * cfun_ML_iodesc_t * cfun_ML_word8vec_t * Int.int * Int.int) -> cfun_ML_int_t = C.c_function "SMLBasis" "writeBinVec"
201 :     fun writeBinVec(noblock,iod,buf,offset,nbytes) = let
202 :     val m_noblock = (fn x => x)(noblock)
203 :     val m_iod = (fn x => x)(iod)
204 :     val m_buf = (fn x => x)(buf)
205 :     val m_offset = (fn (x) => x)(offset)
206 :     val m_nbytes = (fn (x) => x)(nbytes)
207 :     val (m_result) = cfun_writeBinVec (m_noblock,m_iod,m_buf,m_offset,m_nbytes)
208 :     val result = (fn x => x)(m_result)
209 :     val _ = (fn _ => ()) (m_noblock)
210 :     val _ = (fn _ => ()) (m_iod)
211 :     val _ = (fn _ => ()) (m_buf)
212 :     val _ = (fn _ => ()) (m_offset)
213 :     val _ = (fn _ => ()) (m_nbytes)
214 :     in
215 :     (result)
216 :     end
217 :     val cfun_writeBinArr : (cfun_ML_bool_t * cfun_ML_iodesc_t * cfun_ML_word8arr_t * Int.int * Int.int) -> cfun_ML_int_t = C.c_function "SMLBasis" "writeBinArr"
218 :     fun writeBinArr(noblock,iod,buf,offset,nbytes) = let
219 :     val m_noblock = (fn x => x)(noblock)
220 :     val m_iod = (fn x => x)(iod)
221 :     val m_buf = (fn x => x)(buf)
222 :     val m_offset = (fn (x) => x)(offset)
223 :     val m_nbytes = (fn (x) => x)(nbytes)
224 :     val (m_result) = cfun_writeBinArr (m_noblock,m_iod,m_buf,m_offset,m_nbytes)
225 :     val result = (fn x => x)(m_result)
226 :     val _ = (fn _ => ()) (m_noblock)
227 :     val _ = (fn _ => ()) (m_iod)
228 :     val _ = (fn _ => ()) (m_buf)
229 :     val _ = (fn _ => ()) (m_offset)
230 :     val _ = (fn _ => ()) (m_nbytes)
231 :     in
232 :     (result)
233 :     end
234 :     val SET_POS_BEGIN = 0 : Int.int
235 :     val SET_POS_CUR = 1 : Int.int
236 :     val SET_POS_END = 2 : Int.int
237 :     val cfun_getPos : cfun_ML_iodesc_t -> cfun_ML_int32_t = C.c_function "SMLBasis" "getPos"
238 :     fun getPos(iod) = let
239 :     val m_iod = (fn x => x)(iod)
240 :     val (m_result) = cfun_getPos (m_iod)
241 :     val result = (fn x => x)(m_result)
242 :     val _ = (fn _ => ()) (m_iod)
243 :     in
244 :     (result)
245 :     end
246 :     val cfun_setPos : (cfun_ML_iodesc_t * cfun_ML_int32_t * Int.int) -> cfun_ML_unit_t = C.c_function "SMLBasis" "setPos"
247 :     fun setPos(iod,offset,whence) = let
248 :     val m_iod = (fn x => x)(iod)
249 :     val m_offset = (fn x => x)(offset)
250 :     val m_whence = (fn (x) => x)(whence)
251 :     val (m_result) = cfun_setPos (m_iod,m_offset,m_whence)
252 :     val result = (fn x => x)(m_result)
253 :     val _ = (fn _ => ()) (m_iod)
254 :     val _ = (fn _ => ()) (m_offset)
255 :     val _ = (fn _ => ()) (m_whence)
256 :     in
257 :     (result)
258 :     end
259 :     val cfun_getStdIn : unit -> cfun_ML_iodesc_t = C.c_function "SMLBasis" "getStdIn"
260 :     fun getStdIn() = let
261 :     val (m_result) = cfun_getStdIn ()
262 :     val result = (fn x => x)(m_result)
263 :     in
264 :     (result)
265 :     end
266 :     val cfun_getStdOut : unit -> cfun_ML_iodesc_t = C.c_function "SMLBasis" "getStdOut"
267 :     fun getStdOut() = let
268 :     val (m_result) = cfun_getStdOut ()
269 :     val result = (fn x => x)(m_result)
270 :     in
271 :     (result)
272 :     end
273 :     val cfun_getStdErr : unit -> cfun_ML_iodesc_t = C.c_function "SMLBasis" "getStdErr"
274 :     fun getStdErr() = let
275 :     val (m_result) = cfun_getStdErr ()
276 :     val result = (fn x => x)(m_result)
277 :     in
278 :     (result)
279 :     end
280 :     val cfun_errorName : Int32.int -> cfun_ML_string_t = C.c_function "SMLBasis" "errorName"
281 :     fun errorName(err) = let
282 :     val m_err = (fn (x) => x)(err)
283 :     val (m_result) = cfun_errorName (m_err)
284 :     val result = (fn x => x)(m_result)
285 :     val _ = (fn _ => ()) (m_err)
286 :     in
287 :     (result)
288 :     end
289 :     val cfun_errorMessage : Int32.int -> cfun_ML_string_t = C.c_function "SMLBasis" "errorMessage"
290 :     fun errorMessage(err) = let
291 :     val m_err = (fn (x) => x)(err)
292 :     val (m_result) = cfun_errorMessage (m_err)
293 :     val result = (fn x => x)(m_result)
294 :     val _ = (fn _ => ()) (m_err)
295 :     in
296 :     (result)
297 :     end
298 :     val cfun_syserror : String.string -> cfun_ML_int_opt_t = C.c_function "SMLBasis" "syserror"
299 :     fun syserror(errName) = let
300 :     val m_errName = (fn (x) => x)(errName)
301 :     val (m_result) = cfun_syserror (m_errName)
302 :     val result = (fn x => x)(m_result)
303 :     val _ = (fn _ => ()) (m_errName)
304 :     in
305 :     (result)
306 :     end
307 :     val cfun_osSystem : String.string -> cfun_ML_int_t = C.c_function "SMLBasis" "osSystem"
308 :     fun osSystem(name) = let
309 :     val m_name = (fn (x) => x)(name)
310 :     val (m_result) = cfun_osSystem (m_name)
311 :     val result = (fn x => x)(m_result)
312 :     val _ = (fn _ => ()) (m_name)
313 :     in
314 :     (result)
315 :     end
316 :     val cfun_exitProc : Int.int -> unit = C.c_function "SMLBasis" "exitProc"
317 :     fun exitProc(sts) = let
318 :     val m_sts = (fn (x) => x)(sts)
319 :     val () = cfun_exitProc (m_sts)
320 :     val _ = (fn _ => ()) (m_sts)
321 :     in
322 :     ()
323 :     end
324 :     val cfun_getEnv : String.string -> cfun_ML_string_opt_t = C.c_function "SMLBasis" "getEnv"
325 :     fun getEnv(ss) = let
326 :     val m_ss = (fn (x) => x)(ss)
327 :     val (m_result) = cfun_getEnv (m_ss)
328 :     val result = (fn x => x)(m_result)
329 :     val _ = (fn _ => ()) (m_ss)
330 :     in
331 :     (result)
332 :     end
333 :     val cfun_osSleep : cfun_Time_t -> unit = C.c_function "SMLBasis" "osSleep"
334 :     fun osSleep(t) = let
335 :     val m_t = ((fn (x) => x) o ((fn {seconds,uSeconds} => (seconds,uSeconds)) o (fn ({seconds,uSeconds}) => let val m_seconds = (fn (x) => x)(seconds) val m_uSeconds = (fn (x) => x)(uSeconds) in {seconds = m_seconds,uSeconds = m_uSeconds} end)))(t)
336 :     val () = cfun_osSleep (m_t)
337 :     val _ = (fn _ => ()) (m_t)
338 :     in
339 :     ()
340 :     end
341 :     val cfun_openDir : String.string -> cfun_ML_directory_t = C.c_function "SMLBasis" "openDir"
342 :     fun openDir(path) = let
343 :     val m_path = (fn (x) => x)(path)
344 :     val (m_result) = cfun_openDir (m_path)
345 :     val result = (fn x => x)(m_result)
346 :     val _ = (fn _ => ()) (m_path)
347 :     in
348 :     (result)
349 :     end
350 :     val cfun_readDir : cfun_ML_directory_t -> cfun_ML_string_opt_t = C.c_function "SMLBasis" "readDir"
351 :     fun readDir(dir) = let
352 :     val m_dir = (fn x => x)(dir)
353 :     val (m_result) = cfun_readDir (m_dir)
354 :     val result = (fn x => x)(m_result)
355 :     val _ = (fn _ => ()) (m_dir)
356 :     in
357 :     (result)
358 :     end
359 :     val cfun_rewindDir : cfun_ML_directory_t -> cfun_ML_unit_t = C.c_function "SMLBasis" "rewindDir"
360 :     fun rewindDir(dir) = let
361 :     val m_dir = (fn x => x)(dir)
362 :     val (m_result) = cfun_rewindDir (m_dir)
363 :     val result = (fn x => x)(m_result)
364 :     val _ = (fn _ => ()) (m_dir)
365 :     in
366 :     (result)
367 :     end
368 :     val cfun_closeDir : cfun_ML_directory_t -> cfun_ML_unit_t = C.c_function "SMLBasis" "closeDir"
369 :     fun closeDir(dir) = let
370 :     val m_dir = (fn x => x)(dir)
371 :     val (m_result) = cfun_closeDir (m_dir)
372 :     val result = (fn x => x)(m_result)
373 :     val _ = (fn _ => ()) (m_dir)
374 :     in
375 :     (result)
376 :     end
377 :     val cfun_chDir : String.string -> cfun_ML_unit_t = C.c_function "SMLBasis" "chDir"
378 :     fun chDir(path) = let
379 :     val m_path = (fn (x) => x)(path)
380 :     val (m_result) = cfun_chDir (m_path)
381 :     val result = (fn x => x)(m_result)
382 :     val _ = (fn _ => ()) (m_path)
383 :     in
384 :     (result)
385 :     end
386 :     val cfun_getDir : unit -> cfun_ML_string_t = C.c_function "SMLBasis" "getDir"
387 :     fun getDir() = let
388 :     val (m_result) = cfun_getDir ()
389 :     val result = (fn x => x)(m_result)
390 :     in
391 :     (result)
392 :     end
393 :     val cfun_mkDir : String.string -> cfun_ML_unit_t = C.c_function "SMLBasis" "mkDir"
394 :     fun mkDir(path) = let
395 :     val m_path = (fn (x) => x)(path)
396 :     val (m_result) = cfun_mkDir (m_path)
397 :     val result = (fn x => x)(m_result)
398 :     val _ = (fn _ => ()) (m_path)
399 :     in
400 :     (result)
401 :     end
402 :     val cfun_rmDir : String.string -> cfun_ML_unit_t = C.c_function "SMLBasis" "rmDir"
403 :     fun rmDir(path) = let
404 :     val m_path = (fn (x) => x)(path)
405 :     val (m_result) = cfun_rmDir (m_path)
406 :     val result = (fn x => x)(m_result)
407 :     val _ = (fn _ => ()) (m_path)
408 :     in
409 :     (result)
410 :     end
411 :     val cfun_isReg : String.string -> cfun_ML_bool_t = C.c_function "SMLBasis" "isReg"
412 :     fun isReg(path) = let
413 :     val m_path = (fn (x) => x)(path)
414 :     val (m_result) = cfun_isReg (m_path)
415 :     val result = (fn x => x)(m_result)
416 :     val _ = (fn _ => ()) (m_path)
417 :     in
418 :     (result)
419 :     end
420 :     val cfun_isDir : String.string -> cfun_ML_bool_t = C.c_function "SMLBasis" "isDir"
421 :     fun isDir(path) = let
422 :     val m_path = (fn (x) => x)(path)
423 :     val (m_result) = cfun_isDir (m_path)
424 :     val result = (fn x => x)(m_result)
425 :     val _ = (fn _ => ()) (m_path)
426 :     in
427 :     (result)
428 :     end
429 :     val cfun_isLink : String.string -> cfun_ML_bool_t = C.c_function "SMLBasis" "isLink"
430 :     fun isLink(path) = let
431 :     val m_path = (fn (x) => x)(path)
432 :     val (m_result) = cfun_isLink (m_path)
433 :     val result = (fn x => x)(m_result)
434 :     val _ = (fn _ => ()) (m_path)
435 :     in
436 :     (result)
437 :     end
438 :     val cfun_readLink : String.string -> cfun_ML_string_t = C.c_function "SMLBasis" "readLink"
439 :     fun readLink(path) = let
440 :     val m_path = (fn (x) => x)(path)
441 :     val (m_result) = cfun_readLink (m_path)
442 :     val result = (fn x => x)(m_result)
443 :     val _ = (fn _ => ()) (m_path)
444 :     in
445 :     (result)
446 :     end
447 :     val cfun_fileSize : String.string -> cfun_ML_int32_t = C.c_function "SMLBasis" "fileSize"
448 :     fun fileSize(path) = let
449 :     val m_path = (fn (x) => x)(path)
450 :     val (m_result) = cfun_fileSize (m_path)
451 :     val result = (fn x => x)(m_result)
452 :     val _ = (fn _ => ()) (m_path)
453 :     in
454 :     (result)
455 :     end
456 :     val cfun_modTime : String.string -> cfun_ML_int32_t = C.c_function "SMLBasis" "modTime"
457 :     fun modTime(path) = let
458 :     val m_path = (fn (x) => x)(path)
459 :     val (m_result) = cfun_modTime (m_path)
460 :     val result = (fn x => x)(m_result)
461 :     val _ = (fn _ => ()) (m_path)
462 :     in
463 :     (result)
464 :     end
465 :     val cfun_setTime : (String.string * cfun_Time_t option) -> cfun_ML_unit_t = C.c_function "SMLBasis" "setTime"
466 :     fun setTime(path,t) = let
467 :     val m_path = (fn (x) => x)(path)
468 :     val m_t = ((fn (x) => x) o (fn NONE => NONE | SOME (v) => SOME (((fn (x) => x) o ((fn {seconds,uSeconds} => (seconds,uSeconds)) o (fn ({seconds,uSeconds}) => let val m_seconds = (fn (x) => x)(seconds) val m_uSeconds = (fn (x) => x)(uSeconds) in {seconds = m_seconds,uSeconds = m_uSeconds} end))) (v))))(t)
469 :     val (m_result) = cfun_setTime (m_path,m_t)
470 :     val result = (fn x => x)(m_result)
471 :     val _ = (fn _ => ()) (m_path)
472 :     val _ = (fn _ => ()) (m_t)
473 :     in
474 :     (result)
475 :     end
476 :     val cfun_removeFile : String.string -> cfun_ML_unit_t = C.c_function "SMLBasis" "removeFile"
477 :     fun removeFile(path) = let
478 :     val m_path = (fn (x) => x)(path)
479 :     val (m_result) = cfun_removeFile (m_path)
480 :     val result = (fn x => x)(m_result)
481 :     val _ = (fn _ => ()) (m_path)
482 :     in
483 :     (result)
484 :     end
485 :     val cfun_renameFile : (String.string * String.string) -> cfun_ML_unit_t = C.c_function "SMLBasis" "renameFile"
486 :     fun renameFile(old,new) = let
487 :     val m_old = (fn (x) => x)(old)
488 :     val m_new = (fn (x) => x)(new)
489 :     val (m_result) = cfun_renameFile (m_old,m_new)
490 :     val result = (fn x => x)(m_result)
491 :     val _ = (fn _ => ()) (m_old)
492 :     val _ = (fn _ => ()) (m_new)
493 :     in
494 :     (result)
495 :     end
496 :     val A_READ = 1 : Int.int
497 :     val A_WRITE = 2 : Int.int
498 :     val A_EXEC = 4 : Int.int
499 :     val cfun_fileAccess : (String.string * Int.int) -> cfun_ML_bool_t = C.c_function "SMLBasis" "fileAccess"
500 :     fun fileAccess(path,mode) = let
501 :     val m_path = (fn (x) => x)(path)
502 :     val m_mode = (fn (x) => x)(mode)
503 :     val (m_result) = cfun_fileAccess (m_path,m_mode)
504 :     val result = (fn x => x)(m_result)
505 :     val _ = (fn _ => ()) (m_path)
506 :     val _ = (fn _ => ()) (m_mode)
507 :     in
508 :     (result)
509 :     end
510 :     val cfun_tmpName : unit -> cfun_ML_string_t = C.c_function "SMLBasis" "tmpName"
511 :     fun tmpName() = let
512 :     val (m_result) = cfun_tmpName ()
513 :     val result = (fn x => x)(m_result)
514 :     in
515 :     (result)
516 :     end
517 :     val cfun_fileId : String.string -> cfun_ML_word8vec_t = C.c_function "SMLBasis" "fileId"
518 :     fun fileId(path) = let
519 :     val m_path = (fn (x) => x)(path)
520 :     val (m_result) = cfun_fileId (m_path)
521 :     val result = (fn x => x)(m_result)
522 :     val _ = (fn _ => ()) (m_path)
523 :     in
524 :     (result)
525 :     end
526 :     val IOD_KIND_FILE = 0 : Int.int
527 :     val IOD_KIND_DIR = 1 : Int.int
528 :     val IOD_KIND_SYMLINK = 2 : Int.int
529 :     val IOD_KIND_TTY = 3 : Int.int
530 :     val IOD_KIND_PIPE = 4 : Int.int
531 :     val IOD_KIND_SOCKET = 5 : Int.int
532 :     val IOD_KIND_DEVICE = 6 : Int.int
533 :     val cfun_ioDescKind : cfun_ML_iodesc_t -> cfun_ML_int_t = C.c_function "SMLBasis" "ioDescKind"
534 :     fun ioDescKind(iod) = let
535 :     val m_iod = (fn x => x)(iod)
536 :     val (m_result) = cfun_ioDescKind (m_iod)
537 :     val result = (fn x => x)(m_result)
538 :     val _ = (fn _ => ()) (m_iod)
539 :     in
540 :     (result)
541 :     end
542 :     val POLL_RD = 0wx1 : Word.word
543 :     val POLL_WR = 0wx2 : Word.word
544 :     val POLL_ERR = 0wx4 : Word.word
545 :     val cfun_osPoll : (cfun_ML_polldesc_list_t * cfun_Time_t option) -> cfun_ML_pollinfo_list_t = C.c_function "SMLBasis" "osPoll"
546 :     fun osPoll(pds,t) = let
547 :     val m_pds = (fn x => x)(pds)
548 :     val m_t = ((fn (x) => x) o (fn NONE => NONE | SOME (v) => SOME (((fn (x) => x) o ((fn {seconds,uSeconds} => (seconds,uSeconds)) o (fn ({seconds,uSeconds}) => let val m_seconds = (fn (x) => x)(seconds) val m_uSeconds = (fn (x) => x)(uSeconds) in {seconds = m_seconds,uSeconds = m_uSeconds} end))) (v))))(t)
549 :     val (m_result) = cfun_osPoll (m_pds,m_t)
550 :     val result = (fn x => x)(m_result)
551 :     val _ = (fn _ => ()) (m_pds)
552 :     val _ = (fn _ => ()) (m_t)
553 :     in
554 :     (result)
555 :     end
556 :     val cfun_now : unit -> cfun_Time_t = C.c_function "SMLBasis" "now"
557 :     fun now() = let
558 :     val (m_t) = cfun_now ()
559 :     val t = (((fn (v) => let val m_seconds = (fn (x) => x) ((fn (x_0,x_1) => x_0) (v)) val m_uSeconds = (fn (x) => x) ((fn (x_0,x_1) => x_1) (v)) in {seconds = m_seconds,uSeconds = m_uSeconds} end) o (fn (x) => x)) m_t)
560 :     val _ = (fn _ => ()) (m_t)
561 :     in
562 :     (t)
563 :     end
564 :     val cfun_ascTime : cfun_Date_t -> cfun_ML_string_t = C.c_function "SMLBasis" "ascTime"
565 :     fun ascTime(date) = let
566 :     val m_date = ((fn (x) => x) o ((fn {tm_sec,tm_min,tm_hour,tm_mday,tm_mon,tm_year,tm_wday,tm_yday,tm_isdst} => (tm_sec,tm_min,tm_hour,tm_mday,tm_mon,tm_year,tm_wday,tm_yday,tm_isdst)) o (fn ({tm_sec,tm_min,tm_hour,tm_mday,tm_mon,tm_year,tm_wday,tm_yday,tm_isdst}) => let val m_tm_sec = (fn (x) => x)(tm_sec) val m_tm_min = (fn (x) => x)(tm_min) val m_tm_hour = (fn (x) => x)(tm_hour) val m_tm_mday = (fn (x) => x)(tm_mday) val m_tm_mon = (fn (x) => x)(tm_mon) val m_tm_year = (fn (x) => x)(tm_year) val m_tm_wday = (fn (x) => x)(tm_wday) val m_tm_yday = (fn (x) => x)(tm_yday) val m_tm_isdst = (fn (x) => x)(tm_isdst) in {tm_sec = m_tm_sec,tm_min = m_tm_min,tm_hour = m_tm_hour,tm_mday = m_tm_mday,tm_mon = m_tm_mon,tm_year = m_tm_year,tm_wday = m_tm_wday,tm_yday = m_tm_yday,tm_isdst = m_tm_isdst} end)))(date)
567 :     val (m_result) = cfun_ascTime (m_date)
568 :     val result = (fn x => x)(m_result)
569 :     val _ = (fn _ => ()) (m_date)
570 :     in
571 :     (result)
572 :     end
573 :     val cfun_strfTime : (cfun_ML_string_t * cfun_Date_t) -> cfun_ML_string_t = C.c_function "SMLBasis" "strfTime"
574 :     fun strfTime(s,date) = let
575 :     val m_s = (fn x => x)(s)
576 :     val m_date = ((fn (x) => x) o ((fn {tm_sec,tm_min,tm_hour,tm_mday,tm_mon,tm_year,tm_wday,tm_yday,tm_isdst} => (tm_sec,tm_min,tm_hour,tm_mday,tm_mon,tm_year,tm_wday,tm_yday,tm_isdst)) o (fn ({tm_sec,tm_min,tm_hour,tm_mday,tm_mon,tm_year,tm_wday,tm_yday,tm_isdst}) => let val m_tm_sec = (fn (x) => x)(tm_sec) val m_tm_min = (fn (x) => x)(tm_min) val m_tm_hour = (fn (x) => x)(tm_hour) val m_tm_mday = (fn (x) => x)(tm_mday) val m_tm_mon = (fn (x) => x)(tm_mon) val m_tm_year = (fn (x) => x)(tm_year) val m_tm_wday = (fn (x) => x)(tm_wday) val m_tm_yday = (fn (x) => x)(tm_yday) val m_tm_isdst = (fn (x) => x)(tm_isdst) in {tm_sec = m_tm_sec,tm_min = m_tm_min,tm_hour = m_tm_hour,tm_mday = m_tm_mday,tm_mon = m_tm_mon,tm_year = m_tm_year,tm_wday = m_tm_wday,tm_yday = m_tm_yday,tm_isdst = m_tm_isdst} end)))(date)
577 :     val (m_result) = cfun_strfTime (m_s,m_date)
578 :     val result = (fn x => x)(m_result)
579 :     val _ = (fn _ => ()) (m_s)
580 :     val _ = (fn _ => ()) (m_date)
581 :     in
582 :     (result)
583 :     end
584 :     val cfun_gmTime : cfun_Time_t -> cfun_Date_t = C.c_function "SMLBasis" "gmTime"
585 :     fun gmTime(t) = let
586 :     val m_t = ((fn (x) => x) o ((fn {seconds,uSeconds} => (seconds,uSeconds)) o (fn ({seconds,uSeconds}) => let val m_seconds = (fn (x) => x)(seconds) val m_uSeconds = (fn (x) => x)(uSeconds) in {seconds = m_seconds,uSeconds = m_uSeconds} end)))(t)
587 :     val (m_date) = cfun_gmTime (m_t)
588 :     val date = (((fn (v) => let val m_tm_sec = (fn (x) => x) ((fn (x_0,x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8) => x_0) (v)) val m_tm_min = (fn (x) => x) ((fn (x_0,x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8) => x_1) (v)) val m_tm_hour = (fn (x) => x) ((fn (x_0,x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8) => x_2) (v)) val m_tm_mday = (fn (x) => x) ((fn (x_0,x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8) => x_3) (v)) val m_tm_mon = (fn (x) => x) ((fn (x_0,x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8) => x_4) (v)) val m_tm_year = (fn (x) => x) ((fn (x_0,x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8) => x_5) (v)) val m_tm_wday = (fn (x) => x) ((fn (x_0,x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8) => x_6) (v)) val m_tm_yday = (fn (x) => x) ((fn (x_0,x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8) => x_7) (v)) val m_tm_isdst = (fn (x) => x) ((fn (x_0,x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8) => x_8) (v)) in {tm_sec = m_tm_sec,tm_min = m_tm_min,tm_hour = m_tm_hour,tm_mday = m_tm_mday,tm_mon = m_tm_mon,tm_year = m_tm_year,tm_wday = m_tm_wday,tm_yday = m_tm_yday,tm_isdst = m_tm_isdst} end) o (fn (x) => x)) m_date)
589 :     val _ = (fn _ => ()) (m_t)
590 :     val _ = (fn _ => ()) (m_date)
591 :     in
592 :     (date)
593 :     end
594 :     val cfun_localTime : cfun_Time_t -> cfun_Date_t = C.c_function "SMLBasis" "localTime"
595 :     fun localTime(t) = let
596 :     val m_t = ((fn (x) => x) o ((fn {seconds,uSeconds} => (seconds,uSeconds)) o (fn ({seconds,uSeconds}) => let val m_seconds = (fn (x) => x)(seconds) val m_uSeconds = (fn (x) => x)(uSeconds) in {seconds = m_seconds,uSeconds = m_uSeconds} end)))(t)
597 :     val (m_date) = cfun_localTime (m_t)
598 :     val date = (((fn (v) => let val m_tm_sec = (fn (x) => x) ((fn (x_0,x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8) => x_0) (v)) val m_tm_min = (fn (x) => x) ((fn (x_0,x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8) => x_1) (v)) val m_tm_hour = (fn (x) => x) ((fn (x_0,x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8) => x_2) (v)) val m_tm_mday = (fn (x) => x) ((fn (x_0,x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8) => x_3) (v)) val m_tm_mon = (fn (x) => x) ((fn (x_0,x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8) => x_4) (v)) val m_tm_year = (fn (x) => x) ((fn (x_0,x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8) => x_5) (v)) val m_tm_wday = (fn (x) => x) ((fn (x_0,x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8) => x_6) (v)) val m_tm_yday = (fn (x) => x) ((fn (x_0,x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8) => x_7) (v)) val m_tm_isdst = (fn (x) => x) ((fn (x_0,x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8) => x_8) (v)) in {tm_sec = m_tm_sec,tm_min = m_tm_min,tm_hour = m_tm_hour,tm_mday = m_tm_mday,tm_mon = m_tm_mon,tm_year = m_tm_year,tm_wday = m_tm_wday,tm_yday = m_tm_yday,tm_isdst = m_tm_isdst} end) o (fn (x) => x)) m_date)
599 :     val _ = (fn _ => ()) (m_t)
600 :     val _ = (fn _ => ()) (m_date)
601 :     in
602 :     (date)
603 :     end
604 :     val cfun_mkTime : cfun_Date_t -> cfun_Time_t = C.c_function "SMLBasis" "mkTime"
605 :     fun mkTime(date) = let
606 :     val m_date = ((fn (x) => x) o ((fn {tm_sec,tm_min,tm_hour,tm_mday,tm_mon,tm_year,tm_wday,tm_yday,tm_isdst} => (tm_sec,tm_min,tm_hour,tm_mday,tm_mon,tm_year,tm_wday,tm_yday,tm_isdst)) o (fn ({tm_sec,tm_min,tm_hour,tm_mday,tm_mon,tm_year,tm_wday,tm_yday,tm_isdst}) => let val m_tm_sec = (fn (x) => x)(tm_sec) val m_tm_min = (fn (x) => x)(tm_min) val m_tm_hour = (fn (x) => x)(tm_hour) val m_tm_mday = (fn (x) => x)(tm_mday) val m_tm_mon = (fn (x) => x)(tm_mon) val m_tm_year = (fn (x) => x)(tm_year) val m_tm_wday = (fn (x) => x)(tm_wday) val m_tm_yday = (fn (x) => x)(tm_yday) val m_tm_isdst = (fn (x) => x)(tm_isdst) in {tm_sec = m_tm_sec,tm_min = m_tm_min,tm_hour = m_tm_hour,tm_mday = m_tm_mday,tm_mon = m_tm_mon,tm_year = m_tm_year,tm_wday = m_tm_wday,tm_yday = m_tm_yday,tm_isdst = m_tm_isdst} end)))(date)
607 :     val (m_time) = cfun_mkTime (m_date)
608 :     val time = (((fn (v) => let val m_seconds = (fn (x) => x) ((fn (x_0,x_1) => x_0) (v)) val m_uSeconds = (fn (x) => x) ((fn (x_0,x_1) => x_1) (v)) in {seconds = m_seconds,uSeconds = m_uSeconds} end) o (fn (x) => x)) m_time)
609 :     val _ = (fn _ => ()) (m_date)
610 :     val _ = (fn _ => ()) (m_time)
611 :     in
612 :     (time)
613 :     end
614 :     val cfun_getCPUTime : unit -> (cfun_Time_t * cfun_Time_t * cfun_Time_t) = C.c_function "SMLBasis" "getCPUTime"
615 :     fun getCPUTime() = let
616 :     val (m_u,m_s,m_g) = cfun_getCPUTime ()
617 :     val u = (((fn (v) => let val m_seconds = (fn (x) => x) ((fn (x_0,x_1) => x_0) (v)) val m_uSeconds = (fn (x) => x) ((fn (x_0,x_1) => x_1) (v)) in {seconds = m_seconds,uSeconds = m_uSeconds} end) o (fn (x) => x)) m_u)
618 :     val s = (((fn (v) => let val m_seconds = (fn (x) => x) ((fn (x_0,x_1) => x_0) (v)) val m_uSeconds = (fn (x) => x) ((fn (x_0,x_1) => x_1) (v)) in {seconds = m_seconds,uSeconds = m_uSeconds} end) o (fn (x) => x)) m_s)
619 :     val g = (((fn (v) => let val m_seconds = (fn (x) => x) ((fn (x_0,x_1) => x_0) (v)) val m_uSeconds = (fn (x) => x) ((fn (x_0,x_1) => x_1) (v)) in {seconds = m_seconds,uSeconds = m_uSeconds} end) o (fn (x) => x)) m_g)
620 :     val _ = (fn _ => ()) (m_u)
621 :     val _ = (fn _ => ()) (m_s)
622 :     val _ = (fn _ => ()) (m_g)
623 :     in
624 :     (u,s,g)
625 :     end
626 :     val cfun_cmdName : unit -> String.string = C.c_function "SMLBasis" "cmdName"
627 :     fun cmdName() = let
628 :     val (m_s) = cfun_cmdName ()
629 :     val s = (((fn (x) => x) o (fn (x) => x)) m_s)
630 :     val _ = (fn _ => ()) (m_s)
631 :     in
632 :     (s)
633 :     end
634 :     val cfun_cmdArgs : unit -> cfun_ML_string_list_t = C.c_function "SMLBasis" "cmdArgs"
635 :     fun cmdArgs() = let
636 :     val (m_result) = cfun_cmdArgs ()
637 :     val result = (fn x => x)(m_result)
638 :     in
639 :     (result)
640 :     end
641 :     end
642 :    

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0