[MLton-commit] r6680

Wesley Terpstra wesley at mlton.org
Wed Jul 30 19:24:35 PDT 2008


Added {internal,external} attributes to _address, _symbol, _import, _export.
These control the scope of the symbol with respect to the linker.

_export and _symbol alloc count as exporting. 
_import, _address, and _symbol without alloc count as importing.

For both imported and exported symbols, the default attribute is external.

External export means that when compiled into a library, these symbols will
be available. However, within the scope of compiling MLton, these symbols
are still used as INTERNAL because they are within the same text segment and
the compiler can optimize to reach them. In headers, these symbols are
marked as MLLIB_EXPORTED. The definitions of these symbols are marked as
EXPORTED to ensure they are public symbols.

Internally exported symbols will not be available to users of the library,
but are available to code being linked into the library. For example, if the
user _exports "foo" internal, he can use "foo" in his linked-in C code, but
this symbol will not be available to users of the resulting library. In the
emitted header file, these symbols are marked as MLLIB_INTERNAL. Both the
definition and use of these symbols are INTERNAL to keep the symbol private
and also to inform the compiler about the potential to optimize.

Externally imported symbols are more costly to access. Particularly for
shared libraries, it requires performing a symbol table lookup. External is
the default because it is always works, even if slower. It is necessary to
use external import if the symbol is located in another text segment. The
most common example of this is a symbol imported from a shared library.

Internally imported symbols must be linked directly with the ML code. Good
examples of this include the entirity of the MLton runtime which is linked
directly with the generated code. If a user is importing his own symbols
which are linked together with the ML code, _import internal is appropriate.
By making the entire runtime internal, no ML implementation details are
exposed in the resulting shared library.

This patch propogates all the internal/external information to the C codegen.
Because the bytecode codegen uses the same C declarations, it works too.

The amd64 & x86 codegens currently implicitly treat all _imports as
internal.  Wrapper functions should be emitted to proxy external calls. This
has not been a problem so far, because on these architectures the linker
fixes up all symbols in executables. Therefore, wrappers (one implemented)
will only be needed when compiling to a shared library.



----------------------------------------------------------------------

U   mlton/trunk/basis-library/primitive/basis-ffi.sml
U   mlton/trunk/basis-library/primitive/prim-mlton.sml
U   mlton/trunk/basis-library/primitive/prim-real.sml
U   mlton/trunk/mlton/ast/ast-core.fun
U   mlton/trunk/mlton/ast/ast-core.sig
U   mlton/trunk/mlton/atoms/c-function.fun
U   mlton/trunk/mlton/atoms/c-function.sig
U   mlton/trunk/mlton/atoms/ffi.fun
U   mlton/trunk/mlton/atoms/ffi.sig
U   mlton/trunk/mlton/atoms/prim.fun
U   mlton/trunk/mlton/atoms/prim.sig
U   mlton/trunk/mlton/backend/implement-profiling.fun
U   mlton/trunk/mlton/backend/limit-check.fun
U   mlton/trunk/mlton/backend/rep-type.fun
U   mlton/trunk/mlton/backend/ssa-to-rssa.fun
U   mlton/trunk/mlton/codegen/c-codegen/c-codegen.fun
U   mlton/trunk/mlton/elaborate/elaborate-core.fun
U   mlton/trunk/mlton/elaborate/scope.fun
U   mlton/trunk/mlton/front-end/ml.grm
U   mlton/trunk/mlton/main/compile.fun
U   mlton/trunk/runtime/basis-ffi.h
U   mlton/trunk/runtime/export.h
U   mlton/trunk/runtime/gen/basis-ffi.def
U   mlton/trunk/runtime/gen/basis-ffi.h
U   mlton/trunk/runtime/gen/basis-ffi.sml
U   mlton/trunk/runtime/gen/gen-basis-ffi.sml

----------------------------------------------------------------------

Modified: mlton/trunk/basis-library/primitive/basis-ffi.sml
===================================================================
--- mlton/trunk/basis-library/primitive/basis-ffi.sml	2008-07-31 00:31:08 UTC (rev 6679)
+++ mlton/trunk/basis-library/primitive/basis-ffi.sml	2008-07-31 02:24:16 UTC (rev 6680)
@@ -5,41 +5,41 @@
 struct
 structure CommandLine = 
 struct
-val (argcGet, argcSet) = _symbol "CommandLine_argc": (unit -> (C_Int.t)) * ((C_Int.t) -> unit);
-val (argvGet, argvSet) = _symbol "CommandLine_argv": (unit -> (C_StringArray.t)) * ((C_StringArray.t) -> unit);
-val (commandNameGet, commandNameSet) = _symbol "CommandLine_commandName": (unit -> (C_String.t)) * ((C_String.t) -> unit);
+val (argcGet, argcSet) = _symbol "CommandLine_argc" internal : (unit -> (C_Int.t)) * ((C_Int.t) -> unit);
+val (argvGet, argvSet) = _symbol "CommandLine_argv" internal : (unit -> (C_StringArray.t)) * ((C_StringArray.t) -> unit);
+val (commandNameGet, commandNameSet) = _symbol "CommandLine_commandName" internal : (unit -> (C_String.t)) * ((C_String.t) -> unit);
 end
 structure Cygwin = 
 struct
-val toFullWindowsPath = _import "Cygwin_toFullWindowsPath" : NullString8.t -> C_String.t;
+val toFullWindowsPath = _import "Cygwin_toFullWindowsPath" internal : NullString8.t -> C_String.t;
 end
 structure Date = 
 struct
-val gmTime = _import "Date_gmTime" : (C_Time.t) ref -> (C_Int.t) C_Errno.t;
-val localOffset = _import "Date_localOffset" : unit -> C_Double.t;
-val localTime = _import "Date_localTime" : (C_Time.t) ref -> (C_Int.t) C_Errno.t;
-val mkTime = _import "Date_mkTime" : unit -> (C_Time.t) C_Errno.t;
-val strfTime = _import "Date_strfTime" : (Char8.t) array * C_Size.t * NullString8.t -> C_Size.t;
+val gmTime = _import "Date_gmTime" internal : (C_Time.t) ref -> (C_Int.t) C_Errno.t;
+val localOffset = _import "Date_localOffset" internal : unit -> C_Double.t;
+val localTime = _import "Date_localTime" internal : (C_Time.t) ref -> (C_Int.t) C_Errno.t;
+val mkTime = _import "Date_mkTime" internal : unit -> (C_Time.t) C_Errno.t;
+val strfTime = _import "Date_strfTime" internal : (Char8.t) array * C_Size.t * NullString8.t -> C_Size.t;
 structure Tm = 
 struct
-val getHour = _import "Date_Tm_getHour" : unit -> C_Int.t;
-val getIsDst = _import "Date_Tm_getIsDst" : unit -> C_Int.t;
-val getMDay = _import "Date_Tm_getMDay" : unit -> C_Int.t;
-val getMin = _import "Date_Tm_getMin" : unit -> C_Int.t;
-val getMon = _import "Date_Tm_getMon" : unit -> C_Int.t;
-val getSec = _import "Date_Tm_getSec" : unit -> C_Int.t;
-val getWDay = _import "Date_Tm_getWDay" : unit -> C_Int.t;
-val getYDay = _import "Date_Tm_getYDay" : unit -> C_Int.t;
-val getYear = _import "Date_Tm_getYear" : unit -> C_Int.t;
-val setHour = _import "Date_Tm_setHour" : C_Int.t -> unit;
-val setIsDst = _import "Date_Tm_setIsDst" : C_Int.t -> unit;
-val setMDay = _import "Date_Tm_setMDay" : C_Int.t -> unit;
-val setMin = _import "Date_Tm_setMin" : C_Int.t -> unit;
-val setMon = _import "Date_Tm_setMon" : C_Int.t -> unit;
-val setSec = _import "Date_Tm_setSec" : C_Int.t -> unit;
-val setWDay = _import "Date_Tm_setWDay" : C_Int.t -> unit;
-val setYDay = _import "Date_Tm_setYDay" : C_Int.t -> unit;
-val setYear = _import "Date_Tm_setYear" : C_Int.t -> unit;
+val getHour = _import "Date_Tm_getHour" internal : unit -> C_Int.t;
+val getIsDst = _import "Date_Tm_getIsDst" internal : unit -> C_Int.t;
+val getMDay = _import "Date_Tm_getMDay" internal : unit -> C_Int.t;
+val getMin = _import "Date_Tm_getMin" internal : unit -> C_Int.t;
+val getMon = _import "Date_Tm_getMon" internal : unit -> C_Int.t;
+val getSec = _import "Date_Tm_getSec" internal : unit -> C_Int.t;
+val getWDay = _import "Date_Tm_getWDay" internal : unit -> C_Int.t;
+val getYDay = _import "Date_Tm_getYDay" internal : unit -> C_Int.t;
+val getYear = _import "Date_Tm_getYear" internal : unit -> C_Int.t;
+val setHour = _import "Date_Tm_setHour" internal : C_Int.t -> unit;
+val setIsDst = _import "Date_Tm_setIsDst" internal : C_Int.t -> unit;
+val setMDay = _import "Date_Tm_setMDay" internal : C_Int.t -> unit;
+val setMin = _import "Date_Tm_setMin" internal : C_Int.t -> unit;
+val setMon = _import "Date_Tm_setMon" internal : C_Int.t -> unit;
+val setSec = _import "Date_Tm_setSec" internal : C_Int.t -> unit;
+val setWDay = _import "Date_Tm_setWDay" internal : C_Int.t -> unit;
+val setYDay = _import "Date_Tm_setYDay" internal : C_Int.t -> unit;
+val setYear = _import "Date_Tm_setYear" internal : C_Int.t -> unit;
 end
 end
 structure IEEEReal = 
@@ -52,7 +52,7 @@
 val FP_SUBNORMAL = _const "IEEEReal_FloatClass_FP_SUBNORMAL" : C_Int.t;
 val FP_ZERO = _const "IEEEReal_FloatClass_FP_ZERO" : C_Int.t;
 end
-val getRoundingMode = _import "IEEEReal_getRoundingMode" : unit -> C_Int.t;
+val getRoundingMode = _import "IEEEReal_getRoundingMode" internal : unit -> C_Int.t;
 structure RoundingMode = 
 struct
 val FE_DOWNWARD = _const "IEEEReal_RoundingMode_FE_DOWNWARD" : C_Int.t;
@@ -61,27 +61,27 @@
 val FE_TOWARDZERO = _const "IEEEReal_RoundingMode_FE_TOWARDZERO" : C_Int.t;
 val FE_UPWARD = _const "IEEEReal_RoundingMode_FE_UPWARD" : C_Int.t;
 end
-val setRoundingMode = _import "IEEEReal_setRoundingMode" : C_Int.t -> unit;
+val setRoundingMode = _import "IEEEReal_setRoundingMode" internal : C_Int.t -> unit;
 end
 structure MinGW = 
 struct
-val getTempPath = _import "MinGW_getTempPath" : C_Size.t * (Char8.t) array -> C_Size.t;
+val getTempPath = _import "MinGW_getTempPath" internal : C_Size.t * (Char8.t) array -> C_Size.t;
 end
 structure MLton = 
 struct
-val bug = _import "MLton_bug" : NullString8.t -> unit;
+val bug = _import "MLton_bug" internal : NullString8.t -> unit;
 structure Itimer = 
 struct
 val PROF = _const "MLton_Itimer_PROF" : C_Int.t;
 val REAL = _const "MLton_Itimer_REAL" : C_Int.t;
