[MLton-commit] r6785

Wesley Terpstra wesley at mlton.org
Wed Aug 20 05:19:15 PDT 2008


This changes the symbol tags internal/external to private/public/external. 
Without this change, it was not possible to correctly access symbols on
windows and linux simultaneously. The three categories are as follows:

Private  = defined in this module and not available outside it
Public   = defined in this module and exported for use outside
External = defined in another module
... where module means the final library or executable.

The following would be a syntax error:
  _export "foo" external: ..
  _symbol "foo" external alloc: ...
since it is not possible to define a symbol outside of our own module.

_export private/public behave exactly as you'd expect wrt the library API.

As another example,
  val () = _import "foo" private: ...
means that something that MLton is statically linking against must provide
the symbol "foo" and this symbol is not exported outside of the module.

All of the runtime is private in this sense.

The default tags are:
	_import		external
	_address	external
	_symbol		external
	_symbol alloc	public
	_export		public

The C-codegen should work on all platform/format combinations since we just 
carry the information to the output C. The amd64 codegen is correct for ELF,
and from what I've read it should be correct for darwin-x86_64 and win64 too.

Some code that used to "work" on win64 might be broken by this, in that it 
doesn't link. However, before it could link and silently produce pointers to   
function stubs instead of the actual functions, violating ANSI C.

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

The only thing that bothers me now is that you need to know at SML compile,
whether you are being statically or dynamically linked with a library. If 
the library is a dll/so/dylib, then external is the correct choice. However,
if it is statically linked, public is technically correct.      

On ELF/darwin, external _import/_symbol is a safe choice in both cases.

Unfortunately, on windows it seems this distinction really matters. You     
generate different assembler for the two cases, and they are incompatible.  
It >is< possible to link against both by assuming the symbol is not
external, only importing functions, and never taking pointers to those
functions. That's how MLton is able to link against gmp both statically and
dynamically at the moment. This works mostly because of the magic stub
libraries MinGW makes. This hack is pretty fragile, though.                   

Therefore, I suppose the right thing to recommend is 'external' for all
library imports (it's also the default). Then, if compiling on windows,
you have to link against the DLL, not statically. 

If someone really does want to link against a library statically on windows,   
then they can still do it using 'public' _import.    


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

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/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/amd64-codegen/amd64-generate-transfers.fun
U   mlton/trunk/mlton/codegen/amd64-codegen/amd64-mlton.fun
U   mlton/trunk/mlton/codegen/c-codegen/c-codegen.fun
U   mlton/trunk/mlton/elaborate/elaborate-core.fun
U   mlton/trunk/mlton/front-end/ml.grm
U   mlton/trunk/mlton/main/main.fun
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-08-20 01:54:34 UTC (rev 6784)
+++ mlton/trunk/basis-library/primitive/basis-ffi.sml	2008-08-20 12:18:39 UTC (rev 6785)
@@ -5,41 +5,41 @@
 struct
 structure CommandLine = 
 struct
-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);
+val (argcGet, argcSet) = _symbol "CommandLine_argc" private : (unit -> (C_Int.t)) * ((C_Int.t) -> unit);
+val (argvGet, argvSet) = _symbol "CommandLine_argv" private : (unit -> (C_StringArray.t)) * ((C_StringArray.t) -> unit);
+val (commandNameGet, commandNameSet) = _symbol "CommandLine_commandName" private : (unit -> (C_String.t)) * ((C_String.t) -> unit);
 end
 structure Cygwin = 
 struct
-val toFullWindowsPath = _import "Cygwin_toFullWindowsPath" internal : NullString8.t -> C_String.t;
+val toFullWindowsPath = _import "Cygwin_toFullWindowsPath" private : NullString8.t -> C_String.t;
 end
 structure Date = 
 struct
-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;
+val gmTime = _import "Date_gmTime" private : (C_Time.t) ref -> (C_Int.t) C_Errno.t;
+val localOffset = _import "Date_localOffset" private : unit -> C_Double.t;
+val localTime = _import "Date_localTime" private : (C_Time.t) ref -> (C_Int.t) C_Errno.t;
+val mkTime = _import "Date_mkTime" private : unit -> (C_Time.t) C_Errno.t;
+val strfTime = _import "Date_strfTime" private : (Char8.t) array * C_Size.t * NullString8.t -> C_Size.t;
 structure Tm = 
 struct
