1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2	"http://www.w3.org/TR/REC-html40/loose.dtd">
3<html>
4
5<head>
6<title>The Foreign structure</title>
7<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
8<link href="docstyle.css" rel="stylesheet" type="text/css">
9</head>
10
11<body bgcolor="#FFFFFF">
12<ul class="nav">
13	<li><a href="Basis.html">Previous</a></li>
14	<li><a href="Basis.html">Up</a></li>
15	<li><a href="PolyMLStructure.html">Next</a></li>
16</ul>
17
18<h2><font face="Arial"><strong>Foreign structure</strong></font></h2>
19
20<p>This is the new foreign-function interface</p>
21
22<pre class="mainsig">
23signature FOREIGN =
24sig
25    exception Foreign of string
26
27    structure Memory:
28    sig
29        eqtype volatileRef
30        val volatileRef: SysWord.word -> volatileRef
31        val setVolatileRef: volatileRef * SysWord.word -> unit
32        val getVolatileRef: volatileRef -> SysWord.word
33        
34        eqtype voidStar
35        val voidStar2Sysword: voidStar -> SysWord.word
36        val sysWord2VoidStar: SysWord.word -> voidStar
37        val null: voidStar
38
39        val ++ : voidStar * word -> voidStar
40        val -- : voidStar * word -> voidStar
41        
42        val memoise: ('a -> voidStar) ->'a -> unit -> voidStar
43        
44        exception Memory
45
46        val malloc: word -> voidStar
47        val free: voidStar -> unit
48
49        val get8:  voidStar * Word.word -> Word8.word
50        val get16: voidStar * Word.word -> Word.word
51        val get32: voidStar * Word.word -> Word32.word
52        val get64: voidStar * Word.word -> SysWord.word
53        val set8:  voidStar * Word.word * Word8.word -> unit
54        val set16: voidStar * Word.word * Word.word -> unit
55        val set32: voidStar * Word.word * Word32.word -> unit
56        val set64: voidStar * Word.word * SysWord.word -> unit
57
58        val getFloat:   voidStar * Word.word -> real
59        val getDouble:  voidStar * Word.word -> real
60        val setFloat:   voidStar * Word.word * real -> unit
61        val setDouble:  voidStar * Word.word * real -> unit
62
63        val getAddress: voidStar * Word.word -> voidStar
64        val setAddress: voidStar * Word.word * voidStar -> unit
65    end
66    
67    structure System:
68    sig
69        type voidStar = Memory.voidStar
70        val loadLibrary: string -> voidStar
71        and loadExecutable: unit -> voidStar
72        and freeLibrary: voidStar -> unit
73        and getSymbol: voidStar * string -> voidStar
74    end
75    
76    structure LibFFI:
77    sig
78        eqtype abi
79        (* List of ABIs defined in libffi for this platform. *)
80        val abiList: (string * abi) list
81        (* The default Abi. *)
82        val abiDefault:         abi
83
84        (* Type codes. *)
85        val ffiTypeCodeVoid:    Word.word
86        and ffiTypeCodeInt:     Word.word
87        and ffiTypeCodeFloat:   Word.word
88        and ffiTypeCodeDouble:  Word.word
89        and ffiTypeCodeUInt8:   Word.word
90        and ffiTypeCodeSInt8:   Word.word
91        and ffiTypeCodeUInt16:  Word.word
92        and ffiTypeCodeSInt16:  Word.word
93        and ffiTypeCodeUInt32:  Word.word
94        and ffiTypeCodeSInt32:  Word.word
95        and ffiTypeCodeUInt64:  Word.word
96        and ffiTypeCodeSInt64:  Word.word
97        and ffiTypeCodeStruct:  Word.word
98        and ffiTypeCodePointer: Word.word
99
100        eqtype ffiType
101        val ffiType2voidStar: ffiType -> Memory.voidStar
102        val voidStar2ffiType: Memory.voidStar -> ffiType
103
104        val getFFItypeVoid: unit -> ffiType
105        and getFFItypeUint8: unit -> ffiType
106        and getFFItypeSint8: unit -> ffiType
107        and getFFItypeUint16: unit -> ffiType
108        and getFFItypeSint16: unit -> ffiType
109        and getFFItypeUint32: unit -> ffiType
110        and getFFItypeSint32: unit -> ffiType
111        and getFFItypeUint64: unit -> ffiType
112        and getFFItypeSint64: unit -> ffiType
113        and getFFItypeFloat: unit -> ffiType
114        and getFFItypeDouble: unit -> ffiType
115        and getFFItypePointer: unit -> ffiType
116        and getFFItypeUChar: unit -> ffiType
117        and getFFItypeSChar: unit -> ffiType
118        and getFFItypeUShort: unit -> ffiType
119        and getFFItypeSShort: unit -> ffiType
120        and getFFItypeUint: unit -> ffiType
121        and getFFItypeSint: unit -> ffiType
122        and getFFItypeUlong: unit -> ffiType
123        and getFFItypeSlong: unit -> ffiType
124        
125        val extractFFItype:
126            ffiType -> { size: word, align: word, typeCode: word, elements: ffiType list }
127        val createFFItype:
128            { size: word, align: word, typeCode: word, elements: ffiType list } -> ffiType
129
130        eqtype cif
131        val cif2voidStar: cif -> Memory.voidStar
132        val voidStar2cif: Memory.voidStar -> cif
133        val createCIF: abi * ffiType * ffiType list -> cif
134        val callFunction:
135            { cif: cif, function: Memory.voidStar, result: Memory.voidStar, arguments: Memory.voidStar } -> unit
136
137        val createCallback:
138            (Memory.voidStar * Memory.voidStar -> unit) * cif -> Memory.voidStar
139        val freeCallback: Memory.voidStar -> unit
140    end
141    
142    type library
143    type symbol
144    val loadLibrary: string -> library
145    val loadExecutable: unit -> library
146    val getSymbol: library -> string  -> symbol
147    val symbolAsAddress: symbol -> Memory.voidStar
148
149    structure LowLevel:
150    sig
151        type ctype =
152        {
153            size: Word.word, (* Size in bytes *)
154            align: Word.word, (* Alignment *)
155            ffiType: unit -> LibFFI.ffiType
156        }
157        
158        val cTypeVoid: ctype
159        and cTypePointer: ctype
160        and cTypeInt8: ctype
161        and cTypeChar: ctype
162        and cTypeUint8: ctype
163        and cTypeUchar: ctype
164        and cTypeInt16: ctype
165        and cTypeUint16: ctype
166        and cTypeInt32: ctype
167        and cTypeUint32: ctype
168        and cTypeInt64: ctype
169        and cTypeUint64: ctype
170        and cTypeInt: ctype
171        and cTypeUint: ctype
172        and cTypeLong: ctype
173        and cTypeUlong: ctype
174        and cTypeFloat: ctype
175        and cTypeDouble: ctype
176        
177        val cStruct: ctype list -> ctype
178
179        val callwithAbi: LibFFI.abi -> ctype list -> ctype -> symbol -> Memory.voidStar list * Memory.voidStar -> unit
180        val call: ctype list -> ctype -> symbol -> Memory.voidStar list * Memory.voidStar -> unit
181        
182        val cFunctionWithAbi:
183            LibFFI.abi -> ctype list -> ctype -> (Memory.voidStar * Memory.voidStar -> unit) -> Memory.voidStar
184        val cFunction:
185            ctype list -> ctype -> (Memory.voidStar * Memory.voidStar -> unit) -> Memory.voidStar
186    end
187
188    type 'a conversion
189
190    val makeConversion:
191        {
192            load: Memory.voidStar -> 'a, (* Load a value from C memory *)
193            store: Memory.voidStar * 'a -> unit -> unit, (* Store value and return free function. *)
194            ctype: LowLevel.ctype
195        } -> 'a conversion
196
197    val breakConversion:
198        'a conversion ->
199        {
200            load: Memory.voidStar -> 'a, (* Load a value from C memory *)
201            store: Memory.voidStar * 'a -> unit -> unit, (* Store value and return free function. *)
202            ctype: LowLevel.ctype
203        }
204
205    val cVoid: unit conversion
206    val cPointer: Memory.voidStar conversion
207    val cInt8: int conversion
208    val cUint8: int conversion
209    val cChar: char conversion
210    val cUchar: Word8.word conversion
211    val cInt16: int conversion
212    val cUint16: int conversion
213    val cInt32: int conversion
214    val cUint32: int conversion
215    val cInt64: int conversion
216    val cUint64: int conversion
217    val cShort: int conversion
218    val cUshort: int conversion
219    val cInt: int conversion
220    val cUint: int conversion
221    val cLong: int conversion
222    val cUlong: int conversion
223    val cString: string conversion
224    val cByteArray: Word8Vector.vector conversion
225    val cFloat: real conversion
226    val cDouble: real conversion
227    
228    (* When a pointer e.g. a string may be null. *)
229    val cOptionPtr: 'a conversion -> 'a option conversion
230
231    type 'a closure
232    
233    val cFunction: ('a->'b) closure conversion
234
235    val buildClosure0withAbi: (unit -> 'a) * LibFFI.abi * unit * 'a conversion -> (unit -> 'a) closure
236    val buildClosure0: (unit -> 'a) * unit * 'a conversion -> (unit -> 'a) closure
237    val buildClosure1withAbi: ('a -> 'b) * LibFFI.abi * 'a conversion * 'b conversion -> ('a -> 'b) closure
238    val buildClosure1:  ('a -> 'b) * 'a conversion * 'b conversion -> ('a -> 'b) closure
239    val buildClosure2withAbi:
240         ('a * 'b -> 'c) * LibFFI.abi * ('a conversion * 'b conversion) * 'c conversion -> ('a * 'b -> 'c) closure
241    val buildClosure2: ('a * 'b -> 'c) * ('a conversion * 'b conversion) * 'c conversion -> ('a * 'b -> 'c) closure
242    val buildClosure3withAbi:
243         ('a * 'b *'c -> 'd) * LibFFI.abi * ('a conversion * 'b conversion * 'c conversion) * 'd conversion ->
244            ('a * 'b *'c -> 'd) closure
245    val buildClosure3: ('a * 'b *'c -> 'd) * ('a conversion * 'b conversion * 'c conversion) * 'd conversion ->
246            ('a * 'b *'c -> 'd) closure
247    val buildClosure4withAbi:
248         ('a * 'b * 'c  * 'd -> 'e) * LibFFI.abi * ('a conversion * 'b conversion * 'c conversion* 'd conversion) * 'e conversion ->
249            ('a * 'b * 'c * 'd -> 'e) closure
250    val buildClosure4:
251        ('a * 'b * 'c  * 'd -> 'e) * ('a conversion * 'b conversion * 'c conversion* 'd conversion) * 'e conversion ->
252            ('a * 'b * 'c * 'd -> 'e) closure
253    val buildClosure5withAbi:
254        ('a * 'b * 'c * 'd * 'e -> 'f) *
255            LibFFI.abi * ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion) * 'f conversion ->
256            ('a * 'b * 'c * 'd * 'e -> 'f) closure
257    val buildClosure5:
258        ('a * 'b * 'c * 'd * 'e -> 'f) *
259        ('a conversion * 'b conversion * 'c conversion* 'd conversion * 'e conversion) * 'f conversion ->
260            ('a * 'b * 'c * 'd * 'e -> 'f) closure
261    val buildClosure6withAbi:
262        ('a * 'b * 'c * 'd * 'e * 'f -> 'g) * LibFFI.abi *
263            ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion * 'f conversion) * 'g conversion ->
264            ('a * 'b * 'c * 'd * 'e * 'f -> 'g) closure
265    val buildClosure6:
266        ('a * 'b * 'c * 'd * 'e * 'f -> 'g) *
267            ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion * 'f conversion) * 'g conversion ->
268            ('a * 'b * 'c * 'd * 'e * 'f -> 'g) closure
269
270    (* Remove the "free" from a conversion.  Used if extra memory allocated
271       by the argument must not be freed when the function returns.  *)
272    val permanent: 'a conversion -> 'a conversion
273
274    (* Call by reference.  *)
275    val cStar: 'a conversion -> 'a ref conversion
276    (* Pass a const pointer *)
277    val cConstStar: 'a conversion -> 'a conversion
278    
279    (* Fixed size vector.  It is treated as a struct and passed by value or embedded in a structure. *)
280    val cVectorFixedSize: int * 'a conversion -> 'a vector conversion
281    (* Pass an ML vector as a pointer to a C array. *)
282    and cVectorPointer: 'a conversion -> 'a vector conversion
283    (* Pass an ML array as a pointer to a C array and, on return, update each element of
284       the ML array from the C array. *)
285    and cArrayPointer: 'a conversion -> 'a array conversion
286
287    (* structs. *)
288    val cStruct2: 'a conversion * 'b conversion -> ('a * 'b) conversion
289    val cStruct3: 'a conversion * 'b conversion * 'c conversion -> ('a*'b*'c)conversion
290    val cStruct4: 'a conversion * 'b conversion * 'c conversion * 'd conversion -> ('a*'b*'c*'d)conversion
291    val cStruct5: 'a conversion * 'b conversion * 'c conversion * 'd conversion *
292                      'e conversion -> ('a*'b*'c*'d*'e)conversion
293    val cStruct6: 'a conversion * 'b conversion * 'c conversion * 'd conversion *
294                      'e conversion * 'f conversion -> ('a*'b*'c*'d*'e*'f)conversion
295    val cStruct7: 'a conversion * 'b conversion * 'c conversion * 'd conversion *
296                      'e conversion * 'f conversion * 'g conversion -> ('a*'b*'c*'d*'e*'f*'g)conversion
297    val cStruct8: 'a conversion * 'b conversion * 'c conversion * 'd conversion *
298                      'e conversion * 'f conversion * 'g conversion * 'h conversion -> ('a*'b*'c*'d*'e*'f*'g*'h)conversion
299    val cStruct9: 'a conversion * 'b conversion * 'c conversion * 'd conversion *
300                       'e conversion * 'f conversion * 'g conversion * 'h conversion * 'i conversion ->
301                       ('a*'b*'c*'d*'e*'f*'g*'h*'i)conversion
302    val cStruct10: 'a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion * 'f conversion * 'g conversion *
303                   'h conversion * 'i conversion * 'j conversion -> ('a*'b*'c*'d*'e*'f*'g*'h*'i*'j)conversion
304    val cStruct11: 'a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion * 'f conversion * 'g conversion *
305                   'h conversion * 'i conversion * 'j conversion * 'k conversion -> ('a*'b*'c*'d*'e*'f*'g*'h*'i*'j*'k)conversion
306    val cStruct12: 'a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion * 'f conversion * 'g conversion *
307                   'h conversion * 'i conversion * 'j conversion * 'k conversion * 'l conversion ->
308                   ('a*'b*'c*'d*'e*'f*'g*'h*'i*'j*'k*'l)conversion
309    val cStruct13: 'a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion * 'f conversion * 'g conversion *
310                   'h conversion * 'i conversion * 'j conversion * 'k conversion * 'l conversion * 'm conversion ->
311                   ('a*'b*'c*'d*'e*'f*'g*'h*'i*'j*'k*'l*'m)conversion
312    val cStruct14: 'a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion * 'f conversion * 'g conversion *
313                   'h conversion * 'i conversion * 'j conversion * 'k conversion * 'l conversion * 'm conversion * 'n conversion ->
314                   ('a*'b*'c*'d*'e*'f*'g*'h*'i*'j*'k*'l*'m*'n)conversion
315    val cStruct15: 'a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion * 'f conversion * 'g conversion *
316                   'h conversion * 'i conversion * 'j conversion * 'k conversion * 'l conversion * 'm conversion * 'n conversion *
317                   'o conversion -> ('a*'b*'c*'d*'e*'f*'g*'h*'i*'j*'k*'l*'m*'n*'o)conversion
318    val cStruct16: 'a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion * 'f conversion * 'g conversion *
319                   'h conversion * 'i conversion * 'j conversion * 'k conversion * 'l conversion * 'm conversion * 'n conversion *
320                   'o conversion * 'p conversion -> ('a*'b*'c*'d*'e*'f*'g*'h*'i*'j*'k*'l*'m*'n*'o*'p)conversion
321    val cStruct17: 'a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion * 'f conversion * 'g conversion *
322                   'h conversion * 'i conversion * 'j conversion * 'k conversion * 'l conversion * 'm conversion * 'n conversion *
323                   'o conversion * 'p conversion * 'q conversion ->
324                    ('a*'b*'c*'d*'e*'f*'g*'h*'i*'j*'k*'l*'m*'n*'o*'p*'q)conversion
325    val cStruct18: 'a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion * 'f conversion * 'g conversion *
326                   'h conversion * 'i conversion * 'j conversion * 'k conversion * 'l conversion * 'm conversion * 'n conversion *
327                   'o conversion * 'p conversion * 'q conversion * 'r conversion ->
328                    ('a*'b*'c*'d*'e*'f*'g*'h*'i*'j*'k*'l*'m*'n*'o*'p*'q*'r)conversion
329    val cStruct19: 'a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion * 'f conversion * 'g conversion *
330                   'h conversion * 'i conversion * 'j conversion * 'k conversion * 'l conversion * 'm conversion * 'n conversion *
331                   'o conversion * 'p conversion * 'q conversion * 'r conversion * 's conversion ->
332                    ('a*'b*'c*'d*'e*'f*'g*'h*'i*'j*'k*'l*'m*'n*'o*'p*'q*'r*'s)conversion
333    val cStruct20: 'a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion * 'f conversion * 'g conversion *
334                   'h conversion * 'i conversion * 'j conversion * 'k conversion * 'l conversion * 'm conversion * 'n conversion *
335                   'o conversion * 'p conversion * 'q conversion * 'r conversion * 's conversion * 't conversion ->
336                    ('a*'b*'c*'d*'e*'f*'g*'h*'i*'j*'k*'l*'m*'n*'o*'p*'q*'r*'s*'t)conversion
337
338    val buildCall0withAbi: LibFFI.abi * symbol * unit * 'a conversion -> unit -> 'a
339    val buildCall0: symbol * unit * 'a conversion -> unit -> 'a
340    val buildCall1withAbi: LibFFI.abi * symbol * 'a conversion * 'b conversion -> 'a -> 'b
341    val buildCall1: symbol * 'a conversion * 'b conversion -> 'a -> 'b
342    val buildCall2withAbi:
343        LibFFI.abi * symbol * ('a conversion * 'b conversion) * 'c conversion -> 'a * 'b -> 'c
344    val buildCall2:
345        symbol * ('a conversion * 'b conversion) * 'c conversion -> 'a * 'b -> 'c
346    val buildCall3withAbi:
347        LibFFI.abi * symbol * ('a conversion * 'b conversion * 'c conversion) * 'd conversion -> 'a * 'b * 'c -> 'd
348    val buildCall3:
349        symbol * ('a conversion * 'b conversion * 'c conversion) * 'd conversion -> 'a * 'b * 'c -> 'd
350    val buildCall4withAbi:
351        LibFFI.abi * symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion) * 'e conversion ->
352            'a * 'b * 'c * 'd -> 'e
353    val buildCall4:
354        symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion) * 'e conversion ->
355            'a * 'b * 'c * 'd -> 'e
356    val buildCall5withAbi:
357        LibFFI.abi * symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion) * 'f conversion ->
358            'a * 'b * 'c * 'd * 'e -> 'f
359    val buildCall5:
360        symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion) * 'f conversion ->
361            'a * 'b * 'c * 'd * 'e -> 'f
362    val buildCall6withAbi:
363        LibFFI.abi * symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion * 'f conversion) *
364                'g conversion -> 'a * 'b * 'c * 'd * 'e * 'f -> 'g
365    val buildCall6:
366        symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion * 'f conversion) *
367                'g conversion -> 'a * 'b * 'c * 'd * 'e * 'f -> 'g
368    val buildCall7withAbi:
369        LibFFI.abi * symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion *
370             'f conversion * 'g conversion) *
371                'h conversion -> 'a * 'b * 'c * 'd * 'e * 'f * 'g -> 'h
372    val buildCall7:
373        symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion *
374             'f conversion * 'g conversion) *
375                'h conversion -> 'a * 'b * 'c * 'd * 'e * 'f * 'g -> 'h
376    val buildCall8withAbi:
377        LibFFI.abi * symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion *
378             'f conversion * 'g conversion * 'h conversion) *
379                'i conversion -> 'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h -> 'i
380    val buildCall8:
381        symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion *
382             'f conversion * 'g conversion * 'h conversion) *
383                'i conversion -> 'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h -> 'i
384    val buildCall9withAbi:
385        LibFFI.abi * symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion *
386             'f conversion * 'g conversion * 'h conversion * 'i conversion) *
387                'j conversion -> 'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i -> 'j
388    val buildCall9:
389        symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion *
390             'f conversion * 'g conversion * 'h conversion * 'i conversion) *
391                'j conversion -> 'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i -> 'j
392    val buildCall10withAbi:
393        LibFFI.abi * symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion *
394             'f conversion * 'g conversion * 'h conversion * 'i conversion * 'j conversion) *
395                'k conversion -> 'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i * 'j -> 'k
396    val buildCall10:
397        symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion *
398             'f conversion * 'g conversion * 'h conversion * 'i conversion * 'j conversion) *
399                'k conversion -> 'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i * 'j -> 'k
400    val buildCall11withAbi:
401        LibFFI.abi * symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion *
402             'f conversion * 'g conversion * 'h conversion * 'i conversion * 'j conversion * 'k conversion) *
403                'l conversion -> 'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i * 'j * 'k -> 'l
404    val buildCall11:
405        symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion *
406             'f conversion * 'g conversion * 'h conversion * 'i conversion * 'j conversion * 'k conversion) *
407             'l conversion -> 'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i * 'j * 'k  -> 'l
408    val buildCall12withAbi:
409        LibFFI.abi * symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion *
410             'f conversion * 'g conversion * 'h conversion * 'i conversion * 'j conversion * 'k conversion *
411             'l conversion) * 'm conversion ->
412                'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i * 'j * 'k * 'l -> 'm
413    val buildCall12:
414        symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion *
415             'f conversion * 'g conversion * 'h conversion * 'i conversion * 'j conversion * 'k conversion *
416             'l conversion) * 'm conversion ->
417             'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i * 'j * 'k * 'l -> 'm
418    val buildCall13withAbi:
419        LibFFI.abi * symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion *
420             'f conversion * 'g conversion * 'h conversion * 'i conversion * 'j conversion * 'k conversion *
421             'l conversion * 'm conversion) *
422            'n conversion -> 'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i * 'j * 'k * 'l * 'm -> 'n
423    val buildCall13:
424        symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion *
425             'f conversion * 'g conversion * 'h conversion * 'i conversion * 'j conversion * 'k conversion *
426             'l conversion * 'm conversion) *
427            'n conversion -> 'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i * 'j * 'k * 'l * 'm -> 'n
428    val buildCall14withAbi:
429        LibFFI.abi * symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion *
430             'f conversion * 'g conversion * 'h conversion * 'i conversion * 'j conversion * 'k conversion *
431             'l conversion * 'm conversion * 'n conversion) *
432            'o conversion -> 'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i * 'j * 'k * 'l * 'm * 'n -> 'o
433    val buildCall14:
434        symbol * ('a conversion * 'b conversion * 'c conversion * 'd conversion * 'e conversion *
435             'f conversion * 'g conversion * 'h conversion * 'i conversion * 'j conversion * 'k conversion *
436             'l conversion * 'm conversion * 'n conversion) *
437            'o conversion -> 'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i * 'j * 'k * 'l * 'm * 'n -> 'o
438end
439structure Foreign: FOREIGN
440</pre>
441
442<p></p>
443<ul class="nav">
444	<li><a href="Basis.html">Previous</a></li>
445	<li><a href="Basis.html">Up</a></li>
446	<li><a href="PolyMLStructure.html">Next</a></li>
447</ul>
448</body>
449</html>
450
451