-val set = _import "MLton_Itimer_set" : C_Int.t * C_Time.t * C_SUSeconds.t * C_Time.t * C_SUSeconds.t -> (C_Int.t) C_Errno.t;
+val set = _import "MLton_Itimer_set" internal : C_Int.t * C_Time.t * C_SUSeconds.t * C_Time.t * C_SUSeconds.t -> (C_Int.t) C_Errno.t;
 val VIRTUAL = _const "MLton_Itimer_VIRTUAL" : C_Int.t;
 end
 structure Process = 
 struct
-val cwait = _import "MLton_Process_cwait" : C_PId.t * (C_Status.t) ref -> (C_PId.t) C_Errno.t;
-val spawne = _import "MLton_Process_spawne" : NullString8.t * String8.t * (C_Pointer.t) array * (C_Size.t) vector * String8.t * (C_Pointer.t) array * (C_Size.t) vector -> (C_PId.t) C_Errno.t;
-val spawnp = _import "MLton_Process_spawnp" : NullString8.t * String8.t * (C_Pointer.t) array * (C_Size.t) vector -> (C_PId.t) C_Errno.t;
+val cwait = _import "MLton_Process_cwait" internal : C_PId.t * (C_Status.t) ref -> (C_PId.t) C_Errno.t;
+val spawne = _import "MLton_Process_spawne" internal : NullString8.t * String8.t * (C_Pointer.t) array * (C_Size.t) vector * String8.t * (C_Pointer.t) array * (C_Size.t) vector -> (C_PId.t) C_Errno.t;
+val spawnp = _import "MLton_Process_spawnp" internal : NullString8.t * String8.t * (C_Pointer.t) array * (C_Size.t) vector -> (C_PId.t) C_Errno.t;
 end
 structure Rlimit = 
 struct
@@ -90,36 +90,36 @@
 val CPU = _const "MLton_Rlimit_CPU" : C_Int.t;
 val DATA = _const "MLton_Rlimit_DATA" : C_Int.t;
 val FSIZE = _const "MLton_Rlimit_FSIZE" : C_Int.t;
-val get = _import "MLton_Rlimit_get" : C_Int.t -> (C_Int.t) C_Errno.t;
-val getHard = _import "MLton_Rlimit_getHard" : unit -> C_RLim.t;
-val getSoft = _import "MLton_Rlimit_getSoft" : unit -> C_RLim.t;
+val get = _import "MLton_Rlimit_get" internal : C_Int.t -> (C_Int.t) C_Errno.t;
+val getHard = _import "MLton_Rlimit_getHard" internal : unit -> C_RLim.t;
+val getSoft = _import "MLton_Rlimit_getSoft" internal : unit -> C_RLim.t;
 val INFINITY = _const "MLton_Rlimit_INFINITY" : C_RLim.t;
 val MEMLOCK = _const "MLton_Rlimit_MEMLOCK" : C_Int.t;
 val NOFILE = _const "MLton_Rlimit_NOFILE" : C_Int.t;
 val NPROC = _const "MLton_Rlimit_NPROC" : C_Int.t;
 val RSS = _const "MLton_Rlimit_RSS" : C_Int.t;
-val set = _import "MLton_Rlimit_set" : C_Int.t * C_RLim.t * C_RLim.t -> (C_Int.t) C_Errno.t;
+val set = _import "MLton_Rlimit_set" internal : C_Int.t * C_RLim.t * C_RLim.t -> (C_Int.t) C_Errno.t;
 val STACK = _const "MLton_Rlimit_STACK" : C_Int.t;
 end
 structure Rusage = 
 struct
-val children_stime_sec = _import "MLton_Rusage_children_stime_sec" : unit -> C_Time.t;
-val children_stime_usec = _import "MLton_Rusage_children_stime_usec" : unit -> C_SUSeconds.t;
-val children_utime_sec = _import "MLton_Rusage_children_utime_sec" : unit -> C_Time.t;
-val children_utime_usec = _import "MLton_Rusage_children_utime_usec" : unit -> C_SUSeconds.t;
-val gc_stime_sec = _import "MLton_Rusage_gc_stime_sec" : unit -> C_Time.t;
-val gc_stime_usec = _import "MLton_Rusage_gc_stime_usec" : unit -> C_SUSeconds.t;
-val gc_utime_sec = _import "MLton_Rusage_gc_utime_sec" : unit -> C_Time.t;
-val gc_utime_usec = _import "MLton_Rusage_gc_utime_usec" : unit -> C_SUSeconds.t;
-val getrusage = _import "MLton_Rusage_getrusage" : unit -> unit;
-val self_stime_sec = _import "MLton_Rusage_self_stime_sec" : unit -> C_Time.t;
-val self_stime_usec = _import "MLton_Rusage_self_stime_usec" : unit -> C_SUSeconds.t;
-val self_utime_sec = _import "MLton_Rusage_self_utime_sec" : unit -> C_Time.t;
-val self_utime_usec = _import "MLton_Rusage_self_utime_usec" : unit -> C_SUSeconds.t;
+val children_stime_sec = _import "MLton_Rusage_children_stime_sec" internal : unit -> C_Time.t;
+val children_stime_usec = _import "MLton_Rusage_children_stime_usec" internal : unit -> C_SUSeconds.t;
+val children_utime_sec = _import "MLton_Rusage_children_utime_sec" internal : unit -> C_Time.t;
+val children_utime_usec = _import "MLton_Rusage_children_utime_usec" internal : unit -> C_SUSeconds.t;
+val gc_stime_sec = _import "MLton_Rusage_gc_stime_sec" internal : unit -> C_Time.t;
+val gc_stime_usec = _import "MLton_Rusage_gc_stime_usec" internal : unit -> C_SUSeconds.t;
+val gc_utime_sec = _import "MLton_Rusage_gc_utime_sec" internal : unit -> C_Time.t;
+val gc_utime_usec = _import "MLton_Rusage_gc_utime_usec" internal : unit -> C_SUSeconds.t;
+val getrusage = _import "MLton_Rusage_getrusage" internal : unit -> unit;
+val self_stime_sec = _import "MLton_Rusage_self_stime_sec" internal : unit -> C_Time.t;
+val self_stime_usec = _import "MLton_Rusage_self_stime_usec" internal : unit -> C_SUSeconds.t;
+val self_utime_sec = _import "MLton_Rusage_self_utime_sec" internal : unit -> C_Time.t;
+val self_utime_usec = _import "MLton_Rusage_self_utime_usec" internal : unit -> C_SUSeconds.t;
 end
 structure Syslog = 
 struct
-val closelog = _import "MLton_Syslog_closelog" : unit -> unit;
+val closelog = _import "MLton_Syslog_closelog" internal : unit -> unit;
 structure Facility = 
 struct
 val LOG_AUTH = _const "MLton_Syslog_Facility_LOG_AUTH" : C_Int.t;
@@ -150,7 +150,7 @@
 val LOG_PERROR = _const "MLton_Syslog_Logopt_LOG_PERROR" : C_Int.t;
 val LOG_PID = _const "MLton_Syslog_Logopt_LOG_PID" : C_Int.t;
 end
-val openlog = _import "MLton_Syslog_openlog" : NullString8.t * C_Int.t * C_Int.t -> unit;
+val openlog = _import "MLton_Syslog_openlog" internal : NullString8.t * C_Int.t * C_Int.t -> unit;
 structure Severity = 
 struct
 val LOG_ALERT = _const "MLton_Syslog_Severity_LOG_ALERT" : C_Int.t;
@@ -162,57 +162,57 @@
 val LOG_NOTICE = _const "MLton_Syslog_Severity_LOG_NOTICE" : C_Int.t;
 val LOG_WARNING = _const "MLton_Syslog_Severity_LOG_WARNING" : C_Int.t;
 end
-val syslog = _import "MLton_Syslog_syslog" : C_Int.t * NullString8.t -> unit;
+val syslog = _import "MLton_Syslog_syslog" internal : C_Int.t * NullString8.t -> unit;
 end
 end
 structure Net = 
 struct
-val htonl = _import "Net_htonl" : Word32.t -> Word32.t;
-val htons = _import "Net_htons" : Word16.t -> Word16.t;
-val ntohl = _import "Net_ntohl" : Word32.t -> Word32.t;
-val ntohs = _import "Net_ntohs" : Word16.t -> Word16.t;
+val htonl = _import "Net_htonl" internal : Word32.t -> Word32.t;
+val htons = _import "Net_htons" internal : Word16.t -> Word16.t;
+val ntohl = _import "Net_ntohl" internal : Word32.t -> Word32.t;
+val ntohs = _import "Net_ntohs" internal : Word16.t -> Word16.t;
 end
 structure NetHostDB = 
 struct
-val getByAddress = _import "NetHostDB_getByAddress" : (Word8.t) vector * C_Socklen.t -> C_Int.t;
-val getByName = _import "NetHostDB_getByName" : NullString8.t -> C_Int.t;
-val getEntryAddrsN = _import "NetHostDB_getEntryAddrsN" : C_Int.t * (Word8.t) array -> unit;
-val getEntryAddrsNum = _import "NetHostDB_getEntryAddrsNum" : unit -> C_Int.t;
-val getEntryAddrType = _import "NetHostDB_getEntryAddrType" : unit -> C_Int.t;
-val getEntryAliasesN = _import "NetHostDB_getEntryAliasesN" : C_Int.t -> C_String.t;
-val getEntryAliasesNum = _import "NetHostDB_getEntryAliasesNum" : unit -> C_Int.t;
-val getEntryLength = _import "NetHostDB_getEntryLength" : unit -> C_Int.t;
-val getEntryName = _import "NetHostDB_getEntryName" : unit -> C_String.t;
-val getHostName = _import "NetHostDB_getHostName" : (Char8.t) array * C_Size.t -> (C_Int.t) C_Errno.t;
+val getByAddress = _import "NetHostDB_getByAddress" internal : (Word8.t) vector * C_Socklen.t -> C_Int.t;
+val getByName = _import "NetHostDB_getByName" internal : NullString8.t -> C_Int.t;
+val getEntryAddrsN = _import "NetHostDB_getEntryAddrsN" internal : C_Int.t * (Word8.t) array -> unit;
+val getEntryAddrsNum = _import "NetHostDB_getEntryAddrsNum" internal : unit -> C_Int.t;
+val getEntryAddrType = _import "NetHostDB_getEntryAddrType" internal : unit -> C_Int.t;
+val getEntryAliasesN = _import "NetHostDB_getEntryAliasesN" internal : C_Int.t -> C_String.t;
+val getEntryAliasesNum = _import "NetHostDB_getEntryAliasesNum" internal : unit -> C_Int.t;
+val getEntryLength = _import "NetHostDB_getEntryLength" internal : unit -> C_Int.t;
+val getEntryName = _import "NetHostDB_getEntryName" internal : unit -> C_String.t;
+val getHostName = _import "NetHostDB_getHostName" internal : (Char8.t) array * C_Size.t -> (C_Int.t) C_Errno.t;
 val INADDR_ANY = _const "NetHostDB_INADDR_ANY" : C_Int.t;
 val inAddrSize = _const "NetHostDB_inAddrSize" : C_Size.t;
 end
 structure NetProtDB = 
 struct