-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;
+val getHour = _import "Date_Tm_getHour" private : unit -> C_Int.t;
+val getIsDst = _import "Date_Tm_getIsDst" private : unit -> C_Int.t;
+val getMDay = _import "Date_Tm_getMDay" private : unit -> C_Int.t;
+val getMin = _import "Date_Tm_getMin" private : unit -> C_Int.t;
+val getMon = _import "Date_Tm_getMon" private : unit -> C_Int.t;
+val getSec = _import "Date_Tm_getSec" private : unit -> C_Int.t;
+val getWDay = _import "Date_Tm_getWDay" private : unit -> C_Int.t;
+val getYDay = _import "Date_Tm_getYDay" private : unit -> C_Int.t;
+val getYear = _import "Date_Tm_getYear" private : unit -> C_Int.t;
+val setHour = _import "Date_Tm_setHour" private : C_Int.t -> unit;
+val setIsDst = _import "Date_Tm_setIsDst" private : C_Int.t -> unit;
+val setMDay = _import "Date_Tm_setMDay" private : C_Int.t -> unit;
+val setMin = _import "Date_Tm_setMin" private : C_Int.t -> unit;
+val setMon = _import "Date_Tm_setMon" private : C_Int.t -> unit;
+val setSec = _import "Date_Tm_setSec" private : C_Int.t -> unit;
+val setWDay = _import "Date_Tm_setWDay" private : C_Int.t -> unit;
+val setYDay = _import "Date_Tm_setYDay" private : C_Int.t -> unit;
+val setYear = _import "Date_Tm_setYear" private : 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" internal : unit -> C_Int.t;
+val getRoundingMode = _import "IEEEReal_getRoundingMode" private : 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" internal : C_Int.t -> unit;
+val setRoundingMode = _import "IEEEReal_setRoundingMode" private : C_Int.t -> unit;
 end
 structure MinGW = 
 struct
-val getTempPath = _import "MinGW_getTempPath" internal : C_Size.t * (Char8.t) array -> C_Size.t;
+val getTempPath = _import "MinGW_getTempPath" private : C_Size.t * (Char8.t) array -> C_Size.t;
 end
 structure MLton = 
 struct