-val getByName = _import "NetProtDB_getByName" : NullString8.t -> C_Int.t;
-val getByNumber = _import "NetProtDB_getByNumber" : C_Int.t -> C_Int.t;
-val getEntryAliasesN = _import "NetProtDB_getEntryAliasesN" : C_Int.t -> C_String.t;
-val getEntryAliasesNum = _import "NetProtDB_getEntryAliasesNum" : unit -> C_Int.t;
-val getEntryName = _import "NetProtDB_getEntryName" : unit -> C_String.t;
-val getEntryProto = _import "NetProtDB_getEntryProto" : unit -> C_Int.t;
+val getByName = _import "NetProtDB_getByName" internal : NullString8.t -> C_Int.t;
+val getByNumber = _import "NetProtDB_getByNumber" internal : C_Int.t -> C_Int.t;
+val getEntryAliasesN = _import "NetProtDB_getEntryAliasesN" internal : C_Int.t -> C_String.t;
+val getEntryAliasesNum = _import "NetProtDB_getEntryAliasesNum" internal : unit -> C_Int.t;
+val getEntryName = _import "NetProtDB_getEntryName" internal : unit -> C_String.t;
+val getEntryProto = _import "NetProtDB_getEntryProto" internal : unit -> C_Int.t;
 end
 structure NetServDB = 
 struct
-val getByName = _import "NetServDB_getByName" : NullString8.t * NullString8.t -> C_Int.t;
-val getByNameNull = _import "NetServDB_getByNameNull" : NullString8.t -> C_Int.t;
-val getByPort = _import "NetServDB_getByPort" : C_Int.t * NullString8.t -> C_Int.t;
-val getByPortNull = _import "NetServDB_getByPortNull" : C_Int.t -> C_Int.t;
-val getEntryAliasesN = _import "NetServDB_getEntryAliasesN" : C_Int.t -> C_String.t;
-val getEntryAliasesNum = _import "NetServDB_getEntryAliasesNum" : unit -> C_Int.t;
-val getEntryName = _import "NetServDB_getEntryName" : unit -> C_String.t;
-val getEntryPort = _import "NetServDB_getEntryPort" : unit -> C_Int.t;
-val getEntryProto = _import "NetServDB_getEntryProto" : unit -> C_String.t;
+val getByName = _import "NetServDB_getByName" internal : NullString8.t * NullString8.t -> C_Int.t;
+val getByNameNull = _import "NetServDB_getByNameNull" internal : NullString8.t -> C_Int.t;
+val getByPort = _import "NetServDB_getByPort" internal : C_Int.t * NullString8.t -> C_Int.t;
+val getByPortNull = _import "NetServDB_getByPortNull" internal : C_Int.t -> C_Int.t;
+val getEntryAliasesN = _import "NetServDB_getEntryAliasesN" internal : C_Int.t -> C_String.t;
+val getEntryAliasesNum = _import "NetServDB_getEntryAliasesNum" internal : unit -> C_Int.t;
+val getEntryName = _import "NetServDB_getEntryName" internal : unit -> C_String.t;
+val getEntryPort = _import "NetServDB_getEntryPort" internal : unit -> C_Int.t;
+val getEntryProto = _import "NetServDB_getEntryProto" internal : unit -> C_String.t;
 end
 structure OS = 
 struct
 structure IO = 
 struct
-val poll = _import "OS_IO_poll" : (C_Fd.t) vector * (C_Short.t) vector * C_NFds.t * C_Int.t * (C_Short.t) array -> (C_Int.t) C_Errno.t;
+val poll = _import "OS_IO_poll" internal : (C_Fd.t) vector * (C_Short.t) vector * C_NFds.t * C_Int.t * (C_Short.t) array -> (C_Int.t) C_Errno.t;
 val POLLIN = _const "OS_IO_POLLIN" : C_Short.t;
 val POLLOUT = _const "OS_IO_POLLOUT" : C_Short.t;
 val POLLPRI = _const "OS_IO_POLLPRI" : C_Short.t;
@@ -222,7 +222,7 @@
 struct
 structure Error = 
 struct
-val clearErrno = _import "Posix_Error_clearErrno" : unit -> unit;
+val clearErrno = _import "Posix_Error_clearErrno" internal : unit -> unit;
 val E2BIG = _const "Posix_Error_E2BIG" : C_Int.t;
 val EACCES = _const "Posix_Error_EACCES" : C_Int.t;
 val EADDRINUSE = _const "Posix_Error_EADDRINUSE" : C_Int.t;
@@ -302,8 +302,8 @@
 val ETXTBSY = _const "Posix_Error_ETXTBSY" : C_Int.t;
 val EWOULDBLOCK = _const "Posix_Error_EWOULDBLOCK" : C_Int.t;
 val EXDEV = _const "Posix_Error_EXDEV" : C_Int.t;
-val getErrno = _import "Posix_Error_getErrno" : unit -> C_Int.t;
-val strError = _import "Posix_Error_strError" : C_Int.t -> C_String.t;
+val getErrno = _import "Posix_Error_getErrno" internal : unit -> C_Int.t;
+val strError = _import "Posix_Error_strError" internal : C_Int.t -> C_String.t;
 end
 structure FileSys = 
 struct
@@ -314,26 +314,26 @@
 val W_OK = _const "Posix_FileSys_A_W_OK" : C_Int.t;
 val X_OK = _const "Posix_FileSys_A_X_OK" : C_Int.t;
 end
-val access = _import "Posix_FileSys_access" : NullString8.t * C_Int.t -> (C_Int.t) C_Errno.t;
-val chdir = _import "Posix_FileSys_chdir" : NullString8.t -> (C_Int.t) C_Errno.t;
-val chmod = _import "Posix_FileSys_chmod" : NullString8.t * C_Mode.t -> (C_Int.t) C_Errno.t;
-val chown = _import "Posix_FileSys_chown" : NullString8.t * C_UId.t * C_GId.t -> (C_Int.t) C_Errno.t;
+val access = _import "Posix_FileSys_access" internal : NullString8.t * C_Int.t -> (C_Int.t) C_Errno.t;
+val chdir = _import "Posix_FileSys_chdir" internal : NullString8.t -> (C_Int.t) C_Errno.t;
+val chmod = _import "Posix_FileSys_chmod" internal : NullString8.t * C_Mode.t -> (C_Int.t) C_Errno.t;
+val chown = _import "Posix_FileSys_chown" internal : NullString8.t * C_UId.t * C_GId.t -> (C_Int.t) C_Errno.t;
 structure Dirstream = 
 struct
-val closeDir = _import "Posix_FileSys_Dirstream_closeDir" : C_DirP.t -> (C_Int.t) C_Errno.t;
-val openDir = _import "Posix_FileSys_Dirstream_openDir" : NullString8.t -> (C_DirP.t) C_Errno.t;
-val readDir = _import "Posix_FileSys_Dirstream_readDir" : C_DirP.t -> (C_String.t) C_Errno.t;
-val rewindDir = _import "Posix_FileSys_Dirstream_rewindDir" : C_DirP.t -> unit;
+val closeDir = _import "Posix_FileSys_Dirstream_closeDir" internal : C_DirP.t -> (C_Int.t) C_Errno.t;
+val openDir = _import "Posix_FileSys_Dirstream_openDir" internal : NullString8.t -> (C_DirP.t) C_Errno.t;
+val readDir = _import "Posix_FileSys_Dirstream_readDir" internal : C_DirP.t -> (C_String.t) C_Errno.t;
+val rewindDir = _import "Posix_FileSys_Dirstream_rewindDir" internal : C_DirP.t -> unit;
 end
-val fchdir = _import "Posix_FileSys_fchdir" : C_Fd.t -> (C_Int.t) C_Errno.t;
-val fchmod = _import "Posix_FileSys_fchmod" : C_Fd.t * C_Mode.t -> (C_Int.t) C_Errno.t;
-val fchown = _import "Posix_FileSys_fchown" : C_Fd.t * C_UId.t * C_GId.t -> (C_Int.t) C_Errno.t;
-val fpathconf = _import "Posix_FileSys_fpathconf" : C_Fd.t * C_Int.t -> (C_Long.t) C_Errno.t;
-val ftruncate = _import "Posix_FileSys_ftruncate" : C_Fd.t * C_Off.t -> (C_Int.t) C_Errno.t;
-val getcwd = _import "Posix_FileSys_getcwd" : (Char8.t) array * C_Size.t -> (C_String.t) C_Errno.t;
-val link = _import "Posix_FileSys_link" : NullString8.t * NullString8.t -> (C_Int.t) C_Errno.t;
-val mkdir = _import "Posix_FileSys_mkdir" : NullString8.t * C_Mode.t -> (C_Int.t) C_Errno.t;
-val mkfifo = _import "Posix_FileSys_mkfifo" : NullString8.t * C_Mode.t -> (C_Int.t) C_Errno.t;
+val fchdir = _import "Posix_FileSys_fchdir" internal : C_Fd.t -> (C_Int.t) C_Errno.t;
+val fchmod = _import "Posix_FileSys_fchmod" internal : C_Fd.t * C_Mode.t -> (C_Int.t) C_Errno.t;
+val fchown = _import "Posix_FileSys_fchown" internal : C_Fd.t * C_UId.t * C_GId.t -> (C_Int.t) C_Errno.t;
+val fpathconf = _import "Posix_FileSys_fpathconf" internal : C_Fd.t * C_Int.t -> (C_Long.t) C_Errno.t;
+val ftruncate = _import "Posix_FileSys_ftruncate" internal : C_Fd.t * C_Off.t -> (C_Int.t) C_Errno.t;
+val getcwd = _import "Posix_FileSys_getcwd" internal : (Char8.t) array * C_Size.t -> (C_String.t) C_Errno.t;
+val link = _import "Posix_FileSys_link" internal : NullString8.t * NullString8.t -> (C_Int.t) C_Errno.t;
+val mkdir = _import "Posix_FileSys_mkdir" internal : NullString8.t * C_Mode.t -> (C_Int.t) C_Errno.t;
+val mkfifo = _import "Posix_FileSys_mkfifo" internal : NullString8.t * C_Mode.t -> (C_Int.t) C_Errno.t;
 structure O = 
 struct
 val APPEND = _const "Posix_FileSys_O_APPEND" : C_Int.t;
@@ -351,9 +351,9 @@
 val TRUNC = _const "Posix_FileSys_O_TRUNC" : C_Int.t;
 val WRONLY = _const "Posix_FileSys_O_WRONLY" : C_Int.t;
 end
-val open2 = _import "Posix_FileSys_open2" : NullString8.t * C_Int.t -> (C_Fd.t) C_Errno.t;
-val open3 = _import "Posix_FileSys_open3" : NullString8.t * C_Int.t * C_Mode.t -> (C_Fd.t) C_Errno.t;
-val pathconf = _import "Posix_FileSys_pathconf" : NullString8.t * C_Int.t -> (C_Long.t) C_Errno.t;
+val open2 = _import "Posix_FileSys_open2" internal : NullString8.t * C_Int.t -> (C_Fd.t) C_Errno.t;
+val open3 = _import "Posix_FileSys_open3" internal : NullString8.t * C_Int.t * C_Mode.t -> (C_Fd.t) C_Errno.t;
+val pathconf = _import "Posix_FileSys_pathconf" internal : NullString8.t * C_Int.t -> (C_Long.t) C_Errno.t;
 structure PC = 
 struct
 val ALLOC_SIZE_MIN = _const "Posix_FileSys_PC_ALLOC_SIZE_MIN" : C_Int.t;
@@ -377,9 +377,9 @@
 val TWO_SYMLINKS = _const "Posix_FileSys_PC_TWO_SYMLINKS" : C_Int.t;
 val VDISABLE = _const "Posix_FileSys_PC_VDISABLE" : C_Int.t;
 end
-val readlink = _import "Posix_FileSys_readlink" : NullString8.t * (Char8.t) array * C_Size.t -> (C_SSize.t) C_Errno.t;
-val rename = _import "Posix_FileSys_rename" : NullString8.t * NullString8.t -> (C_Int.t) C_Errno.t;
-val rmdir = _import "Posix_FileSys_rmdir" : NullString8.t -> (C_Int.t) C_Errno.t;
+val readlink = _import "Posix_FileSys_readlink" internal : NullString8.t * (Char8.t) array * C_Size.t -> (C_SSize.t) C_Errno.t;
+val rename = _import "Posix_FileSys_rename" internal : NullString8.t * NullString8.t -> (C_Int.t) C_Errno.t;
+val rmdir = _import "Posix_FileSys_rmdir" internal : NullString8.t -> (C_Int.t) C_Errno.t;
 structure S = 
 struct
 val IFBLK = _const "Posix_FileSys_S_IFBLK" : C_Mode.t;
@@ -408,47 +408,47 @@
 end
 structure ST = 
 struct
-val isBlk = _import "Posix_FileSys_ST_isBlk" : C_Mode.t -> C_Int.t;
-val isChr = _import "Posix_FileSys_ST_isChr" : C_Mode.t -> C_Int.t;
-val isDir = _import "Posix_FileSys_ST_isDir" : C_Mode.t -> C_Int.t;
-val isFIFO = _import "Posix_FileSys_ST_isFIFO" : C_Mode.t -> C_Int.t;
-val isLink = _import "Posix_FileSys_ST_isLink" : C_Mode.t -> C_Int.t;
-val isReg = _import "Posix_FileSys_ST_isReg" : C_Mode.t -> C_Int.t;
-val isSock = _import "Posix_FileSys_ST_isSock" : C_Mode.t -> C_Int.t;
+val isBlk = _import "Posix_FileSys_ST_isBlk" internal : C_Mode.t -> C_Int.t;
+val isChr = _import "Posix_FileSys_ST_isChr" internal : C_Mode.t -> C_Int.t;
+val isDir = _import "Posix_FileSys_ST_isDir" internal : C_Mode.t -> C_Int.t;
+val isFIFO = _import "Posix_FileSys_ST_isFIFO" internal : C_Mode.t -> C_Int.t;
+val isLink = _import "Posix_FileSys_ST_isLink" internal : C_Mode.t -> C_Int.t;
+val isReg = _import "Posix_FileSys_ST_isReg" internal : C_Mode.t -> C_Int.t;
+val isSock = _import "Posix_FileSys_ST_isSock" internal : C_Mode.t -> C_Int.t;
 end
 structure Stat = 
 struct
-val fstat = _import "Posix_FileSys_Stat_fstat" : C_Fd.t -> (C_Int.t) C_Errno.t;
-val getATime = _import "Posix_FileSys_Stat_getATime" : unit -> C_Time.t;
-val getCTime = _import "Posix_FileSys_Stat_getCTime" : unit -> C_Time.t;
-val getDev = _import "Posix_FileSys_Stat_getDev" : unit -> C_Dev.t;
-val getGId = _import "Posix_FileSys_Stat_getGId" : unit -> C_GId.t;
-val getINo = _import "Posix_FileSys_Stat_getINo" : unit -> C_INo.t;
-val getMode = _import "Posix_FileSys_Stat_getMode" : unit -> C_Mode.t;
-val getMTime = _import "Posix_FileSys_Stat_getMTime" : unit -> C_Time.t;
-val getNLink = _import "Posix_FileSys_Stat_getNLink" : unit -> C_NLink.t;
-val getRDev = _import "Posix_FileSys_Stat_getRDev" : unit -> C_Dev.t;
-val getSize = _import "Posix_FileSys_Stat_getSize" : unit -> C_Off.t;
-val getUId = _import "Posix_FileSys_Stat_getUId" : unit -> C_UId.t;
-val lstat = _import "Posix_FileSys_Stat_lstat" : NullString8.t -> (C_Int.t) C_Errno.t;
-val stat = _import "Posix_FileSys_Stat_stat" : NullString8.t -> (C_Int.t) C_Errno.t;
+val fstat = _import "Posix_FileSys_Stat_fstat" internal : C_Fd.t -> (C_Int.t) C_Errno.t;
+val getATime = _import "Posix_FileSys_Stat_getATime" internal : unit -> C_Time.t;
+val getCTime = _import "Posix_FileSys_Stat_getCTime" internal : unit -> C_Time.t;
+val getDev = _import "Posix_FileSys_Stat_getDev" internal : unit -> C_Dev.t;
+val getGId = _import "Posix_FileSys_Stat_getGId" internal : unit -> C_GId.t;
+val getINo = _import "Posix_FileSys_Stat_getINo" internal : unit -> C_INo.t;
+val getMode = _import "Posix_FileSys_Stat_getMode" internal : unit -> C_Mode.t;
+val getMTime = _import "Posix_FileSys_Stat_getMTime" internal : unit -> C_Time.t;
+val getNLink = _import "Posix_FileSys_Stat_getNLink" internal : unit -> C_NLink.t;
+val getRDev = _import "Posix_FileSys_Stat_getRDev" internal : unit -> C_Dev.t;
+val getSize = _import "Posix_FileSys_Stat_getSize" internal : unit -> C_Off.t;
+val getUId = _import "Posix_FileSys_Stat_getUId" internal : unit -> C_UId.t;
+val lstat = _import "Posix_FileSys_Stat_lstat" internal : NullString8.t -> (C_Int.t) C_Errno.t;
+val stat = _import "Posix_FileSys_Stat_stat" internal : NullString8.t -> (C_Int.t) C_Errno.t;
 end
-val symlink = _import "Posix_FileSys_symlink" : NullString8.t * NullString8.t -> (C_Int.t) C_Errno.t;
-val truncate = _import "Posix_FileSys_truncate" : NullString8.t * C_Off.t -> (C_Int.t) C_Errno.t;
-val umask = _import "Posix_FileSys_umask" : C_Mode.t -> C_Mode.t;
-val unlink = _import "Posix_FileSys_unlink" : NullString8.t -> (C_Int.t) C_Errno.t;
+val symlink = _import "Posix_FileSys_symlink" internal : NullString8.t * NullString8.t -> (C_Int.t) C_Errno.t;
+val truncate = _import "Posix_FileSys_truncate" internal : NullString8.t * C_Off.t -> (C_Int.t) C_Errno.t;
+val umask = _import "Posix_FileSys_umask" internal : C_Mode.t -> C_Mode.t;
+val unlink = _import "Posix_FileSys_unlink" internal : NullString8.t -> (C_Int.t) C_Errno.t;
 structure Utimbuf = 
 struct
-val setAcTime = _import "Posix_FileSys_Utimbuf_setAcTime" : C_Time.t -> unit;
-val setModTime = _import "Posix_FileSys_Utimbuf_setModTime" : C_Time.t -> unit;
-val utime = _import "Posix_FileSys_Utimbuf_utime" : NullString8.t -> (C_Int.t) C_Errno.t;
+val setAcTime = _import "Posix_FileSys_Utimbuf_setAcTime" internal : C_Time.t -> unit;
+val setModTime = _import "Posix_FileSys_Utimbuf_setModTime" internal : C_Time.t -> unit;
+val utime = _import "Posix_FileSys_Utimbuf_utime" internal : NullString8.t -> (C_Int.t) C_Errno.t;
 end
 end
 structure IO = 
 struct
-val close = _import "Posix_IO_close" : C_Fd.t -> (C_Int.t) C_Errno.t;
-val dup = _import "Posix_IO_dup" : C_Fd.t -> (C_Fd.t) C_Errno.t;
-val dup2 = _import "Posix_IO_dup2" : C_Fd.t * C_Fd.t -> (C_Fd.t) C_Errno.t;
+val close = _import "Posix_IO_close" internal : C_Fd.t -> (C_Int.t) C_Errno.t;
+val dup = _import "Posix_IO_dup" internal : C_Fd.t -> (C_Fd.t) C_Errno.t;
+val dup2 = _import "Posix_IO_dup2" internal : C_Fd.t * C_Fd.t -> (C_Fd.t) C_Errno.t;
 val F_DUPFD = _const "Posix_IO_F_DUPFD" : C_Int.t;
 val F_GETFD = _const "Posix_IO_F_GETFD" : C_Int.t;
 val F_GETFL = _const "Posix_IO_F_GETFL" : C_Int.t;
@@ -456,8 +456,8 @@
 val F_SETFD = _const "Posix_IO_F_SETFD" : C_Int.t;
 val F_SETFL = _const "Posix_IO_F_SETFL" : C_Int.t;
 val F_SETOWN = _const "Posix_IO_F_SETOWN" : C_Int.t;
-val fcntl2 = _import "Posix_IO_fcntl2" : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t;
-val fcntl3 = _import "Posix_IO_fcntl3" : C_Fd.t * C_Int.t * C_Int.t -> (C_Int.t) C_Errno.t;
+val fcntl2 = _import "Posix_IO_fcntl2" internal : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t;
+val fcntl3 = _import "Posix_IO_fcntl3" internal : C_Fd.t * C_Int.t * C_Int.t -> (C_Int.t) C_Errno.t;
 structure FD = 
 struct
 val CLOEXEC = _const "Posix_IO_FD_CLOEXEC" : C_Int.t;
@@ -470,53 +470,53 @@
 val F_SETLKW = _const "Posix_IO_FLock_F_SETLKW" : C_Int.t;
 val F_UNLCK = _const "Posix_IO_FLock_F_UNLCK" : C_Short.t;
 val F_WRLCK = _const "Posix_IO_FLock_F_WRLCK" : C_Short.t;
-val fcntl = _import "Posix_IO_FLock_fcntl" : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t;
-val getLen = _import "Posix_IO_FLock_getLen" : unit -> C_Off.t;
-val getPId = _import "Posix_IO_FLock_getPId" : unit -> C_PId.t;
-val getStart = _import "Posix_IO_FLock_getStart" : unit -> C_Off.t;
-val getType = _import "Posix_IO_FLock_getType" : unit -> C_Short.t;
-val getWhence = _import "Posix_IO_FLock_getWhence" : unit -> C_Short.t;
+val fcntl = _import "Posix_IO_FLock_fcntl" internal : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t;
+val getLen = _import "Posix_IO_FLock_getLen" internal : unit -> C_Off.t;
+val getPId = _import "Posix_IO_FLock_getPId" internal : unit -> C_PId.t;
+val getStart = _import "Posix_IO_FLock_getStart" internal : unit -> C_Off.t;
+val getType = _import "Posix_IO_FLock_getType" internal : unit -> C_Short.t;
+val getWhence = _import "Posix_IO_FLock_getWhence" internal : unit -> C_Short.t;
 val SEEK_CUR = _const "Posix_IO_FLock_SEEK_CUR" : C_Short.t;
 val SEEK_END = _const "Posix_IO_FLock_SEEK_END" : C_Short.t;
 val SEEK_SET = _const "Posix_IO_FLock_SEEK_SET" : C_Short.t;
-val setLen = _import "Posix_IO_FLock_setLen" : C_Off.t -> unit;
-val setPId = _import "Posix_IO_FLock_setPId" : C_PId.t -> unit;
-val setStart = _import "Posix_IO_FLock_setStart" : C_Off.t -> unit;
-val setType = _import "Posix_IO_FLock_setType" : C_Short.t -> unit;
-val setWhence = _import "Posix_IO_FLock_setWhence" : C_Short.t -> unit;
+val setLen = _import "Posix_IO_FLock_setLen" internal : C_Off.t -> unit;
+val setPId = _import "Posix_IO_FLock_setPId" internal : C_PId.t -> unit;
+val setStart = _import "Posix_IO_FLock_setStart" internal : C_Off.t -> unit;
+val setType = _import "Posix_IO_FLock_setType" internal : C_Short.t -> unit;
+val setWhence = _import "Posix_IO_FLock_setWhence" internal : C_Short.t -> unit;
 end