-val bug = _import "MLton_bug" internal : String8.t -> unit;
+val bug = _import "MLton_bug" private : String8.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" internal : 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" private : 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" internal : C_PId.t * (C_Status.t) ref -> (C_PId.t) C_Errno.t;
-val spawne = _import "MLton_Process_spawne" internal : NullString8.t * (NullString8.t) array * (NullString8.t) array -> (C_PId.t) C_Errno.t;
-val spawnp = _import "MLton_Process_spawnp" internal : NullString8.t * (NullString8.t) array -> (C_PId.t) C_Errno.t;
+val cwait = _import "MLton_Process_cwait" private : C_PId.t * (C_Status.t) ref -> (C_PId.t) C_Errno.t;
+val spawne = _import "MLton_Process_spawne" private : NullString8.t * (NullString8.t) array * (NullString8.t) array -> (C_PId.t) C_Errno.t;
+val spawnp = _import "MLton_Process_spawnp" private : NullString8.t * (NullString8.t) array -> (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" 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 get = _import "MLton_Rlimit_get" private : C_Int.t -> (C_Int.t) C_Errno.t;
+val getHard = _import "MLton_Rlimit_getHard" private : unit -> C_RLim.t;
+val getSoft = _import "MLton_Rlimit_getSoft" private : 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" internal : C_Int.t * C_RLim.t * C_RLim.t -> (C_Int.t) C_Errno.t;
+val set = _import "MLton_Rlimit_set" private : 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" 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;
+val children_stime_sec = _import "MLton_Rusage_children_stime_sec" private : unit -> C_Time.t;
+val children_stime_usec = _import "MLton_Rusage_children_stime_usec" private : unit -> C_SUSeconds.t;
+val children_utime_sec = _import "MLton_Rusage_children_utime_sec" private : unit -> C_Time.t;
+val children_utime_usec = _import "MLton_Rusage_children_utime_usec" private : unit -> C_SUSeconds.t;
+val gc_stime_sec = _import "MLton_Rusage_gc_stime_sec" private : unit -> C_Time.t;
+val gc_stime_usec = _import "MLton_Rusage_gc_stime_usec" private : unit -> C_SUSeconds.t;
+val gc_utime_sec = _import "MLton_Rusage_gc_utime_sec" private : unit -> C_Time.t;
+val gc_utime_usec = _import "MLton_Rusage_gc_utime_usec" private : unit -> C_SUSeconds.t;
+val getrusage = _import "MLton_Rusage_getrusage" private : unit -> unit;
+val self_stime_sec = _import "MLton_Rusage_self_stime_sec" private : unit -> C_Time.t;
+val self_stime_usec = _import "MLton_Rusage_self_stime_usec" private : unit -> C_SUSeconds.t;
+val self_utime_sec = _import "MLton_Rusage_self_utime_sec" private : unit -> C_Time.t;
+val self_utime_usec = _import "MLton_Rusage_self_utime_usec" private : unit -> C_SUSeconds.t;
 end
 structure Syslog = 
 struct
-val closelog = _import "MLton_Syslog_closelog" internal : unit -> unit;
+val closelog = _import "MLton_Syslog_closelog" private : 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" internal : NullString8.t * C_Int.t * C_Int.t -> unit;
+val openlog = _import "MLton_Syslog_openlog" private : 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" internal : C_Int.t * NullString8.t -> unit;
+val syslog = _import "MLton_Syslog_syslog" private : C_Int.t * NullString8.t -> unit;
 end
 end
 structure Net = 
 struct
-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;
+val htonl = _import "Net_htonl" private : Word32.t -> Word32.t;
+val htons = _import "Net_htons" private : Word16.t -> Word16.t;
+val ntohl = _import "Net_ntohl" private : Word32.t -> Word32.t;
+val ntohs = _import "Net_ntohs" private : Word16.t -> Word16.t;
 end
 structure NetHostDB = 
 struct
-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 getByAddress = _import "NetHostDB_getByAddress" private : (Word8.t) vector * C_Socklen.t -> C_Int.t;
+val getByName = _import "NetHostDB_getByName" private : NullString8.t -> C_Int.t;
+val getEntryAddrsN = _import "NetHostDB_getEntryAddrsN" private : C_Int.t * (Word8.t) array -> unit;
+val getEntryAddrsNum = _import "NetHostDB_getEntryAddrsNum" private : unit -> C_Int.t;
+val getEntryAddrType = _import "NetHostDB_getEntryAddrType" private : unit -> C_Int.t;
+val getEntryAliasesN = _import "NetHostDB_getEntryAliasesN" private : C_Int.t -> C_String.t;
+val getEntryAliasesNum = _import "NetHostDB_getEntryAliasesNum" private : unit -> C_Int.t;
+val getEntryLength = _import "NetHostDB_getEntryLength" private : unit -> C_Int.t;
+val getEntryName = _import "NetHostDB_getEntryName" private : unit -> C_String.t;
+val getHostName = _import "NetHostDB_getHostName" private : (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" 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;
+val getByName = _import "NetProtDB_getByName" private : NullString8.t -> C_Int.t;
+val getByNumber = _import "NetProtDB_getByNumber" private : C_Int.t -> C_Int.t;
+val getEntryAliasesN = _import "NetProtDB_getEntryAliasesN" private : C_Int.t -> C_String.t;
+val getEntryAliasesNum = _import "NetProtDB_getEntryAliasesNum" private : unit -> C_Int.t;
+val getEntryName = _import "NetProtDB_getEntryName" private : unit -> C_String.t;
+val getEntryProto = _import "NetProtDB_getEntryProto" private : unit -> C_Int.t;
 end
 structure NetServDB = 
 struct
-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;
+val getByName = _import "NetServDB_getByName" private : NullString8.t * NullString8.t -> C_Int.t;
+val getByNameNull = _import "NetServDB_getByNameNull" private : NullString8.t -> C_Int.t;
+val getByPort = _import "NetServDB_getByPort" private : C_Int.t * NullString8.t -> C_Int.t;
+val getByPortNull = _import "NetServDB_getByPortNull" private : C_Int.t -> C_Int.t;
+val getEntryAliasesN = _import "NetServDB_getEntryAliasesN" private : C_Int.t -> C_String.t;
+val getEntryAliasesNum = _import "NetServDB_getEntryAliasesNum" private : unit -> C_Int.t;
+val getEntryName = _import "NetServDB_getEntryName" private : unit -> C_String.t;
+val getEntryPort = _import "NetServDB_getEntryPort" private : unit -> C_Int.t;
+val getEntryProto = _import "NetServDB_getEntryProto" private : unit -> C_String.t;
 end
 structure OS = 
 struct
 structure IO = 
 struct
-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 poll = _import "OS_IO_poll" private : (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" internal : unit -> unit;
+val clearErrno = _import "Posix_Error_clearErrno" private : 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" internal : unit -> C_Int.t;
-val strError = _import "Posix_Error_strError" internal : C_Int.t -> C_String.t;
+val getErrno = _import "Posix_Error_getErrno" private : unit -> C_Int.t;
+val strError = _import "Posix_Error_strError" private : 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" 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;
+val access = _import "Posix_FileSys_access" private : NullString8.t * C_Int.t -> (C_Int.t) C_Errno.t;
+val chdir = _import "Posix_FileSys_chdir" private : NullString8.t -> (C_Int.t) C_Errno.t;
+val chmod = _import "Posix_FileSys_chmod" private : NullString8.t * C_Mode.t -> (C_Int.t) C_Errno.t;
+val chown = _import "Posix_FileSys_chown" private : NullString8.t * C_UId.t * C_GId.t -> (C_Int.t) C_Errno.t;
 structure Dirstream = 
 struct
-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;
+val closeDir = _import "Posix_FileSys_Dirstream_closeDir" private : C_DirP.t -> (C_Int.t) C_Errno.t;
+val openDir = _import "Posix_FileSys_Dirstream_openDir" private : NullString8.t -> (C_DirP.t) C_Errno.t;
+val readDir = _import "Posix_FileSys_Dirstream_readDir" private : C_DirP.t -> (C_String.t) C_Errno.t;
+val rewindDir = _import "Posix_FileSys_Dirstream_rewindDir" private : C_DirP.t -> unit;
 end
-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;
+val fchdir = _import "Posix_FileSys_fchdir" private : C_Fd.t -> (C_Int.t) C_Errno.t;
+val fchmod = _import "Posix_FileSys_fchmod" private : C_Fd.t * C_Mode.t -> (C_Int.t) C_Errno.t;
+val fchown = _import "Posix_FileSys_fchown" private : C_Fd.t * C_UId.t * C_GId.t -> (C_Int.t) C_Errno.t;
+val fpathconf = _import "Posix_FileSys_fpathconf" private : C_Fd.t * C_Int.t -> (C_Long.t) C_Errno.t;
+val ftruncate = _import "Posix_FileSys_ftruncate" private : C_Fd.t * C_Off.t -> (C_Int.t) C_Errno.t;
+val getcwd = _import "Posix_FileSys_getcwd" private : (Char8.t) array * C_Size.t -> (C_String.t) C_Errno.t;
+val link = _import "Posix_FileSys_link" private : NullString8.t * NullString8.t -> (C_Int.t) C_Errno.t;
+val mkdir = _import "Posix_FileSys_mkdir" private : NullString8.t * C_Mode.t -> (C_Int.t) C_Errno.t;
+val mkfifo = _import "Posix_FileSys_mkfifo" private : 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" 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;
+val open2 = _import "Posix_FileSys_open2" private : NullString8.t * C_Int.t -> (C_Fd.t) C_Errno.t;
+val open3 = _import "Posix_FileSys_open3" private : NullString8.t * C_Int.t * C_Mode.t -> (C_Fd.t) C_Errno.t;
+val pathconf = _import "Posix_FileSys_pathconf" private : 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" 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;
+val readlink = _import "Posix_FileSys_readlink" private : NullString8.t * (Char8.t) array * C_Size.t -> (C_SSize.t) C_Errno.t;
+val rename = _import "Posix_FileSys_rename" private : NullString8.t * NullString8.t -> (C_Int.t) C_Errno.t;
+val rmdir = _import "Posix_FileSys_rmdir" private : 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" 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;
+val isBlk = _import "Posix_FileSys_ST_isBlk" private : C_Mode.t -> C_Int.t;
+val isChr = _import "Posix_FileSys_ST_isChr" private : C_Mode.t -> C_Int.t;
+val isDir = _import "Posix_FileSys_ST_isDir" private : C_Mode.t -> C_Int.t;
+val isFIFO = _import "Posix_FileSys_ST_isFIFO" private : C_Mode.t -> C_Int.t;
+val isLink = _import "Posix_FileSys_ST_isLink" private : C_Mode.t -> C_Int.t;
+val isReg = _import "Posix_FileSys_ST_isReg" private : C_Mode.t -> C_Int.t;
+val isSock = _import "Posix_FileSys_ST_isSock" private : C_Mode.t -> C_Int.t;
 end
 structure Stat = 
 struct
-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;
+val fstat = _import "Posix_FileSys_Stat_fstat" private : C_Fd.t -> (C_Int.t) C_Errno.t;
+val getATime = _import "Posix_FileSys_Stat_getATime" private : unit -> C_Time.t;
+val getCTime = _import "Posix_FileSys_Stat_getCTime" private : unit -> C_Time.t;
+val getDev = _import "Posix_FileSys_Stat_getDev" private : unit -> C_Dev.t;
+val getGId = _import "Posix_FileSys_Stat_getGId" private : unit -> C_GId.t;
+val getINo = _import "Posix_FileSys_Stat_getINo" private : unit -> C_INo.t;
+val getMode = _import "Posix_FileSys_Stat_getMode" private : unit -> C_Mode.t;
+val getMTime = _import "Posix_FileSys_Stat_getMTime" private : unit -> C_Time.t;
+val getNLink = _import "Posix_FileSys_Stat_getNLink" private : unit -> C_NLink.t;
+val getRDev = _import "Posix_FileSys_Stat_getRDev" private : unit -> C_Dev.t;
+val getSize = _import "Posix_FileSys_Stat_getSize" private : unit -> C_Off.t;
+val getUId = _import "Posix_FileSys_Stat_getUId" private : unit -> C_UId.t;
+val lstat = _import "Posix_FileSys_Stat_lstat" private : NullString8.t -> (C_Int.t) C_Errno.t;
+val stat = _import "Posix_FileSys_Stat_stat" private : NullString8.t -> (C_Int.t) C_Errno.t;
 end
-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;
+val symlink = _import "Posix_FileSys_symlink" private : NullString8.t * NullString8.t -> (C_Int.t) C_Errno.t;
+val truncate = _import "Posix_FileSys_truncate" private : NullString8.t * C_Off.t -> (C_Int.t) C_Errno.t;
+val umask = _import "Posix_FileSys_umask" private : C_Mode.t -> C_Mode.t;
+val unlink = _import "Posix_FileSys_unlink" private : NullString8.t -> (C_Int.t) C_Errno.t;
 structure Utimbuf = 
 struct
-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;
+val setAcTime = _import "Posix_FileSys_Utimbuf_setAcTime" private : C_Time.t -> unit;
+val setModTime = _import "Posix_FileSys_Utimbuf_setModTime" private : C_Time.t -> unit;
+val utime = _import "Posix_FileSys_Utimbuf_utime" private : NullString8.t -> (C_Int.t) C_Errno.t;
 end
 end
 structure IO = 
 struct
-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 close = _import "Posix_IO_close" private : C_Fd.t -> (C_Int.t) C_Errno.t;
+val dup = _import "Posix_IO_dup" private : C_Fd.t -> (C_Fd.t) C_Errno.t;
+val dup2 = _import "Posix_IO_dup2" private : 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" 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;
+val fcntl2 = _import "Posix_IO_fcntl2" private : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t;
+val fcntl3 = _import "Posix_IO_fcntl3" private : 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" 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 fcntl = _import "Posix_IO_FLock_fcntl" private : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t;
+val getLen = _import "Posix_IO_FLock_getLen" private : unit -> C_Off.t;
+val getPId = _import "Posix_IO_FLock_getPId" private : unit -> C_PId.t;
+val getStart = _import "Posix_IO_FLock_getStart" private : unit -> C_Off.t;
+val getType = _import "Posix_IO_FLock_getType" private : unit -> C_Short.t;
+val getWhence = _import "Posix_IO_FLock_getWhence" private : 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" 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;
+val setLen = _import "Posix_IO_FLock_setLen" private : C_Off.t -> unit;
+val setPId = _import "Posix_IO_FLock_setPId" private : C_PId.t -> unit;
+val setStart = _import "Posix_IO_FLock_setStart" private : C_Off.t -> unit;
+val setType = _import "Posix_IO_FLock_setType" private : C_Short.t -> unit;
+val setWhence = _import "Posix_IO_FLock_setWhence" private : C_Short.t -> unit;
 end
-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 fsync = _import "Posix_IO_fsync" private : C_Fd.t -> (C_Int.t) C_Errno.t;
+val lseek = _import "Posix_IO_lseek" private : 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" 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 pipe = _import "Posix_IO_pipe" private : (C_Fd.t) array -> (C_Int.t) C_Errno.t;
+val readChar8 = _import "Posix_IO_readChar8" private : C_Fd.t * (Char8.t) array * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
+val readWord8 = _import "Posix_IO_readWord8" private : 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" 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;
+val setbin = _import "Posix_IO_setbin" private : C_Fd.t -> unit;
+val settext = _import "Posix_IO_settext" private : C_Fd.t -> unit;
+val writeChar8Arr = _import "Posix_IO_writeChar8Arr" private : C_Fd.t * (Char8.t) array * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
+val writeChar8Vec = _import "Posix_IO_writeChar8Vec" private : C_Fd.t * (Char8.t) vector * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
+val writeWord8Arr = _import "Posix_IO_writeWord8Arr" private : C_Fd.t * (Word8.t) array * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
+val writeWord8Vec = _import "Posix_IO_writeWord8Vec" private : 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" 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 ctermid = _import "Posix_ProcEnv_ctermid" private : unit -> C_String.t;
+val (environGet, environSet) = _symbol "Posix_ProcEnv_environ" private : (unit -> (C_StringArray.t)) * ((C_StringArray.t) -> unit);
+val getegid = _import "Posix_ProcEnv_getegid" private : unit -> C_GId.t;
+val getenv = _import "Posix_ProcEnv_getenv" private : NullString8.t -> C_String.t;
+val geteuid = _import "Posix_ProcEnv_geteuid" private : unit -> C_UId.t;
+val getgid = _import "Posix_ProcEnv_getgid" private : unit -> C_GId.t;
+val getgroups = _import "Posix_ProcEnv_getgroups" private : C_Int.t * (C_GId.t) array -> (C_Int.t) C_Errno.t;
+val getgroupsN = _import "Posix_ProcEnv_getgroupsN" private : unit -> C_Int.t;
+val getlogin = _import "Posix_ProcEnv_getlogin" private : unit -> (C_String.t) C_Errno.t;
+val getpgrp = _import "Posix_ProcEnv_getpgrp" private : unit -> C_PId.t;
+val getpid = _import "Posix_ProcEnv_getpid" private : unit -> C_PId.t;
+val getppid = _import "Posix_ProcEnv_getppid" private : unit -> C_PId.t;
+val getuid = _import "Posix_ProcEnv_getuid" private : unit -> C_UId.t;
+val isatty = _import "Posix_ProcEnv_isatty" private : 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" 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;
+val setenv = _import "Posix_ProcEnv_setenv" private : NullString8.t * NullString8.t -> (C_Int.t) C_Errno.t;
+val setgid = _import "Posix_ProcEnv_setgid" private : C_GId.t -> (C_Int.t) C_Errno.t;
+val setgroups = _import "Posix_ProcEnv_setgroups" private : C_Int.t * (C_GId.t) vector -> (C_Int.t) C_Errno.t;
+val setpgid = _import "Posix_ProcEnv_setpgid" private : C_PId.t * C_PId.t -> (C_Int.t) C_Errno.t;
+val setsid = _import "Posix_ProcEnv_setsid" private : unit -> (C_PId.t) C_Errno.t;
+val setuid = _import "Posix_ProcEnv_setuid" private : C_UId.t -> (C_Int.t) C_Errno.t;
+val sysconf = _import "Posix_ProcEnv_sysconf" private : C_Int.t -> (C_Long.t) C_Errno.t;
+val times = _import "Posix_ProcEnv_times" private : unit -> (C_Clock.t) C_Errno.t;
 structure Times = 
 struct
-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;
+val getCSTime = _import "Posix_ProcEnv_Times_getCSTime" private : unit -> C_Clock.t;
+val getCUTime = _import "Posix_ProcEnv_Times_getCUTime" private : unit -> C_Clock.t;
+val getSTime = _import "Posix_ProcEnv_Times_getSTime" private : unit -> C_Clock.t;
+val getUTime = _import "Posix_ProcEnv_Times_getUTime" private : unit -> C_Clock.t;
 end
-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;
+val ttyname = _import "Posix_ProcEnv_ttyname" private : C_Fd.t -> (C_String.t) C_Errno.t;
+val uname = _import "Posix_ProcEnv_uname" private : unit -> (C_Int.t) C_Errno.t;
 structure Uname = 
 struct
-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;
+val getMachine = _import "Posix_ProcEnv_Uname_getMachine" private : unit -> C_String.t;
+val getNodeName = _import "Posix_ProcEnv_Uname_getNodeName" private : unit -> C_String.t;
+val getRelease = _import "Posix_ProcEnv_Uname_getRelease" private : unit -> C_String.t;
+val getSysName = _import "Posix_ProcEnv_Uname_getSysName" private : unit -> C_String.t;
+val getVersion = _import "Posix_ProcEnv_Uname_getVersion" private : unit -> C_String.t;
 end
 end
 structure Process = 
 struct
-val alarm = _import "Posix_Process_alarm" internal : C_UInt.t -> C_UInt.t;
-val exece = _import "Posix_Process_exece" internal : NullString8.t * (NullString8.t) array * (NullString8.t) array -> (C_Int.t) C_Errno.t;
-val execp = _import "Posix_Process_execp" internal : NullString8.t * (NullString8.t) array -> (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;
+val alarm = _import "Posix_Process_alarm" private : C_UInt.t -> C_UInt.t;
+val exece = _import "Posix_Process_exece" private : NullString8.t * (NullString8.t) array * (NullString8.t) array -> (C_Int.t) C_Errno.t;
+val execp = _import "Posix_Process_execp" private : NullString8.t * (NullString8.t) array -> (C_Int.t) C_Errno.t;
+val exit = _import "Posix_Process_exit" private : C_Status.t -> unit;
+val exitStatus = _import "Posix_Process_exitStatus" private : C_Status.t -> C_Int.t;
+val fork = _import "Posix_Process_fork" private : unit -> (C_PId.t) C_Errno.t;
+val ifExited = _import "Posix_Process_ifExited" private : C_Status.t -> C_Int.t;
+val ifSignaled = _import "Posix_Process_ifSignaled" private : C_Status.t -> C_Int.t;
+val ifStopped = _import "Posix_Process_ifStopped" private : C_Status.t -> C_Int.t;
+val kill = _import "Posix_Process_kill" private : C_PId.t * C_Signal.t -> (C_Int.t) C_Errno.t;
+val nanosleep = _import "Posix_Process_nanosleep" private : (C_Time.t) ref * (C_Long.t) ref -> (C_Int.t) C_Errno.t;
+val pause = _import "Posix_Process_pause" private : unit -> (C_Int.t) C_Errno.t;
+val sleep = _import "Posix_Process_sleep" private : C_UInt.t -> C_UInt.t;
+val stopSig = _import "Posix_Process_stopSig" private : C_Status.t -> C_Signal.t;
+val system = _import "Posix_Process_system" private : NullString8.t -> (C_Status.t) C_Errno.t;
+val termSig = _import "Posix_Process_termSig" private : 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" internal : C_PId.t * (C_Int.t) ref * C_Int.t -> (C_PId.t) C_Errno.t;
+val waitpid = _import "Posix_Process_waitpid" private : 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" 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 default = _import "Posix_Signal_default" private : C_Signal.t -> (C_Int.t) C_Errno.t;
+val handlee = _import "Posix_Signal_handlee" private : C_Signal.t -> (C_Int.t) C_Errno.t;
+val handleGC = _import "Posix_Signal_handleGC" private : unit -> unit;
+val ignore = _import "Posix_Signal_ignore" private : C_Signal.t -> (C_Int.t) C_Errno.t;
+val isDefault = _import "Posix_Signal_isDefault" private : C_Signal.t * (C_Int.t) ref -> (C_Int.t) C_Errno.t;
+val isIgnore = _import "Posix_Signal_isIgnore" private : C_Signal.t * (C_Int.t) ref -> (C_Int.t) C_Errno.t;
+val isPending = _import "Posix_Signal_isPending" private : C_Signal.t -> C_Int.t;
+val isPendingGC = _import "Posix_Signal_isPendingGC" private : unit -> C_Int.t;
 val NSIG = _const "Posix_Signal_NSIG" : C_Int.t;
-val resetPending = _import "Posix_Signal_resetPending" internal : unit -> unit;
+val resetPending = _import "Posix_Signal_resetPending" private : 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" internal : C_Signal.t -> (C_Int.t) C_Errno.t;
+val sigaddset = _import "Posix_Signal_sigaddset" private : 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" 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 sigdelset = _import "Posix_Signal_sigdelset" private : C_Signal.t -> (C_Int.t) C_Errno.t;
+val sigemptyset = _import "Posix_Signal_sigemptyset" private : unit -> (C_Int.t) C_Errno.t;
+val sigfillset = _import "Posix_Signal_sigfillset" private : 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" internal : C_Signal.t -> (C_Int.t) C_Errno.t;
+val sigismember = _import "Posix_Signal_sigismember" private : 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" internal : C_Int.t -> (C_Int.t) C_Errno.t;
+val sigprocmask = _import "Posix_Signal_sigprocmask" private : 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" internal : unit -> unit;
+val sigsuspend = _import "Posix_Signal_sigsuspend" private : 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" 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;
+val getgrgid = _import "Posix_SysDB_getgrgid" private : C_GId.t -> (C_Int.t) C_Errno.t;
+val getgrnam = _import "Posix_SysDB_getgrnam" private : NullString8.t -> (C_Int.t) C_Errno.t;
+val getpwnam = _import "Posix_SysDB_getpwnam" private : NullString8.t -> (C_Int.t) C_Errno.t;
+val getpwuid = _import "Posix_SysDB_getpwuid" private : C_GId.t -> (C_Int.t) C_Errno.t;
 structure Group = 
 struct
-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;
+val getGId = _import "Posix_SysDB_Group_getGId" private : unit -> C_GId.t;
+val getMem = _import "Posix_SysDB_Group_getMem" private : unit -> C_StringArray.t;
+val getName = _import "Posix_SysDB_Group_getName" private : unit -> C_String.t;
 end
 structure Passwd = 
 struct
-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;
+val getDir = _import "Posix_SysDB_Passwd_getDir" private : unit -> C_String.t;
+val getGId = _import "Posix_SysDB_Passwd_getGId" private : unit -> C_GId.t;
+val getName = _import "Posix_SysDB_Passwd_getName" private : unit -> C_String.t;
+val getShell = _import "Posix_SysDB_Passwd_getShell" private : unit -> C_String.t;
+val getUId = _import "Posix_SysDB_Passwd_getUId" private : unit -> C_UId.t;
 end
 end
 structure TTY = 
@@ -855,14 +855,14 @@
 end
 structure TC = 
 struct
-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 drain = _import "Posix_TTY_TC_drain" private : C_Fd.t -> (C_Int.t) C_Errno.t;
+val flow = _import "Posix_TTY_TC_flow" private : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t;
+val flush = _import "Posix_TTY_TC_flush" private : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t;
+val getattr = _import "Posix_TTY_TC_getattr" private : C_Fd.t -> (C_Int.t) C_Errno.t;
+val getpgrp = _import "Posix_TTY_TC_getpgrp" private : C_Fd.t -> (C_PId.t) C_Errno.t;
+val sendbreak = _import "Posix_TTY_TC_sendbreak" private : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t;
+val setattr = _import "Posix_TTY_TC_setattr" private : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t;
+val setpgrp = _import "Posix_TTY_TC_setpgrp" private : 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" 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;
+val cfGetISpeed = _import "Posix_TTY_Termios_cfGetISpeed" private : unit -> C_Speed.t;
+val cfGetOSpeed = _import "Posix_TTY_Termios_cfGetOSpeed" private : unit -> C_Speed.t;
+val cfSetISpeed = _import "Posix_TTY_Termios_cfSetISpeed" private : C_Speed.t -> (C_Int.t) C_Errno.t;
+val cfSetOSpeed = _import "Posix_TTY_Termios_cfSetOSpeed" private : C_Speed.t -> (C_Int.t) C_Errno.t;
+val getCC = _import "Posix_TTY_Termios_getCC" private : (C_CC.t) array -> unit;
+val getCFlag = _import "Posix_TTY_Termios_getCFlag" private : unit -> C_TCFlag.t;
+val getIFlag = _import "Posix_TTY_Termios_getIFlag" private : unit -> C_TCFlag.t;
+val getLFlag = _import "Posix_TTY_Termios_getLFlag" private : unit -> C_TCFlag.t;
+val getOFlag = _import "Posix_TTY_Termios_getOFlag" private : unit -> C_TCFlag.t;
+val setCC = _import "Posix_TTY_Termios_setCC" private : (C_CC.t) array -> unit;
+val setCFlag = _import "Posix_TTY_Termios_setCFlag" private : C_TCFlag.t -> unit;
+val setIFlag = _import "Posix_TTY_Termios_setIFlag" private : C_TCFlag.t -> unit;
+val setLFlag = _import "Posix_TTY_Termios_setLFlag" private : C_TCFlag.t -> unit;
+val setOFlag = _import "Posix_TTY_Termios_setOFlag" private : C_TCFlag.t -> unit;
 end
 structure V = 
 struct
@@ -911,126 +911,126 @@
 structure Real32 = 
 struct
 type t = Real32.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;
+val abs = _import "Real32_abs" private : Real32.t -> Real32.t;
+val add = _import "Real32_add" private : Real32.t * Real32.t -> Real32.t;
+val castToWord32 = _import "Real32_castToWord32" private : Real32.t -> Word32.t;
+val class = _import "Real32_class" private : Real32.t -> C_Int.t;
+val div = _import "Real32_div" private : Real32.t * Real32.t -> Real32.t;
+val equal = _import "Real32_equal" private : Real32.t * Real32.t -> Bool.t;
+val fetch = _import "Real32_fetch" private : (Real32.t) ref -> Real32.t;
+val frexp = _import "Real32_frexp" private : Real32.t * (C_Int.t) ref -> Real32.t;
+val gdtoa = _import "Real32_gdtoa" private : Real32.t * C_Int.t * C_Int.t * C_Int.t * (C_Int.t) ref -> C_String.t;
+val ldexp = _import "Real32_ldexp" private : Real32.t * C_Int.t -> Real32.t;
+val le = _import "Real32_le" private : Real32.t * Real32.t -> Bool.t;
+val lt = _import "Real32_lt" private : Real32.t * Real32.t -> Bool.t;
 structure Math = 
 struct
-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;
+val acos = _import "Real32_Math_acos" private : Real32.t -> Real32.t;
+val asin = _import "Real32_Math_asin" private : Real32.t -> Real32.t;
+val atan = _import "Real32_Math_atan" private : Real32.t -> Real32.t;
+val atan2 = _import "Real32_Math_atan2" private : Real32.t * Real32.t -> Real32.t;
+val cos = _import "Real32_Math_cos" private : Real32.t -> Real32.t;
+val cosh = _import "Real32_Math_cosh" private : Real32.t -> Real32.t;
+val (eGet, eSet) = _symbol "Real32_Math_e" private : (unit -> (Real32.t)) * ((Real32.t) -> unit);
+val exp = _import "Real32_Math_exp" private : Real32.t -> Real32.t;
+val ln = _import "Real32_Math_ln" private : Real32.t -> Real32.t;
+val log10 = _import "Real32_Math_log10" private : Real32.t -> Real32.t;
+val (piGet, piSet) = _symbol "Real32_Math_pi" private : (unit -> (Real32.t)) * ((Real32.t) -> unit);
+val pow = _import "Real32_Math_pow" private : Real32.t * Real32.t -> Real32.t;
+val sin = _import "Real32_Math_sin" private : Real32.t -> Real32.t;
+val sinh = _import "Real32_Math_sinh" private : Real32.t -> Real32.t;
+val sqrt = _import "Real32_Math_sqrt" private : Real32.t -> Real32.t;
+val tan = _import "Real32_Math_tan" private : Real32.t -> Real32.t;
+val tanh = _import "Real32_Math_tanh" private : Real32.t -> Real32.t;
 end
-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;
+val (maxFiniteGet, maxFiniteSet) = _symbol "Real32_maxFinite" private : (unit -> (Real32.t)) * ((Real32.t) -> unit);
+val (minNormalPosGet, minNormalPosSet) = _symbol "Real32_minNormalPos" private : (unit -> (Real32.t)) * ((Real32.t) -> unit);
+val (minPosGet, minPosSet) = _symbol "Real32_minPos" private : (unit -> (Real32.t)) * ((Real32.t) -> unit);
+val modf = _import "Real32_modf" private : Real32.t * (Real32.t) ref -> Real32.t;
+val move = _import "Real32_move" private : (Real32.t) ref * (Real32.t) ref -> unit;
+val mul = _import "Real32_mul" private : Real32.t * Real32.t -> Real32.t;
+val muladd = _import "Real32_muladd" private : Real32.t * Real32.t * Real32.t -> Real32.t;
+val mulsub = _import "Real32_mulsub" private : Real32.t * Real32.t * Real32.t -> Real32.t;
+val neg = _import "Real32_neg" private : Real32.t -> Real32.t;
+val rndToReal32 = _import "Real32_rndToReal32" private : Real32.t -> Real32.t;
+val rndToReal64 = _import "Real32_rndToReal64" private : Real32.t -> Real64.t;
+val rndToWordS16 = _import "Real32_rndToWordS16" private : Real32.t -> Int16.t;
+val rndToWordS32 = _import "Real32_rndToWordS32" private : Real32.t -> Int32.t;
+val rndToWordS64 = _import "Real32_rndToWordS64" private : Real32.t -> Int64.t;
+val rndToWordS8 = _import "Real32_rndToWordS8" private : Real32.t -> Int8.t;
+val rndToWordU16 = _import "Real32_rndToWordU16" private : Real32.t -> Word16.t;
+val rndToWordU32 = _import "Real32_rndToWordU32" private : Real32.t -> Word32.t;
+val rndToWordU64 = _import "Real32_rndToWordU64" private : Real32.t -> Word64.t;
+val rndToWordU8 = _import "Real32_rndToWordU8" private : Real32.t -> Word8.t;
+val round = _import "Real32_round" private : Real32.t -> Real32.t;
+val signBit = _import "Real32_signBit" private : Real32.t -> C_Int.t;
+val store = _import "Real32_store" private : (Real32.t) ref * Real32.t -> unit;
+val strto = _import "Real32_strto" private : NullString8.t * C_Int.t -> Real32.t;
+val sub = _import "Real32_sub" private : Real32.t * Real32.t -> Real32.t;
 end
 structure Real64 = 
 struct
 type t = Real64.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;
+val abs = _import "Real64_abs" private : Real64.t -> Real64.t;
+val add = _import "Real64_add" private : Real64.t * Real64.t -> Real64.t;
+val castToWord64 = _import "Real64_castToWord64" private : Real64.t -> Word64.t;
+val class = _import "Real64_class" private : Real64.t -> C_Int.t;
+val div = _import "Real64_div" private : Real64.t * Real64.t -> Real64.t;
+val equal = _import "Real64_equal" private : Real64.t * Real64.t -> Bool.t;
+val fetch = _import "Real64_fetch" private : (Real64.t) ref -> Real64.t;
+val frexp = _import "Real64_frexp" private : Real64.t * (C_Int.t) ref -> Real64.t;
+val gdtoa = _import "



More information about the MLton-commit mailing list