-val fsync = _import "Posix_IO_fsync" : C_Fd.t -> (C_Int.t) C_Errno.t;
-val lseek = _import "Posix_IO_lseek" : C_Fd.t * C_Off.t * C_Int.t -> (C_Off.t) C_Errno.t;
+val fsync = _import "Posix_IO_fsync" internal : C_Fd.t -> (C_Int.t) C_Errno.t;
+val lseek = _import "Posix_IO_lseek" internal : C_Fd.t * C_Off.t * C_Int.t -> (C_Off.t) C_Errno.t;
 val O_ACCMODE = _const "Posix_IO_O_ACCMODE" : C_Int.t;
-val pipe = _import "Posix_IO_pipe" : (C_Fd.t) array -> (C_Int.t) C_Errno.t;
-val readChar8 = _import "Posix_IO_readChar8" : C_Fd.t * (Char8.t) array * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
-val readWord8 = _import "Posix_IO_readWord8" : C_Fd.t * (Word8.t) array * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
+val pipe = _import "Posix_IO_pipe" internal : (C_Fd.t) array -> (C_Int.t) C_Errno.t;
+val readChar8 = _import "Posix_IO_readChar8" internal : C_Fd.t * (Char8.t) array * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
+val readWord8 = _import "Posix_IO_readWord8" internal : C_Fd.t * (Word8.t) array * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
 val SEEK_CUR = _const "Posix_IO_SEEK_CUR" : C_Int.t;
 val SEEK_END = _const "Posix_IO_SEEK_END" : C_Int.t;
 val SEEK_SET = _const "Posix_IO_SEEK_SET" : C_Int.t;
-val setbin = _import "Posix_IO_setbin" : C_Fd.t -> unit;
-val settext = _import "Posix_IO_settext" : C_Fd.t -> unit;
-val writeChar8Arr = _import "Posix_IO_writeChar8Arr" : C_Fd.t * (Char8.t) array * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
-val writeChar8Vec = _import "Posix_IO_writeChar8Vec" : C_Fd.t * (Char8.t) vector * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
-val writeWord8Arr = _import "Posix_IO_writeWord8Arr" : C_Fd.t * (Word8.t) array * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
-val writeWord8Vec = _import "Posix_IO_writeWord8Vec" : C_Fd.t * (Word8.t) vector * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
+val setbin = _import "Posix_IO_setbin" internal : C_Fd.t -> unit;
+val settext = _import "Posix_IO_settext" internal : C_Fd.t -> unit;
+val writeChar8Arr = _import "Posix_IO_writeChar8Arr" internal : C_Fd.t * (Char8.t) array * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
+val writeChar8Vec = _import "Posix_IO_writeChar8Vec" internal : C_Fd.t * (Char8.t) vector * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
+val writeWord8Arr = _import "Posix_IO_writeWord8Arr" internal : C_Fd.t * (Word8.t) array * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
+val writeWord8Vec = _import "Posix_IO_writeWord8Vec" internal : C_Fd.t * (Word8.t) vector * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
 end
 structure ProcEnv = 
 struct
-val ctermid = _import "Posix_ProcEnv_ctermid" : unit -> C_String.t;
-val (environGet, environSet) = _symbol "Posix_ProcEnv_environ": (unit -> (C_StringArray.t)) * ((C_StringArray.t) -> unit);
-val getegid = _import "Posix_ProcEnv_getegid" : unit -> C_GId.t;
-val getenv = _import "Posix_ProcEnv_getenv" : NullString8.t -> C_String.t;
-val geteuid = _import "Posix_ProcEnv_geteuid" : unit -> C_UId.t;
-val getgid = _import "Posix_ProcEnv_getgid" : unit -> C_GId.t;
-val getgroups = _import "Posix_ProcEnv_getgroups" : C_Int.t * (C_GId.t) array -> (C_Int.t) C_Errno.t;
-val getgroupsN = _import "Posix_ProcEnv_getgroupsN" : unit -> C_Int.t;
-val getlogin = _import "Posix_ProcEnv_getlogin" : unit -> (C_String.t) C_Errno.t;
-val getpgrp = _import "Posix_ProcEnv_getpgrp" : unit -> C_PId.t;
-val getpid = _import "Posix_ProcEnv_getpid" : unit -> C_PId.t;
-val getppid = _import "Posix_ProcEnv_getppid" : unit -> C_PId.t;
-val getuid = _import "Posix_ProcEnv_getuid" : unit -> C_UId.t;
-val isatty = _import "Posix_ProcEnv_isatty" : C_Fd.t -> C_Int.t;
+val ctermid = _import "Posix_ProcEnv_ctermid" internal : unit -> C_String.t;
+val (environGet, environSet) = _symbol "Posix_ProcEnv_environ" internal : (unit -> (C_StringArray.t)) * ((C_StringArray.t) -> unit);
+val getegid = _import "Posix_ProcEnv_getegid" internal : unit -> C_GId.t;
+val getenv = _import "Posix_ProcEnv_getenv" internal : NullString8.t -> C_String.t;
+val geteuid = _import "Posix_ProcEnv_geteuid" internal : unit -> C_UId.t;
+val getgid = _import "Posix_ProcEnv_getgid" internal : unit -> C_GId.t;
+val getgroups = _import "Posix_ProcEnv_getgroups" internal : C_Int.t * (C_GId.t) array -> (C_Int.t) C_Errno.t;
+val getgroupsN = _import "Posix_ProcEnv_getgroupsN" internal : unit -> C_Int.t;
+val getlogin = _import "Posix_ProcEnv_getlogin" internal : unit -> (C_String.t) C_Errno.t;
+val getpgrp = _import "Posix_ProcEnv_getpgrp" internal : unit -> C_PId.t;
+val getpid = _import "Posix_ProcEnv_getpid" internal : unit -> C_PId.t;
+val getppid = _import "Posix_ProcEnv_getppid" internal : unit -> C_PId.t;
+val getuid = _import "Posix_ProcEnv_getuid" internal : unit -> C_UId.t;
+val isatty = _import "Posix_ProcEnv_isatty" internal : C_Fd.t -> C_Int.t;
 val SC_2_C_BIND = _const "Posix_ProcEnv_SC_2_C_BIND" : C_Int.t;
 val SC_2_C_DEV = _const "Posix_ProcEnv_SC_2_C_DEV" : C_Int.t;
 val SC_2_CHAR_TERM = _const "Posix_ProcEnv_SC_2_CHAR_TERM" : C_Int.t;
@@ -640,95 +640,95 @@
 val SC_XOPEN_STREAMS = _const "Posix_ProcEnv_SC_XOPEN_STREAMS" : C_Int.t;
 val SC_XOPEN_UNIX = _const "Posix_ProcEnv_SC_XOPEN_UNIX" : C_Int.t;
 val SC_XOPEN_VERSION = _const "Posix_ProcEnv_SC_XOPEN_VERSION" : C_Int.t;
-val setenv = _import "Posix_ProcEnv_setenv" : NullString8.t * NullString8.t -> (C_Int.t) C_Errno.t;
-val setgid = _import "Posix_ProcEnv_setgid" : C_GId.t -> (C_Int.t) C_Errno.t;
-val setgroups = _import "Posix_ProcEnv_setgroups" : C_Int.t * (C_GId.t) vector -> (C_Int.t) C_Errno.t;
-val setpgid = _import "Posix_ProcEnv_setpgid" : C_PId.t * C_PId.t -> (C_Int.t) C_Errno.t;
-val setsid = _import "Posix_ProcEnv_setsid" : unit -> (C_PId.t) C_Errno.t;
-val setuid = _import "Posix_ProcEnv_setuid" : C_UId.t -> (C_Int.t) C_Errno.t;
-val sysconf = _import "Posix_ProcEnv_sysconf" : C_Int.t -> (C_Long.t) C_Errno.t;
-val times = _import "Posix_ProcEnv_times" : unit -> (C_Clock.t) C_Errno.t;
+val setenv = _import "Posix_ProcEnv_setenv" internal : NullString8.t * NullString8.t -> (C_Int.t) C_Errno.t;
+val setgid = _import "Posix_ProcEnv_setgid" internal : C_GId.t -> (C_Int.t) C_Errno.t;
+val setgroups = _import "Posix_ProcEnv_setgroups" internal : C_Int.t * (C_GId.t) vector -> (C_Int.t) C_Errno.t;
+val setpgid = _import "Posix_ProcEnv_setpgid" internal : C_PId.t * C_PId.t -> (C_Int.t) C_Errno.t;
+val setsid = _import "Posix_ProcEnv_setsid" internal : unit -> (C_PId.t) C_Errno.t;
+val setuid = _import "Posix_ProcEnv_setuid" internal : C_UId.t -> (C_Int.t) C_Errno.t;
+val sysconf = _import "Posix_ProcEnv_sysconf" internal : C_Int.t -> (C_Long.t) C_Errno.t;
+val times = _import "Posix_ProcEnv_times" internal : unit -> (C_Clock.t) C_Errno.t;
 structure Times = 
 struct
-val getCSTime = _import "Posix_ProcEnv_Times_getCSTime" : unit -> C_Clock.t;
-val getCUTime = _import "Posix_ProcEnv_Times_getCUTime" : unit -> C_Clock.t;
-val getSTime = _import "Posix_ProcEnv_Times_getSTime" : unit -> C_Clock.t;
-val getUTime = _import "Posix_ProcEnv_Times_getUTime" : unit -> C_Clock.t;
+val getCSTime = _import "Posix_ProcEnv_Times_getCSTime" internal : unit -> C_Clock.t;
+val getCUTime = _import "Posix_ProcEnv_Times_getCUTime" internal : unit -> C_Clock.t;
+val getSTime = _import "Posix_ProcEnv_Times_getSTime" internal : unit -> C_Clock.t;
+val getUTime = _import "Posix_ProcEnv_Times_getUTime" internal : unit -> C_Clock.t;
 end
-val ttyname = _import "Posix_ProcEnv_ttyname" : C_Fd.t -> (C_String.t) C_Errno.t;
-val uname = _import "Posix_ProcEnv_uname" : unit -> (C_Int.t) C_Errno.t;
+val ttyname = _import "Posix_ProcEnv_ttyname" internal : C_Fd.t -> (C_String.t) C_Errno.t;
+val uname = _import "Posix_ProcEnv_uname" internal : unit -> (C_Int.t) C_Errno.t;
 structure Uname = 
 struct
-val getMachine = _import "Posix_ProcEnv_Uname_getMachine" : unit -> C_String.t;
-val getNodeName = _import "Posix_ProcEnv_Uname_getNodeName" : unit -> C_String.t;
-val getRelease = _import "Posix_ProcEnv_Uname_getRelease" : unit -> C_String.t;
-val getSysName = _import "Posix_ProcEnv_Uname_getSysName" : unit -> C_String.t;
-val getVersion = _import "Posix_ProcEnv_Uname_getVersion" : unit -> C_String.t;
+val getMachine = _import "Posix_ProcEnv_Uname_getMachine" internal : unit -> C_String.t;
+val getNodeName = _import "Posix_ProcEnv_Uname_getNodeName" internal : unit -> C_String.t;
+val getRelease = _import "Posix_ProcEnv_Uname_getRelease" internal : unit -> C_String.t;
+val getSysName = _import "Posix_ProcEnv_Uname_getSysName" internal : unit -> C_String.t;
+val getVersion = _import "Posix_ProcEnv_Uname_getVersion" internal : unit -> C_String.t;
 end
 end
 structure Process = 
 struct
-val alarm = _import "Posix_Process_alarm" : C_UInt.t -> C_UInt.t;
-val exece = _import "Posix_Process_exece" : NullString8.t * String8.t * (C_Pointer.t) array * (C_Size.t) vector * String8.t * (C_Pointer.t) array * (C_Size.t) vector -> (C_Int.t) C_Errno.t;
-val execp = _import "Posix_Process_execp" : NullString8.t * String8.t * (C_Pointer.t) array * (C_Size.t) vector -> (C_Int.t) C_Errno.t;
-val exit = _import "Posix_Process_exit" : C_Status.t -> unit;
-val exitStatus = _import "Posix_Process_exitStatus" : C_Status.t -> C_Int.t;
-val fork = _import "Posix_Process_fork" : unit -> (C_PId.t) C_Errno.t;
-val ifExited = _import "Posix_Process_ifExited" : C_Status.t -> C_Int.t;
-val ifSignaled = _import "Posix_Process_ifSignaled" : C_Status.t -> C_Int.t;
-val ifStopped = _import "Posix_Process_ifStopped" : C_Status.t -> C_Int.t;
-val kill = _import "Posix_Process_kill" : C_PId.t * C_Signal.t -> (C_Int.t) C_Errno.t;
-val nanosleep = _import "Posix_Process_nanosleep" : (C_Time.t) ref * (C_Long.t) ref -> (C_Int.t) C_Errno.t;
-val pause = _import "Posix_Process_pause" : unit -> (C_Int.t) C_Errno.t;
-val sleep = _import "Posix_Process_sleep" : C_UInt.t -> C_UInt.t;
-val stopSig = _import "Posix_Process_stopSig" : C_Status.t -> C_Signal.t;
-val system = _import "Posix_Process_system" : NullString8.t -> (C_Status.t) C_Errno.t;
-val termSig = _import "Posix_Process_termSig" : C_Status.t -> C_Signal.t;
+val alarm = _import "Posix_Process_alarm" internal : C_UInt.t -> C_UInt.t;
+val exece = _import "Posix_Process_exece" internal : NullString8.t * String8.t * (C_Pointer.t) array * (C_Size.t) vector * String8.t * (C_Pointer.t) array * (C_Size.t) vector -> (C_Int.t) C_Errno.t;
+val execp = _import "Posix_Process_execp" internal : NullString8.t * String8.t * (C_Pointer.t) array * (C_Size.t) vector -> (C_Int.t) C_Errno.t;
+val exit = _import "Posix_Process_exit" internal : C_Status.t -> unit;
+val exitStatus = _import "Posix_Process_exitStatus" internal : C_Status.t -> C_Int.t;
+val fork = _import "Posix_Process_fork" internal : unit -> (C_PId.t) C_Errno.t;
+val ifExited = _import "Posix_Process_ifExited" internal : C_Status.t -> C_Int.t;
+val ifSignaled = _import "Posix_Process_ifSignaled" internal : C_Status.t -> C_Int.t;
+val ifStopped = _import "Posix_Process_ifStopped" internal : C_Status.t -> C_Int.t;
+val kill = _import "Posix_Process_kill" internal : C_PId.t * C_Signal.t -> (C_Int.t) C_Errno.t;
+val nanosleep = _import "Posix_Process_nanosleep" internal : (C_Time.t) ref * (C_Long.t) ref -> (C_Int.t) C_Errno.t;
+val pause = _import "Posix_Process_pause" internal : unit -> (C_Int.t) C_Errno.t;
+val sleep = _import "Posix_Process_sleep" internal : C_UInt.t -> C_UInt.t;
+val stopSig = _import "Posix_Process_stopSig" internal : C_Status.t -> C_Signal.t;
+val system = _import "Posix_Process_system" internal : NullString8.t -> (C_Status.t) C_Errno.t;
+val termSig = _import "Posix_Process_termSig" internal : C_Status.t -> C_Signal.t;
 structure W = 
 struct
 val NOHANG = _const "Posix_Process_W_NOHANG" : C_Int.t;
 val UNTRACED = _const "Posix_Process_W_UNTRACED" : C_Int.t;
 end
-val waitpid = _import "Posix_Process_waitpid" : C_PId.t * (C_Int.t) ref * C_Int.t -> (C_PId.t) C_Errno.t;
+val waitpid = _import "Posix_Process_waitpid" internal : C_PId.t * (C_Int.t) ref * C_Int.t -> (C_PId.t) C_Errno.t;
 end
 structure Signal = 
 struct
-val default = _import "Posix_Signal_default" : C_Signal.t -> (C_Int.t) C_Errno.t;
-val handlee = _import "Posix_Signal_handlee" : C_Signal.t -> (C_Int.t) C_Errno.t;
-val handleGC = _import "Posix_Signal_handleGC" : unit -> unit;
-val ignore = _import "Posix_Signal_ignore" : C_Signal.t -> (C_Int.t) C_Errno.t;
-val isDefault = _import "Posix_Signal_isDefault" : C_Signal.t * (C_Int.t) ref -> (C_Int.t) C_Errno.t;
-val isIgnore = _import "Posix_Signal_isIgnore" : C_Signal.t * (C_Int.t) ref -> (C_Int.t) C_Errno.t;
-val isPending = _import "Posix_Signal_isPending" : C_Signal.t -> C_Int.t;
-val isPendingGC = _import "Posix_Signal_isPendingGC" : unit -> C_Int.t;
+val default = _import "Posix_Signal_default" internal : C_Signal.t -> (C_Int.t) C_Errno.t;
+val handlee = _import "Posix_Signal_handlee" internal : C_Signal.t -> (C_Int.t) C_Errno.t;
+val handleGC = _import "Posix_Signal_handleGC" internal : unit -> unit;
+val ignore = _import "Posix_Signal_ignore" internal : C_Signal.t -> (C_Int.t) C_Errno.t;
+val isDefault = _import "Posix_Signal_isDefault" internal : C_Signal.t * (C_Int.t) ref -> (C_Int.t) C_Errno.t;
+val isIgnore = _import "Posix_Signal_isIgnore" internal : C_Signal.t * (C_Int.t) ref -> (C_Int.t) C_Errno.t;
+val isPending = _import "Posix_Signal_isPending" internal : C_Signal.t -> C_Int.t;
+val isPendingGC = _import "Posix_Signal_isPendingGC" internal : unit -> C_Int.t;
 val NSIG = _const "Posix_Signal_NSIG" : C_Int.t;
-val resetPending = _import "Posix_Signal_resetPending" : unit -> unit;
+val resetPending = _import "Posix_Signal_resetPending" internal : unit -> unit;
 val SIG_BLOCK = _const "Posix_Signal_SIG_BLOCK" : C_Int.t;
 val SIG_SETMASK = _const "Posix_Signal_SIG_SETMASK" : C_Int.t;
 val SIG_UNBLOCK = _const "Posix_Signal_SIG_UNBLOCK" : C_Int.t;
 val SIGABRT = _const "Posix_Signal_SIGABRT" : C_Signal.t;
-val sigaddset = _import "Posix_Signal_sigaddset" : C_Signal.t -> (C_Int.t) C_Errno.t;
+val sigaddset = _import "Posix_Signal_sigaddset" internal : C_Signal.t -> (C_Int.t) C_Errno.t;
 val SIGALRM = _const "Posix_Signal_SIGALRM" : C_Signal.t;
 val SIGBUS = _const "Posix_Signal_SIGBUS" : C_Signal.t;
 val SIGCHLD = _const "Posix_Signal_SIGCHLD" : C_Signal.t;
 val SIGCONT = _const "Posix_Signal_SIGCONT" : C_Signal.t;
-val sigdelset = _import "Posix_Signal_sigdelset" : C_Signal.t -> (C_Int.t) C_Errno.t;
-val sigemptyset = _import "Posix_Signal_sigemptyset" : unit -> (C_Int.t) C_Errno.t;
-val sigfillset = _import "Posix_Signal_sigfillset" : unit -> (C_Int.t) C_Errno.t;
+val sigdelset = _import "Posix_Signal_sigdelset" internal : C_Signal.t -> (C_Int.t) C_Errno.t;
+val sigemptyset = _import "Posix_Signal_sigemptyset" internal : unit -> (C_Int.t) C_Errno.t;
+val sigfillset = _import "Posix_Signal_sigfillset" internal : unit -> (C_Int.t) C_Errno.t;
 val SIGFPE = _const "Posix_Signal_SIGFPE" : C_Signal.t;
 val SIGHUP = _const "Posix_Signal_SIGHUP" : C_Signal.t;
 val SIGILL = _const "Posix_Signal_SIGILL" : C_Signal.t;
 val SIGINT = _const "Posix_Signal_SIGINT" : C_Signal.t;
-val sigismember = _import "Posix_Signal_sigismember" : C_Signal.t -> (C_Int.t) C_Errno.t;
+val sigismember = _import "Posix_Signal_sigismember" internal : C_Signal.t -> (C_Int.t) C_Errno.t;
 val SIGKILL = _const "Posix_Signal_SIGKILL" : C_Signal.t;
 val SIGPIPE = _const "Posix_Signal_SIGPIPE" : C_Signal.t;
 val SIGPOLL = _const "Posix_Signal_SIGPOLL" : C_Signal.t;
-val sigprocmask = _import "Posix_Signal_sigprocmask" : C_Int.t -> (C_Int.t) C_Errno.t;
+val sigprocmask = _import "Posix_Signal_sigprocmask" internal : C_Int.t -> (C_Int.t) C_Errno.t;
 val SIGPROF = _const "Posix_Signal_SIGPROF" : C_Signal.t;
 val SIGQUIT = _const "Posix_Signal_SIGQUIT" : C_Signal.t;
 val SIGSEGV = _const "Posix_Signal_SIGSEGV" : C_Signal.t;
 val SIGSTOP = _const "Posix_Signal_SIGSTOP" : C_Signal.t;
-val sigsuspend = _import "Posix_Signal_sigsuspend" : unit -> unit;
+val sigsuspend = _import "Posix_Signal_sigsuspend" internal : unit -> unit;
 val SIGSYS = _const "Posix_Signal_SIGSYS" : C_Signal.t;
 val SIGTERM = _const "Posix_Signal_SIGTERM" : C_Signal.t;
 val SIGTRAP = _const "Posix_Signal_SIGTRAP" : C_Signal.t;
@@ -744,23 +744,23 @@
 end
 structure SysDB = 
 struct
-val getgrgid = _import "Posix_SysDB_getgrgid" : C_GId.t -> (C_Int.t) C_Errno.t;
-val getgrnam = _import "Posix_SysDB_getgrnam" : NullString8.t -> (C_Int.t) C_Errno.t;
-val getpwnam = _import "Posix_SysDB_getpwnam" : NullString8.t -> (C_Int.t) C_Errno.t;
-val getpwuid = _import "Posix_SysDB_getpwuid" : C_GId.t -> (C_Int.t) C_Errno.t;
+val getgrgid = _import "Posix_SysDB_getgrgid" internal : C_GId.t -> (C_Int.t) C_Errno.t;
+val getgrnam = _import "Posix_SysDB_getgrnam" internal : NullString8.t -> (C_Int.t) C_Errno.t;
+val getpwnam = _import "Posix_SysDB_getpwnam" internal : NullString8.t -> (C_Int.t) C_Errno.t;
+val getpwuid = _import "Posix_SysDB_getpwuid" internal : C_GId.t -> (C_Int.t) C_Errno.t;
 structure Group = 
 struct
-val getGId = _import "Posix_SysDB_Group_getGId" : unit -> C_GId.t;
-val getMem = _import "Posix_SysDB_Group_getMem" : unit -> C_StringArray.t;
-val getName = _import "Posix_SysDB_Group_getName" : unit -> C_String.t;
+val getGId = _import "Posix_SysDB_Group_getGId" internal : unit -> C_GId.t;
+val getMem = _import "Posix_SysDB_Group_getMem" internal : unit -> C_StringArray.t;
+val getName = _import "Posix_SysDB_Group_getName" internal : unit -> C_String.t;
 end
 structure Passwd = 
 struct
-val getDir = _import "Posix_SysDB_Passwd_getDir" : unit -> C_String.t;
-val getGId = _import "Posix_SysDB_Passwd_getGId" : unit -> C_GId.t;
-val getName = _import "Posix_SysDB_Passwd_getName" : unit -> C_String.t;
-val getShell = _import "Posix_SysDB_Passwd_getShell" : unit -> C_String.t;
-val getUId = _import "Posix_SysDB_Passwd_getUId" : unit -> C_UId.t;
+val getDir = _import "Posix_SysDB_Passwd_getDir" internal : unit -> C_String.t;
+val getGId = _import "Posix_SysDB_Passwd_getGId" internal : unit -> C_GId.t;
+val getName = _import "Posix_SysDB_Passwd_getName" internal : unit -> C_String.t;
+val getShell = _import "Posix_SysDB_Passwd_getShell" internal : unit -> C_String.t;
+val getUId = _import "Posix_SysDB_Passwd_getUId" internal : unit -> C_UId.t;
 end
 end
 structure TTY = 
@@ -855,14 +855,14 @@
 end
 structure TC = 
 struct
-val drain = _import "Posix_TTY_TC_drain" : C_Fd.t -> (C_Int.t) C_Errno.t;
-val flow = _import "Posix_TTY_TC_flow" : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t;
-val flush = _import "Posix_TTY_TC_flush" : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t;
-val getattr = _import "Posix_TTY_TC_getattr" : C_Fd.t -> (C_Int.t) C_Errno.t;
-val getpgrp = _import "Posix_TTY_TC_getpgrp" : C_Fd.t -> (C_PId.t) C_Errno.t;
-val sendbreak = _import "Posix_TTY_TC_sendbreak" : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t;
-val setattr = _import "Posix_TTY_TC_setattr" : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t;
-val setpgrp = _import "Posix_TTY_TC_setpgrp" : C_Fd.t * C_PId.t -> (C_Int.t) C_Errno.t;
+val drain = _import "Posix_TTY_TC_drain" internal : C_Fd.t -> (C_Int.t) C_Errno.t;
+val flow = _import "Posix_TTY_TC_flow" internal : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t;
+val flush = _import "Posix_TTY_TC_flush" internal : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t;
+val getattr = _import "Posix_TTY_TC_getattr" internal : C_Fd.t -> (C_Int.t) C_Errno.t;
+val getpgrp = _import "Posix_TTY_TC_getpgrp" internal : C_Fd.t -> (C_PId.t) C_Errno.t;
+val sendbreak = _import "Posix_TTY_TC_sendbreak" internal : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t;
+val setattr = _import "Posix_TTY_TC_setattr" internal : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t;
+val setpgrp = _import "Posix_TTY_TC_setpgrp" internal : C_Fd.t * C_PId.t -> (C_Int.t) C_Errno.t;
 val TCIFLUSH = _const "Posix_TTY_TC_TCIFLUSH" : C_Int.t;
 val TCIOFF = _const "Posix_TTY_TC_TCIOFF" : C_Int.t;
 val TCIOFLUSH = _const "Posix_TTY_TC_TCIOFLUSH" : C_Int.t;
@@ -876,20 +876,20 @@
 end
 structure Termios = 
 struct
-val cfGetISpeed = _import "Posix_TTY_Termios_cfGetISpeed" : unit -> C_Speed.t;
-val cfGetOSpeed = _import "Posix_TTY_Termios_cfGetOSpeed" : unit -> C_Speed.t;
-val cfSetISpeed = _import "Posix_TTY_Termios_cfSetISpeed" : C_Speed.t -> (C_Int.t) C_Errno.t;
-val cfSetOSpeed = _import "Posix_TTY_Termios_cfSetOSpeed" : C_Speed.t -> (C_Int.t) C_Errno.t;
-val getCC = _import "Posix_TTY_Termios_getCC" : (C_CC.t) array -> unit;
-val getCFlag = _import "Posix_TTY_Termios_getCFlag" : unit -> C_TCFlag.t;
-val getIFlag = _import "Posix_TTY_Termios_getIFlag" : unit -> C_TCFlag.t;
-val getLFlag = _import "Posix_TTY_Termios_getLFlag" : unit -> C_TCFlag.t;
-val getOFlag = _import "Posix_TTY_Termios_getOFlag" : unit -> C_TCFlag.t;
-val setCC = _import "Posix_TTY_Termios_setCC" : (C_CC.t) array -> unit;
-val setCFlag = _import "Posix_TTY_Termios_setCFlag" : C_TCFlag.t -> unit;
-val setIFlag = _import "Posix_TTY_Termios_setIFlag" : C_TCFlag.t -> unit;
-val setLFlag = _import "Posix_TTY_Termios_setLFlag" : C_TCFlag.t -> unit;
-val setOFlag = _import "Posix_TTY_Termios_setOFlag" : C_TCFlag.t -> unit;
+val cfGetISpeed = _import "Posix_TTY_Termios_cfGetISpeed" internal : unit -> C_Speed.t;
+val cfGetOSpeed = _import "Posix_TTY_Termios_cfGetOSpeed" internal : unit -> C_Speed.t;
+val cfSetISpeed = _import "Posix_TTY_Termios_cfSetISpeed" internal : C_Speed.t -> (C_Int.t) C_Errno.t;
+val cfSetOSpeed = _import "Posix_TTY_Termios_cfSetOSpeed" internal : C_Speed.t -> (C_Int.t) C_Errno.t;
+val getCC = _import "Posix_TTY_Termios_getCC" internal : (C_CC.t) array -> unit;
+val getCFlag = _import "Posix_TTY_Termios_getCFlag" internal : unit -> C_TCFlag.t;
+val getIFlag = _import "Posix_TTY_Termios_getIFlag" internal : unit -> C_TCFlag.t;
+val getLFlag = _import "Posix_TTY_Termios_getLFlag" internal : unit -> C_TCFlag.t;
+val getOFlag = _import "Posix_TTY_Termios_getOFlag" internal : unit -> C_TCFlag.t;
+val setCC = _import "Posix_TTY_Termios_setCC" internal : (C_CC.t) array -> unit;
+val setCFlag = _import "Posix_TTY_Termios_setCFlag" internal : C_TCFlag.t -> unit;
+val setIFlag = _import "Posix_TTY_Termios_setIFlag" internal : C_TCFlag.t -> unit;
+val setLFlag = _import "Posix_TTY_Termios_setLFlag" internal : C_TCFlag.t -> unit;
+val setOFlag = _import "Posix_TTY_Termios_setOFlag" internal : C_TCFlag.t -> unit;
 end
 structure V = 
 struct
@@ -911,126 +911,126 @@
 structure Real32 = 
 struct
 type t = Real32.t
-val abs = _import "Real32_abs" : Real32.t -> Real32.t;
-val add = _import "Real32_add" : Real32.t * Real32.t -> Real32.t;
-val castToWord32 = _import "Real32_castToWord32" : Real32.t -> Word32.t;
-val class = _import "Real32_class" : Real32.t -> C_Int.t;
-val div = _import "Real32_div" : Real32.t * Real32.t -> Real32.t;
-val equal = _import "Real32_equal" : Real32.t * Real32.t -> Bool.t;
-val fetch = _import "Real32_fetch" : (Real32.t) ref -> Real32.t;
-val frexp = _import "Real32_frexp" : Real32.t * (C_Int.t) ref -> Real32.t;
-val gdtoa = _import "Real32_gdtoa" : Real32.t * C_Int.t * C_Int.t * C_Int.t * (C_Int.t) ref -> C_String.t;
-val ldexp = _import "Real32_ldexp" : Real32.t * C_Int.t -> Real32.t;
-val le = _import "Real32_le" : Real32.t * Real32.t -> Bool.t;
-val lt = _import "Real32_lt" : Real32.t * Real32.t -> Bool.t;
+val abs = _import "Real32_abs" internal : Real32.t -> Real32.t;
+val add = _import "Real32_add" internal : Real32.t * Real32.t -> Real32.t;
+val castToWord32 = _import "Real32_castToWord32" internal : Real32.t -> Word32.t;
+val class = _import "Real32_class" internal : Real32.t -> C_Int.t;
+val div = _import "Real32_div" internal : Real32.t * Real32.t -> Real32.t;
+val equal = _import "Real32_equal" internal : Real32.t * Real32.t -> Bool.t;
+val fetch = _import "Real32_fetch" internal : (Real32.t) ref -> Real32.t;
+val frexp = _import "Real32_frexp" internal : Real32.t * (C_Int.t) ref -> Real32.t;
+val gdtoa = _import "Real32_gdtoa" internal : Real32.t * C_Int.t * C_Int.t * C_Int.t * (C_Int.t) ref -> C_String.t;
+val ldexp = _import "Real32_ldexp" internal : Real32.t * C_Int.t -> Real32.t;
+val le = _import "Real32_le" internal : Real32.t * Real32.t -> Bool.t;
+val lt = _import "Real32_lt" internal : Real32.t * Real32.t -> Bool.t;
 structure Math = 
 struct
-val acos = _import "Real32_Math_acos" : Real32.t -> Real32.t;
-val asin = _import "Real32_Math_asin" : Real32.t -> Real32.t;
-val atan = _import "Real32_Math_atan" : Real32.t -> Real32.t;
-val atan2 = _import "Real32_Math_atan2" : Real32.t * Real32.t -> Real32.t;
-val cos = _import "Real32_Math_cos" : Real32.t -> Real32.t;
-val cosh = _import "Real32_Math_cosh" : Real32.t -> Real32.t;
-val (eGet, eSet) = _symbol "Real32_Math_e": (unit -> (Real32.t)) * ((Real32.t) -> unit);
-val exp = _import "Real32_Math_exp" : Real32.t -> Real32.t;
-val ln = _import "Real32_Math_ln" : Real32.t -> Real32.t;
-val log10 = _import "Real32_Math_log10" : Real32.t -> Real32.t;
-val (piGet, piSet) = _symbol "Real32_Math_pi": (unit -> (Real32.t)) * ((Real32.t) -> unit);
-val pow = _import "Real32_Math_pow" : Real32.t * Real32.t -> Real32.t;
-val sin = _import "Real32_Math_sin" : Real32.t -> Real32.t;
-val sinh = _import "Real32_Math_sinh" : Real32.t -> Real32.t;
-val sqrt = _import "Real32_Math_sqrt" : Real32.t -> Real32.t;
-val tan = _import "Real32_Math_tan" : Real32.t -> Real32.t;
-val tanh = _import "Real32_Math_tanh" : Real32.t -> Real32.t;
+val acos = _import "Real32_Math_acos" internal : Real32.t -> Real32.t;
+val asin = _import "Real32_Math_asin" internal : Real32.t -> Real32.t;
+val atan = _import "Real32_Math_atan" internal : Real32.t -> Real32.t;
+val atan2 = _import "Real32_Math_atan2" internal : Real32.t * Real32.t -> Real32.t;
+val cos = _import "Real32_Math_cos" internal : Real32.t -> Real32.t;
+val cosh = _import "Real32_Math_cosh" internal : Real32.t -> Real32.t;
+val (eGet, eSet) = _symbol "Real32_Math_e" internal : (unit -> (Real32.t)) * ((Real32.t) -> unit);
+val exp = _import "Real32_Math_exp" internal : Real32.t -> Real32.t;
+val ln = _import "Real32_Math_ln" internal : Real32.t -> Real32.t;
+val log10 = _import "Real32_Math_log10" internal : Real32.t -> Real32.t;
+val (piGet, piSet) = _symbol "Real32_Math_pi" internal : (unit -> (Real32.t)) * ((Real32.t) -> unit);
+val pow = _import "Real32_Math_pow" internal : Real32.t * Real32.t -> Real32.t;
+val sin = _import "Real32_Math_sin" internal : Real32.t -> Real32.t;
+val sinh = _import "Real32_Math_sinh" internal : Real32.t -> Real32.t;
+val sqrt = _import "Real32_Math_sqrt" internal : Real32.t -> Real32.t;
+val tan = _import "Real32_Math_tan" internal : Real32.t -> Real32.t;
+val tanh = _import "Real32_Math_tanh" internal : Real32.t -> Real32.t;
 end
-val (maxFiniteGet, maxFiniteSet) = _symbol "Real32_maxFinite": (unit -> (Real32.t)) * ((Real32.t) -> unit);
-val (minNormalPosGet, minNormalPosSet) = _symbol "Real32_minNormalPos": (unit -> (Real32.t)) * ((Real32.t) -> unit);
-val (minPosGet, minPosSet) = _symbol "Real32_minPos": (unit -> (Real32.t)) * ((Real32.t) -> unit);
-val modf = _import "Real32_modf" : Real32.t * (Real32.t) ref -> Real32.t;
-val move = _import "Real32_move" : (Real32.t) ref * (Real32.t) ref -> unit;
-val mul = _import "Real32_mul" : Real32.t * Real32.t -> Real32.t;
-val muladd = _import "Real32_muladd" : Real32.t * Real32.t * Real32.t -> Real32.t;
-val mulsub = _import "Real32_mulsub" : Real32.t * Real32.t * Real32.t -> Real32.t;
-val neg = _import "Real32_neg" : Real32.t -> Real32.t;
-val rndToReal32 = _import "Real32_rndToReal32" : Real32.t -> Real32.t;
-val rndToReal64 = _import "Real32_rndToReal64" : Real32.t -> Real64.t;
-val rndToWordS16 = _import "Real32_rndToWordS16" : Real32.t -> Int16.t;
-val rndToWordS32 = _import "Real32_rndToWordS32" : Real32.t -> Int32.t;
-val rndToWordS64 = _import "Real32_rndToWordS64" : Real32.t -> Int64.t;
-val rndToWordS8 = _import "Real32_rndToWordS8" : Real32.t -> Int8.t;
-val rndToWordU16 = _import "Real32_rndToWordU16" : Real32.t -> Word16.t;
-val rndToWordU32 = _import "Real32_rndToWordU32" : Real32.t -> Word32.t;
-val rndToWordU64 = _import "Real32_rndToWordU64" : Real32.t -> Word64.t;
-val rndToWordU8 = _import "Real32_rndToWordU8" : Real32.t -> Word8.t;
-val round = _import "Real32_round" : Real32.t -> Real32.t;
-val signBit = _import "Real32_signBit" : Real32.t -> C_Int.t;
-val store = _import "Real32_store" : (Real32.t) ref * Real32.t -> unit;
-val strto = _import "Real32_strto" : NullString8.t * C_Int.t -> Real32.t;
-val sub = _import "Real32_sub" : Real32.t * Real32.t -> Real32.t;
+val (maxFiniteGet, maxFiniteSet) = _symbol "Real32_maxFinite" internal : (unit -> (Real32.t)) * ((Real32.t) -> unit);
+val (minNormalPosGet, minNormalPosSet) = _symbol "Real32_minNormalPos" internal : (unit -> (Real32.t)) * ((Real32.t) -> unit);
+val (minPosGet, minPosSet) = _symbol "Real32_minPos" internal : (unit -> (Real32.t)) * ((Real32.t) -> unit);
+val modf = _import "Real32_modf" internal : Real32.t * (Real32.t) ref -> Real32.t;
+val move = _import "Real32_move" internal : (Real32.t) ref * (Real32.t) ref -> unit;
+val mul = _import "Real32_mul" internal : Real32.t * Real32.t -> Real32.t;
+val muladd = _import "Real32_muladd" internal : Real32.t * Real32.t * Real32.t -> Real32.t;
+val mulsub = _import "Real32_mulsub" internal : Real32.t * Real32.t * Real32.t -> Real32.t;
+val neg = _import "Real32_neg" internal : Real32.t -> Real32.t;
+val rndToReal32 = _import "Real32_rndToReal32" internal : Real32.t -> Real32.t;
+val rndToReal64 = _import "Real32_rndToReal64" internal : Real32.t -> Real64.t;
+val rndToWordS16 = _import "Real32_rndToWordS16" internal : Real32.t -> Int16.t;
+val rndToWordS32 = _import "Real32_rndToWordS32" internal : Real32.t -> Int32.t;
+val rndToWordS64 = _import "Real32_rndToWordS64" internal : Real32.t -> Int64.t;
+val rndToWordS8 = _import "Real32_rndToWordS8" internal : Real32.t -> Int8.t;
+val rndToWordU16 = _import "Real32_rndToWordU16" internal : Real32.t -> Word16.t;
+val rndToWordU32 = _import "Real32_rndToWordU32" internal : Real32.t -> Word32.t;
+val rndToWordU64 = _import "Real32_rndToWordU64" internal : Real32.t -> Word64.t;
+val rndToWordU8 = _import "Real32_rndToWordU8" internal : Real32.t -> Word8.t;
+val round = _import "Real32_round" internal : Real32.t -> Real32.t;
+val signBit = _import "Real32_signBit" internal : Real32.t -> C_Int.t;
+val store = _import "Real32_store" internal : (Real32.t) ref * Real32.t -> unit;
+val strto = _import "Real32_strto" internal : NullString8.t * C_Int.t -> Real32.t;
+val sub = _import "Real32_sub" internal : Real32.t * Real32.t -> Real32.t;
 end
 structure Real64 = 
 struct
 type t = Real64.t
-val abs = _import "Real64_abs" : Real64.t -> Real64.t;
-val add = _import "Real64_add" : Real64.t * Real64.t -> Real64.t;
-val castToWord64 = _import "Real64_castToWord64" : Real64.t -> Word64.t;
-val class = _import "Real64_class" : Real64.t -> C_Int.t;
-val div = _import "Real64_div" : Real64.t * Real64.t -> Real64.t;
-val equal = _import "Real64_equal" : Real64.t * Real64.t -> Bool.t;
-val fetch = _import "Real64_fetch" : (Real64.t) ref -> Real64.t;
-val frexp = _import "Real64_frexp" : Real64.t * (C_Int.t) ref -> Real64.t;
-val gdtoa = _import "Real64_gdtoa" : Real64.t * C_Int.t * C_Int.t * C_Int.t * (C_Int.t) ref -> C_String.t;
-val ldexp = _import "Real64_ldexp" : Real64.t * C_Int.t -> Real64.t;
-val le = _import "Real64_le" : Real64.t * Real64.t -> Bool.t;
-val lt = _import "Real64_lt" : Real64.t * Real64.t -> Bool.t;
+val abs = _import "Real64_abs" internal : Real64.t -> Real64.t;
+val add = _import "Real64_add" internal : Real64.t * Real64.t -> Real64.t;
+val castToWord64 = _import "Real64_castToWord64" internal : Real64.t -> Word64.t;
+val class = _import "Real64_class" internal : Real64.t -> C_Int.t;
+val div = _import "Real64_div" internal : Real64.t * Real64.t -> Real64.t;
+val equal = _import "Real64_equal" internal : Real64.t * Real64.t -> Bool.t;
+val fetch = _import "Real64_fetch" internal : (Real64.t) ref -> Real64.t;
+val frexp = _import "Real64_frexp" internal : Real64.t * (C_Int.t) ref -> Real64.t;
+val gdtoa = _import "Real64_gdtoa" internal : Real64.t * C_Int.t * C_Int.t * C_Int.t * (C_Int.t) ref -> C_String.t;
+val ldexp = _import "Real64_ldexp" internal : Real64.t * C_Int.t -> Real64.t;
+val le = _import "Real64_le" internal : Real64.t * Real64.t -> Bool.t;
+val lt = _import "Real64_lt" internal : Real64.t * Real64.t -> Bool.t;
 structure Math = 
 struct
-val acos = _import "Real64_Math_acos" : Real64.t -> Real64.t;
-val asin = _import "Real64_Math_asin" : Real64.t -> Real64.t;
-val atan = _import "Real64_Math_atan" : Real64.t -> Real64.t;
-val atan2 = _import "Real64_Math_atan2" : Real64.t * Real64.t -> Real64.t;
-val cos = _import "Real64_Math_cos" : Real64.t -> Real64.t;
-val cosh = _import "Real64_Math_cosh" : Real64.t -> Real64.t;
-val (eGet, eSet) = _symbol "Real64_Math_e": (unit -> (Real64.t)) * ((Real64.t) -> unit);
-val exp = _import "Real64_Math_exp" : Real64.t -> Real64.t;
-val ln = _import "Real64_Math_ln" : Real64.t -> Real64.t;
-val log10 = _import "Real64_Math_log10" : Real64.t -> Real64.t;
-val (piGet, piSet) = _symbol "Real64_Math_pi": (unit -> (Real64.t)) * ((Real64.t) -> unit);
-val pow = _import "Real64_Math_pow" : Real64.t * Real64.t -> Real64.t;
-val sin = _import "Real64_Math_sin" : Real64.t -> Real64.t;
-val sinh = _import "Real64_Math_sinh" : Real64.t -> Real64.t;
-val sqrt = _import "Real64_Math_sqrt" : Real64.t -> Real64.t;
-val tan = _import "Real64_Math_tan" : Real64.t -> Real64.t;
-val tanh = _import "Real64_Math_tanh" : Real64.t -> Real64.t;
+val acos = _import "Real64_Math_acos" internal : Real64.t -> Real64.t;
+val asin = _import "Real64_Math_asin" internal : Real64.t -> Real64.t;
+val atan = _import "Real64_Math_atan" internal : Real64.t -> Real64.t;
+val atan2 = _import "Real64_Math_atan2" internal : Real64.t * Real64.t -> Real64.t;
+val cos = _import "Real64_Math_cos" internal : Real64.t -> Real64.t;
+val cosh = _import "Real64_Math_cosh" internal : Real64.t -> Real64.t;
+val (eGet, eSet) = _symbol "Real64_Math_e" internal : (unit -> (Real64.t)) * ((Real64.t) -> unit);
+val exp = _import "Real64_Math_exp" internal : Real64.t -> Real64.t;
+val ln = _import "Real64_Math_ln" internal : Real64.t -> Real64.t;
+val log10 = _import "Real64_Math_log10" internal : Real64.t -> Real64.t;
+val (piGet, piSet) = _symbol "Real64_Math_pi" intern



More information about the MLton-commit mailing list