Initial revision
authorAdam Chlipala <adamc@hcoop.net>
Sat, 2 Aug 2003 16:00:41 +0000 (16:00 +0000)
committerAdam Chlipala <adamc@hcoop.net>
Sat, 2 Aug 2003 16:00:41 +0000 (16:00 +0000)
201 files changed:
.cvsignore [new file with mode: 0644]
libpq/.cvsignore [new file with mode: 0644]
libpq/FFI/.cvsignore [new file with mode: 0644]
libpq/FFI/README [new file with mode: 0644]
libpq/FFI/callop-0.sml [new file with mode: 0644]
libpq/FFI/callop-1.sml [new file with mode: 0644]
libpq/FFI/callop-10.sml [new file with mode: 0644]
libpq/FFI/callop-11.sml [new file with mode: 0644]
libpq/FFI/callop-12.sml [new file with mode: 0644]
libpq/FFI/callop-13.sml [new file with mode: 0644]
libpq/FFI/callop-14.sml [new file with mode: 0644]
libpq/FFI/callop-15.sml [new file with mode: 0644]
libpq/FFI/callop-16.sml [new file with mode: 0644]
libpq/FFI/callop-17.sml [new file with mode: 0644]
libpq/FFI/callop-18.sml [new file with mode: 0644]
libpq/FFI/callop-19.sml [new file with mode: 0644]
libpq/FFI/callop-2.sml [new file with mode: 0644]
libpq/FFI/callop-20.sml [new file with mode: 0644]
libpq/FFI/callop-21.sml [new file with mode: 0644]
libpq/FFI/callop-22.sml [new file with mode: 0644]
libpq/FFI/callop-23.sml [new file with mode: 0644]
libpq/FFI/callop-24.sml [new file with mode: 0644]
libpq/FFI/callop-25.sml [new file with mode: 0644]
libpq/FFI/callop-26.sml [new file with mode: 0644]
libpq/FFI/callop-27.sml [new file with mode: 0644]
libpq/FFI/callop-28.sml [new file with mode: 0644]
libpq/FFI/callop-29.sml [new file with mode: 0644]
libpq/FFI/callop-3.sml [new file with mode: 0644]
libpq/FFI/callop-4.sml [new file with mode: 0644]
libpq/FFI/callop-5.sml [new file with mode: 0644]
libpq/FFI/callop-6.sml [new file with mode: 0644]
libpq/FFI/callop-7.sml [new file with mode: 0644]
libpq/FFI/callop-8.sml [new file with mode: 0644]
libpq/FFI/callop-9.sml [new file with mode: 0644]
libpq/FFI/e--ConnStatusType.sml [new file with mode: 0644]
libpq/FFI/e--ExecStatusType.sml [new file with mode: 0644]
libpq/FFI/e--PostgresPollingStatusType.sml [new file with mode: 0644]
libpq/FFI/et--ConnStatusType.sml [new file with mode: 0644]
libpq/FFI/et--ExecStatusType.sml [new file with mode: 0644]
libpq/FFI/et--PostgresPollingStatusType.sml [new file with mode: 0644]
libpq/FFI/f-PQbackendPID.sml [new file with mode: 0644]
libpq/FFI/f-PQbinaryTuples.sml [new file with mode: 0644]
libpq/FFI/f-PQclear.sml [new file with mode: 0644]
libpq/FFI/f-PQclientEncoding.sml [new file with mode: 0644]
libpq/FFI/f-PQcmdStatus.sml [new file with mode: 0644]
libpq/FFI/f-PQcmdTuples.sml [new file with mode: 0644]
libpq/FFI/f-PQconndefaults.sml [new file with mode: 0644]
libpq/FFI/f-PQconnectPoll.sml [new file with mode: 0644]
libpq/FFI/f-PQconnectStart.sml [new file with mode: 0644]
libpq/FFI/f-PQconnectdb.sml [new file with mode: 0644]
libpq/FFI/f-PQconninfoFree.sml [new file with mode: 0644]
libpq/FFI/f-PQconsumeInput.sml [new file with mode: 0644]
libpq/FFI/f-PQdb.sml [new file with mode: 0644]
libpq/FFI/f-PQdisplayTuples.sml [new file with mode: 0644]
libpq/FFI/f-PQendcopy.sml [new file with mode: 0644]
libpq/FFI/f-PQenv2encoding.sml [new file with mode: 0644]
libpq/FFI/f-PQerrorMessage.sml [new file with mode: 0644]
libpq/FFI/f-PQescapeBytea.sml [new file with mode: 0644]
libpq/FFI/f-PQescapeString.sml [new file with mode: 0644]
libpq/FFI/f-PQexec.sml [new file with mode: 0644]
libpq/FFI/f-PQfinish.sml [new file with mode: 0644]
libpq/FFI/f-PQflush.sml [new file with mode: 0644]
libpq/FFI/f-PQfmod.sml [new file with mode: 0644]
libpq/FFI/f-PQfn.sml [new file with mode: 0644]
libpq/FFI/f-PQfname.sml [new file with mode: 0644]
libpq/FFI/f-PQfnumber.sml [new file with mode: 0644]
libpq/FFI/f-PQfreeNotify.sml [new file with mode: 0644]
libpq/FFI/f-PQfsize.sml [new file with mode: 0644]
libpq/FFI/f-PQftype.sml [new file with mode: 0644]
libpq/FFI/f-PQgetResult.sml [new file with mode: 0644]
libpq/FFI/f-PQgetisnull.sml [new file with mode: 0644]
libpq/FFI/f-PQgetlength.sml [new file with mode: 0644]
libpq/FFI/f-PQgetline.sml [new file with mode: 0644]
libpq/FFI/f-PQgetlineAsync.sml [new file with mode: 0644]
libpq/FFI/f-PQgetvalue.sml [new file with mode: 0644]
libpq/FFI/f-PQhost.sml [new file with mode: 0644]
libpq/FFI/f-PQisBusy.sml [new file with mode: 0644]
libpq/FFI/f-PQisnonblocking.sml [new file with mode: 0644]
libpq/FFI/f-PQmakeEmptyPGresult.sml [new file with mode: 0644]
libpq/FFI/f-PQmblen.sml [new file with mode: 0644]
libpq/FFI/f-PQnfields.sml [new file with mode: 0644]
libpq/FFI/f-PQnotifies.sml [new file with mode: 0644]
libpq/FFI/f-PQntuples.sml [new file with mode: 0644]
libpq/FFI/f-PQoidStatus.sml [new file with mode: 0644]
libpq/FFI/f-PQoidValue.sml [new file with mode: 0644]
libpq/FFI/f-PQoptions.sml [new file with mode: 0644]
libpq/FFI/f-PQpass.sml [new file with mode: 0644]
libpq/FFI/f-PQport.sml [new file with mode: 0644]
libpq/FFI/f-PQprint.sml [new file with mode: 0644]
libpq/FFI/f-PQprintTuples.sml [new file with mode: 0644]
libpq/FFI/f-PQputline.sml [new file with mode: 0644]
libpq/FFI/f-PQputnbytes.sml [new file with mode: 0644]
libpq/FFI/f-PQrequestCancel.sml [new file with mode: 0644]
libpq/FFI/f-PQresStatus.sml [new file with mode: 0644]
libpq/FFI/f-PQreset.sml [new file with mode: 0644]
libpq/FFI/f-PQresetPoll.sml [new file with mode: 0644]
libpq/FFI/f-PQresetStart.sml [new file with mode: 0644]
libpq/FFI/f-PQresultErrorMessage.sml [new file with mode: 0644]
libpq/FFI/f-PQresultStatus.sml [new file with mode: 0644]
libpq/FFI/f-PQsendQuery.sml [new file with mode: 0644]
libpq/FFI/f-PQsetClientEncoding.sml [new file with mode: 0644]
libpq/FFI/f-PQsetNoticeProcessor.sml [new file with mode: 0644]
libpq/FFI/f-PQsetdbLogin.sml [new file with mode: 0644]
libpq/FFI/f-PQsetnonblocking.sml [new file with mode: 0644]
libpq/FFI/f-PQsocket.sml [new file with mode: 0644]
libpq/FFI/f-PQstatus.sml [new file with mode: 0644]
libpq/FFI/f-PQtrace.sml [new file with mode: 0644]
libpq/FFI/f-PQtty.sml [new file with mode: 0644]
libpq/FFI/f-PQuntrace.sml [new file with mode: 0644]
libpq/FFI/f-PQuser.sml [new file with mode: 0644]
libpq/FFI/f-lo_close.sml [new file with mode: 0644]
libpq/FFI/f-lo_creat.sml [new file with mode: 0644]
libpq/FFI/f-lo_export.sml [new file with mode: 0644]
libpq/FFI/f-lo_import.sml [new file with mode: 0644]
libpq/FFI/f-lo_lseek.sml [new file with mode: 0644]
libpq/FFI/f-lo_open.sml [new file with mode: 0644]
libpq/FFI/f-lo_read.sml [new file with mode: 0644]
libpq/FFI/f-lo_tell.sml [new file with mode: 0644]
libpq/FFI/f-lo_unlink.sml [new file with mode: 0644]
libpq/FFI/f-lo_write.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-0.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-1.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-10.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-11.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-12.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-13.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-14.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-15.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-16.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-17.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-18.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-19.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-2.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-20.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-21.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-22.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-23.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-24.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-25.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-26.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-27.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-28.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-29.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-3.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-30.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-31.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-32.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-33.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-34.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-35.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-36.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-37.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-38.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-39.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-4.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-40.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-41.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-42.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-43.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-44.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-45.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-46.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-47.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-48.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-49.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-5.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-6.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-7.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-8.sml [new file with mode: 0644]
libpq/FFI/fptr-rtti-9.sml [new file with mode: 0644]
libpq/FFI/libpq.h.cm [new file with mode: 0644]
libpq/FFI/s--PQArgBlock.sml [new file with mode: 0644]
libpq/FFI/s-_PQconninfoOption.sml [new file with mode: 0644]
libpq/FFI/s-_PQprintOpt.sml [new file with mode: 0644]
libpq/FFI/s-pgNotify.sml [new file with mode: 0644]
libpq/FFI/st--PQArgBlock.sml [new file with mode: 0644]
libpq/FFI/st-_IO_FILE.sml [new file with mode: 0644]
libpq/FFI/st-_PQconninfoOption.sml [new file with mode: 0644]
libpq/FFI/st-_PQprintOpt.sml [new file with mode: 0644]
libpq/FFI/st-pgNotify.sml [new file with mode: 0644]
libpq/FFI/st-pg_conn.sml [new file with mode: 0644]
libpq/FFI/st-pg_result.sml [new file with mode: 0644]
libpq/FFI/t-ConnStatusType.sml [new file with mode: 0644]
libpq/FFI/t-ExecStatusType.sml [new file with mode: 0644]
libpq/FFI/t-PGnotify.sml [new file with mode: 0644]
libpq/FFI/t-PQArgBlock.sml [new file with mode: 0644]
libpq/FFI/t-PQconninfoOption.sml [new file with mode: 0644]
libpq/FFI/t-PQnoticeProcessor.sml [new file with mode: 0644]
libpq/FFI/t-PQprintOpt.sml [new file with mode: 0644]
libpq/FFI/t-PostgresPollingStatusType.sml [new file with mode: 0644]
libpq/FFI/t-pqbool.sml [new file with mode: 0644]
libpq/FFI/u--PQArgBlock-0.sml [new file with mode: 0644]
libpq/FFI/ut--PQArgBlock-0.sml [new file with mode: 0644]
libpq/Makefile [new file with mode: 0644]
libpq/libpq-h.sml [new file with mode: 0644]
libpq/pg.sml [new file with mode: 0644]
libpq/sources.cm [new file with mode: 0644]
smlsql.cm [new file with mode: 0644]
sql_client.sig [new file with mode: 0644]
sql_client.sml [new file with mode: 0644]
sql_driver.sig [new file with mode: 0644]

diff --git a/.cvsignore b/.cvsignore
new file mode 100644 (file)
index 0000000..be80172
--- /dev/null
@@ -0,0 +1 @@
+CM
\ No newline at end of file
diff --git a/libpq/.cvsignore b/libpq/.cvsignore
new file mode 100644 (file)
index 0000000..be80172
--- /dev/null
@@ -0,0 +1 @@
+CM
\ No newline at end of file
diff --git a/libpq/FFI/.cvsignore b/libpq/FFI/.cvsignore
new file mode 100644 (file)
index 0000000..be80172
--- /dev/null
@@ -0,0 +1 @@
+CM
\ No newline at end of file
diff --git a/libpq/FFI/README b/libpq/FFI/README
new file mode 100644 (file)
index 0000000..6625f95
--- /dev/null
@@ -0,0 +1,6 @@
+The things in this directory were generated automatically by SML/NJ
+NLFFI tools. I'm not sure how that works out with redistributing them,
+but here they are all the same! I've actually modified them slightly
+to make an abstract type for connections visible outside this library.
+
+-- Adam
\ No newline at end of file
diff --git a/libpq/FFI/callop-0.sml b/libpq/FFI/callop-0.sml
new file mode 100644 (file)
index 0000000..543b5f0
--- /dev/null
@@ -0,0 +1,10 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_0 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr * CMemory.cc_addr) *
+            (unit * string * string -> unit) list -> unit
+end
diff --git a/libpq/FFI/callop-1.sml b/libpq/FFI/callop-1.sml
new file mode 100644 (file)
index 0000000..6a5716e
--- /dev/null
@@ -0,0 +1,10 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_1 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            CMemory.cc_addr *
+            (unit * string -> Int31.int) list -> CMemory.cc_sint
+end
diff --git a/libpq/FFI/callop-10.sml b/libpq/FFI/callop-10.sml
new file mode 100644 (file)
index 0000000..4279eba
--- /dev/null
@@ -0,0 +1,11 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_10 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr * CMemory.cc_sint) *
+            (unit * string * Int31.int -> Int31.int) list ->
+                CMemory.cc_sint
+end
diff --git a/libpq/FFI/callop-11.sml b/libpq/FFI/callop-11.sml
new file mode 100644 (file)
index 0000000..9d55a66
--- /dev/null
@@ -0,0 +1,23 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_11 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr *
+             CMemory.cc_sint *
+             CMemory.cc_addr *
+             CMemory.cc_addr *
+             CMemory.cc_sint *
+             CMemory.cc_addr *
+             CMemory.cc_sint) *
+            (unit *
+             string *
+             Int31.int *
+             string *
+             string *
+             Int31.int *
+             string *
+             Int31.int -> string) list -> CMemory.cc_addr
+end
diff --git a/libpq/FFI/callop-12.sml b/libpq/FFI/callop-12.sml
new file mode 100644 (file)
index 0000000..2591bd0
--- /dev/null
@@ -0,0 +1,10 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_12 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr * CMemory.cc_sint) *
+            (unit * string * Int31.int -> string) list -> CMemory.cc_addr
+end
diff --git a/libpq/FFI/callop-13.sml b/libpq/FFI/callop-13.sml
new file mode 100644 (file)
index 0000000..b22ac56
--- /dev/null
@@ -0,0 +1,10 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_13 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr * CMemory.cc_addr) *
+            (unit * string * string -> Int31.int) list -> CMemory.cc_sint
+end
diff --git a/libpq/FFI/callop-14.sml b/libpq/FFI/callop-14.sml
new file mode 100644 (file)
index 0000000..d8e5f84
--- /dev/null
@@ -0,0 +1,11 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_14 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr * CMemory.cc_sint) *
+            (unit * string * Int31.int -> Word31.word) list ->
+                CMemory.cc_uint
+end
diff --git a/libpq/FFI/callop-15.sml b/libpq/FFI/callop-15.sml
new file mode 100644 (file)
index 0000000..12c6cb7
--- /dev/null
@@ -0,0 +1,11 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_15 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr * CMemory.cc_sint * CMemory.cc_sint) *
+            (unit * string * Int31.int * Int31.int -> Int31.int) list ->
+                CMemory.cc_sint
+end
diff --git a/libpq/FFI/callop-16.sml b/libpq/FFI/callop-16.sml
new file mode 100644 (file)
index 0000000..3074a85
--- /dev/null
@@ -0,0 +1,11 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_16 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr * CMemory.cc_addr * CMemory.cc_sint) *
+            (unit * string * string * Int31.int -> Int31.int) list ->
+                CMemory.cc_sint
+end
diff --git a/libpq/FFI/callop-17.sml b/libpq/FFI/callop-17.sml
new file mode 100644 (file)
index 0000000..1aad7a9
--- /dev/null
@@ -0,0 +1,11 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_17 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr * CMemory.cc_sint * CMemory.cc_sint) *
+            (unit * string * Int31.int * Int31.int -> string) list ->
+                CMemory.cc_addr
+end
diff --git a/libpq/FFI/callop-18.sml b/libpq/FFI/callop-18.sml
new file mode 100644 (file)
index 0000000..a3dbb45
--- /dev/null
@@ -0,0 +1,10 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_18 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            CMemory.cc_addr *
+            (unit * string -> Word31.word) list -> CMemory.cc_uint
+end
diff --git a/libpq/FFI/callop-19.sml b/libpq/FFI/callop-19.sml
new file mode 100644 (file)
index 0000000..d5862c2
--- /dev/null
@@ -0,0 +1,10 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_19 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr * CMemory.cc_addr * CMemory.cc_addr) *
+            (unit * string * string * string -> unit) list -> unit
+end
diff --git a/libpq/FFI/callop-2.sml b/libpq/FFI/callop-2.sml
new file mode 100644 (file)
index 0000000..f541bc5
--- /dev/null
@@ -0,0 +1,9 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_2 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word * CMemory.cc_addr * (unit * string -> unit) list ->
+                unit
+end
diff --git a/libpq/FFI/callop-20.sml b/libpq/FFI/callop-20.sml
new file mode 100644 (file)
index 0000000..e9d96bd
--- /dev/null
@@ -0,0 +1,15 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_20 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr *
+             CMemory.cc_addr *
+             CMemory.cc_sint *
+             CMemory.cc_sint *
+             CMemory.cc_sint) *
+            (unit * string * string * Int31.int * Int31.int * Int31.int ->
+                 unit) list -> unit
+end
diff --git a/libpq/FFI/callop-21.sml b/libpq/FFI/callop-21.sml
new file mode 100644 (file)
index 0000000..aa7d18e
--- /dev/null
@@ -0,0 +1,10 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_21 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            CMemory.cc_sint *
+            (unit * Int31.int -> string) list -> CMemory.cc_addr
+end
diff --git a/libpq/FFI/callop-22.sml b/libpq/FFI/callop-22.sml
new file mode 100644 (file)
index 0000000..6a61f3e
--- /dev/null
@@ -0,0 +1,11 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_22 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr * CMemory.cc_addr * CMemory.cc_addr) *
+            (unit * string * string * string -> string) list ->
+                CMemory.cc_addr
+end
diff --git a/libpq/FFI/callop-23.sml b/libpq/FFI/callop-23.sml
new file mode 100644 (file)
index 0000000..5e60955
--- /dev/null
@@ -0,0 +1,23 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_23 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr *
+             CMemory.cc_addr *
+             CMemory.cc_addr *
+             CMemory.cc_addr *
+             CMemory.cc_addr *
+             CMemory.cc_addr *
+             CMemory.cc_addr) *
+            (unit *
+             string *
+             string *
+             string *
+             string *
+             string *
+             string *
+             string -> string) list -> CMemory.cc_addr
+end
diff --git a/libpq/FFI/callop-24.sml b/libpq/FFI/callop-24.sml
new file mode 100644 (file)
index 0000000..f0088a6
--- /dev/null
@@ -0,0 +1,11 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_24 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr * CMemory.cc_uint * CMemory.cc_addr) *
+            (unit * string * Word31.word * string -> Int31.int) list ->
+                CMemory.cc_sint
+end
diff --git a/libpq/FFI/callop-25.sml b/libpq/FFI/callop-25.sml
new file mode 100644 (file)
index 0000000..39f8f4d
--- /dev/null
@@ -0,0 +1,11 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_25 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr * CMemory.cc_addr) *
+            (unit * string * string -> Word31.word) list ->
+                CMemory.cc_uint
+end
diff --git a/libpq/FFI/callop-26.sml b/libpq/FFI/callop-26.sml
new file mode 100644 (file)
index 0000000..e2c853a
--- /dev/null
@@ -0,0 +1,14 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_26 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr *
+             CMemory.cc_sint *
+             CMemory.cc_sint *
+             CMemory.cc_sint) *
+            (unit * string * Int31.int * Int31.int * Int31.int ->
+                 Int31.int) list -> CMemory.cc_sint
+end
diff --git a/libpq/FFI/callop-27.sml b/libpq/FFI/callop-27.sml
new file mode 100644 (file)
index 0000000..3ddb42d
--- /dev/null
@@ -0,0 +1,11 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_27 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr * CMemory.cc_uint * CMemory.cc_sint) *
+            (unit * string * Word31.word * Int31.int -> Int31.int) list ->
+                CMemory.cc_sint
+end
diff --git a/libpq/FFI/callop-28.sml b/libpq/FFI/callop-28.sml
new file mode 100644 (file)
index 0000000..4f1bd04
--- /dev/null
@@ -0,0 +1,14 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_28 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr *
+             CMemory.cc_sint *
+             CMemory.cc_addr *
+             CMemory.cc_uint) *
+            (unit * string * Int31.int * string * Word31.word ->
+                 Int31.int) list -> CMemory.cc_sint
+end
diff --git a/libpq/FFI/callop-29.sml b/libpq/FFI/callop-29.sml
new file mode 100644 (file)
index 0000000..f909996
--- /dev/null
@@ -0,0 +1,11 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_29 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr * CMemory.cc_uint) *
+            (unit * string * Word31.word -> Int31.int) list ->
+                CMemory.cc_sint
+end
diff --git a/libpq/FFI/callop-3.sml b/libpq/FFI/callop-3.sml
new file mode 100644 (file)
index 0000000..247dcbf
--- /dev/null
@@ -0,0 +1,9 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_3 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word * CMemory.cc_addr * (unit * string -> string) list ->
+                CMemory.cc_addr
+end
diff --git a/libpq/FFI/callop-4.sml b/libpq/FFI/callop-4.sml
new file mode 100644 (file)
index 0000000..67785aa
--- /dev/null
@@ -0,0 +1,8 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_4 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word * unit * (unit -> string) list -> CMemory.cc_addr
+end
diff --git a/libpq/FFI/callop-5.sml b/libpq/FFI/callop-5.sml
new file mode 100644 (file)
index 0000000..b0e4389
--- /dev/null
@@ -0,0 +1,21 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_5 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr *
+             CMemory.cc_addr *
+             CMemory.cc_sint *
+             CMemory.cc_addr *
+             CMemory.cc_sint *
+             CMemory.cc_sint) *
+            (unit *
+             string *
+             string *
+             Int31.int *
+             string *
+             Int31.int *
+             Int31.int -> unit) list -> unit
+end
diff --git a/libpq/FFI/callop-6.sml b/libpq/FFI/callop-6.sml
new file mode 100644 (file)
index 0000000..dd2c0a9
--- /dev/null
@@ -0,0 +1,9 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_6 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word * unit * (unit -> Int31.int) list ->
+                CMemory.cc_sint
+end
diff --git a/libpq/FFI/callop-7.sml b/libpq/FFI/callop-7.sml
new file mode 100644 (file)
index 0000000..5453532
--- /dev/null
@@ -0,0 +1,11 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_7 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr * CMemory.cc_uint * CMemory.cc_addr) *
+            (unit * string * Word31.word * string -> string) list ->
+                CMemory.cc_addr
+end
diff --git a/libpq/FFI/callop-8.sml b/libpq/FFI/callop-8.sml
new file mode 100644 (file)
index 0000000..1db99c0
--- /dev/null
@@ -0,0 +1,11 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_8 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr * CMemory.cc_addr * CMemory.cc_uint) *
+            (unit * string * string * Word31.word -> Word31.word) list ->
+                CMemory.cc_uint
+end
diff --git a/libpq/FFI/callop-9.sml b/libpq/FFI/callop-9.sml
new file mode 100644 (file)
index 0000000..4597686
--- /dev/null
@@ -0,0 +1,10 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+structure Callop_9 = struct
+    val callop =
+        RawMemInlineT.rawccall :
+            Word32.word *
+            (CMemory.cc_addr * CMemory.cc_addr) *
+            (unit * string * string -> string) list -> CMemory.cc_addr
+end
diff --git a/libpq/FFI/e--ConnStatusType.sml b/libpq/FFI/e--ConnStatusType.sml
new file mode 100644 (file)
index 0000000..8c4b6db
--- /dev/null
@@ -0,0 +1,25 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":38.1-60.17] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C in
+structure E_'ConnStatusType = struct
+    open ET_'ConnStatusType
+    type mlrep = MLRep.Signed.int
+    val e_CONNECTION_OK = 0 : mlrep
+    val e_CONNECTION_BAD = 1 : mlrep
+    val e_CONNECTION_STARTED = 2 : mlrep
+    val e_CONNECTION_MADE = 3 : mlrep
+    val e_CONNECTION_AWAITING_RESPONSE = 4 : mlrep
+    val e_CONNECTION_AUTH_OK = 5 : mlrep
+    val e_CONNECTION_SETENV = 6 : mlrep
+    fun m2i (x : mlrep) = x : MLRep.Signed.int
+    fun i2m (x : MLRep.Signed.int) = x : mlrep
+    fun c x = Cvt.i2c_enum (m2i x) : tag enum
+    fun ml (x : tag enum) = i2m (Cvt.c2i_enum x)
+    fun get' (x : (tag, 'c) enum_obj') = i2m (Get.enum' x)
+    fun set' (x : (tag, rw) enum_obj', v) = Set.enum' (x, m2i v)
+    fun get (x : (tag, 'c) enum_obj) = i2m (Get.enum x)
+    fun set (x : (tag, rw) enum_obj, v) = Set.enum (x, m2i v)
+end
+end (* local *)
diff --git a/libpq/FFI/e--ExecStatusType.sml b/libpq/FFI/e--ExecStatusType.sml
new file mode 100644 (file)
index 0000000..fc44347
--- /dev/null
@@ -0,0 +1,26 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":71.1-86.17] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C in
+structure E_'ExecStatusType = struct
+    open ET_'ExecStatusType
+    type mlrep = MLRep.Signed.int
+    val e_PGRES_EMPTY_QUERY = 0 : mlrep
+    val e_PGRES_COMMAND_OK = 1 : mlrep
+    val e_PGRES_TUPLES_OK = 2 : mlrep
+    val e_PGRES_COPY_OUT = 3 : mlrep
+    val e_PGRES_COPY_IN = 4 : mlrep
+    val e_PGRES_BAD_RESPONSE = 5 : mlrep
+    val e_PGRES_NONFATAL_ERROR = 6 : mlrep
+    val e_PGRES_FATAL_ERROR = 7 : mlrep
+    fun m2i (x : mlrep) = x : MLRep.Signed.int
+    fun i2m (x : MLRep.Signed.int) = x : mlrep
+    fun c x = Cvt.i2c_enum (m2i x) : tag enum
+    fun ml (x : tag enum) = i2m (Cvt.c2i_enum x)
+    fun get' (x : (tag, 'c) enum_obj') = i2m (Get.enum' x)
+    fun set' (x : (tag, rw) enum_obj', v) = Set.enum' (x, m2i v)
+    fun get (x : (tag, 'c) enum_obj) = i2m (Get.enum x)
+    fun set (x : (tag, rw) enum_obj, v) = Set.enum (x, m2i v)
+end
+end (* local *)
diff --git a/libpq/FFI/e--PostgresPollingStatusType.sml b/libpq/FFI/e--PostgresPollingStatusType.sml
new file mode 100644 (file)
index 0000000..d62f96a
--- /dev/null
@@ -0,0 +1,23 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":62.1-69.28] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C in
+structure E_'PostgresPollingStatusType = struct
+    open ET_'PostgresPollingStatusType
+    type mlrep = MLRep.Signed.int
+    val e_PGRES_POLLING_FAILED = 0 : mlrep
+    val e_PGRES_POLLING_READING = 1 : mlrep
+    val e_PGRES_POLLING_WRITING = 2 : mlrep
+    val e_PGRES_POLLING_OK = 3 : mlrep
+    val e_PGRES_POLLING_ACTIVE = 4 : mlrep
+    fun m2i (x : mlrep) = x : MLRep.Signed.int
+    fun i2m (x : MLRep.Signed.int) = x : mlrep
+    fun c x = Cvt.i2c_enum (m2i x) : tag enum
+    fun ml (x : tag enum) = i2m (Cvt.c2i_enum x)
+    fun get' (x : (tag, 'c) enum_obj') = i2m (Get.enum' x)
+    fun set' (x : (tag, rw) enum_obj', v) = Set.enum' (x, m2i v)
+    fun get (x : (tag, 'c) enum_obj) = i2m (Get.enum x)
+    fun set (x : (tag, rw) enum_obj, v) = Set.enum (x, m2i v)
+end
+end (* local *)
diff --git a/libpq/FFI/et--ConnStatusType.sml b/libpq/FFI/et--ConnStatusType.sml
new file mode 100644 (file)
index 0000000..3c95401
--- /dev/null
@@ -0,0 +1,16 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":38.1-60.17] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    structure E_'ConnStatusType = struct
+        local
+            open Tag
+        in
+            type tag =
+                e t_' t_C t_o t_n t_n t_S t_t t_a t_t t_u t_s t_T t_y t_p t_e
+        end
+    end
+in
+    structure ET_'ConnStatusType = E_'ConnStatusType
+end
diff --git a/libpq/FFI/et--ExecStatusType.sml b/libpq/FFI/et--ExecStatusType.sml
new file mode 100644 (file)
index 0000000..87468ce
--- /dev/null
@@ -0,0 +1,16 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":71.1-86.17] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    structure E_'ExecStatusType = struct
+        local
+            open Tag
+        in
+            type tag =
+                e t_' t_E t_x t_e t_c t_S t_t t_a t_t t_u t_s t_T t_y t_p t_e
+        end
+    end
+in
+    structure ET_'ExecStatusType = E_'ExecStatusType
+end
diff --git a/libpq/FFI/et--PostgresPollingStatusType.sml b/libpq/FFI/et--PostgresPollingStatusType.sml
new file mode 100644 (file)
index 0000000..08aa386
--- /dev/null
@@ -0,0 +1,16 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":62.1-69.28] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    structure E_'PostgresPollingStatusType = struct
+        local
+            open Tag
+        in
+            type tag =
+                e t_' t_P t_o t_s t_t t_g t_r t_e t_s t_P t_o t_l t_l t_i t_n t_g t_S t_t t_a t_t t_u t_s t_T t_y t_p t_e
+        end
+    end
+in
+    structure ET_'PostgresPollingStatusType = E_'PostgresPollingStatusType
+end
diff --git a/libpq/FFI/f-PQbackendPID.sml b/libpq/FFI/f-PQbackendPID.sml
new file mode 100644 (file)
index 0000000..6bc7114
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":230.1-44] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQbackendPID"
+in
+structure F_PQbackendPID : sig
+    val typ : ((ST_pg_conn.tag, ro) su_obj ptr' -> sint) fptr T.typ
+    val fptr : unit -> ((ST_pg_conn.tag, ro) su_obj ptr' -> sint) fptr
+    val f : (ST_pg_conn.tag, ro) su_obj ptr -> MLRep.Signed.int
+    val f' : (ST_pg_conn.tag, ro) su_obj ptr' -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_1.typ
+    fun fptr () = mk_fptr (FPtrRTTI_1.mkcall, h ())
+    fun f x1 = Cvt.ml_sint (call (fptr (), Light.ptr x1))
+    fun f' x1 = Cvt.ml_sint (call (fptr (), x1))
+end
+end
diff --git a/libpq/FFI/f-PQbinaryTuples.sml b/libpq/FFI/f-PQbinaryTuples.sml
new file mode 100644 (file)
index 0000000..1180683
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":301.1-47] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQbinaryTuples"
+in
+structure F_PQbinaryTuples : sig
+    val typ : ((ST_pg_result.tag, ro) su_obj ptr' -> sint) fptr T.typ
+    val fptr : unit -> ((ST_pg_result.tag, ro) su_obj ptr' -> sint) fptr
+    val f : (ST_pg_result.tag, ro) su_obj ptr -> MLRep.Signed.int
+    val f' : (ST_pg_result.tag, ro) su_obj ptr' -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_2.typ
+    fun fptr () = mk_fptr (FPtrRTTI_2.mkcall, h ())
+    fun f x1 = Cvt.ml_sint (call (fptr (), Light.ptr x1))
+    fun f' x1 = Cvt.ml_sint (call (fptr (), x1))
+end
+end
diff --git a/libpq/FFI/f-PQclear.sml b/libpq/FFI/f-PQclear.sml
new file mode 100644 (file)
index 0000000..3e5fc15
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":316.1-35] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQclear"
+in
+structure F_PQclear : sig
+    val typ : ((ST_pg_result.tag, rw) su_obj ptr' -> unit) fptr T.typ
+    val fptr : unit -> ((ST_pg_result.tag, rw) su_obj ptr' -> unit) fptr
+    val f : (ST_pg_result.tag, rw) su_obj ptr -> unit
+    val f' : (ST_pg_result.tag, rw) su_obj ptr' -> unit
+end = struct
+    val typ = FPtrRTTI_3.typ
+    fun fptr () = mk_fptr (FPtrRTTI_3.mkcall, h ())
+    fun f x1 = call (fptr (), Light.ptr x1)
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-PQclientEncoding.sml b/libpq/FFI/f-PQclientEncoding.sml
new file mode 100644 (file)
index 0000000..060471a
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":231.1-48] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQclientEncoding"
+in
+structure F_PQclientEncoding : sig
+    val typ : ((ST_pg_conn.tag, ro) su_obj ptr' -> sint) fptr T.typ
+    val fptr : unit -> ((ST_pg_conn.tag, ro) su_obj ptr' -> sint) fptr
+    val f : (ST_pg_conn.tag, ro) su_obj ptr -> MLRep.Signed.int
+    val f' : (ST_pg_conn.tag, ro) su_obj ptr' -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_1.typ
+    fun fptr () = mk_fptr (FPtrRTTI_1.mkcall, h ())
+    fun f x1 = Cvt.ml_sint (call (fptr (), Light.ptr x1))
+    fun f' x1 = Cvt.ml_sint (call (fptr (), x1))
+end
+end
diff --git a/libpq/FFI/f-PQcmdStatus.sml b/libpq/FFI/f-PQcmdStatus.sml
new file mode 100644 (file)
index 0000000..449a7d9
--- /dev/null
@@ -0,0 +1,24 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":307.1-40] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQcmdStatus"
+in
+structure F_PQcmdStatus : sig
+    val typ :
+        ((ST_pg_result.tag, rw) su_obj ptr' -> rw uchar_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_result.tag, rw) su_obj ptr' -> rw uchar_obj ptr') fptr
+    val f : (ST_pg_result.tag, rw) su_obj ptr -> rw uchar_obj ptr
+    val f' : (ST_pg_result.tag, rw) su_obj ptr' -> rw uchar_obj ptr'
+end = struct
+    val typ = FPtrRTTI_4.typ
+    fun fptr () = mk_fptr (FPtrRTTI_4.mkcall, h ())
+    fun f x1
+        = Heavy.ptr (T.pointer T.uchar) (call (fptr (), Light.ptr x1))
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-PQcmdTuples.sml b/libpq/FFI/f-PQcmdTuples.sml
new file mode 100644 (file)
index 0000000..97bd45a
--- /dev/null
@@ -0,0 +1,24 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":310.1-40] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQcmdTuples"
+in
+structure F_PQcmdTuples : sig
+    val typ :
+        ((ST_pg_result.tag, rw) su_obj ptr' -> rw uchar_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_result.tag, rw) su_obj ptr' -> rw uchar_obj ptr') fptr
+    val f : (ST_pg_result.tag, rw) su_obj ptr -> rw uchar_obj ptr
+    val f' : (ST_pg_result.tag, rw) su_obj ptr' -> rw uchar_obj ptr'
+end = struct
+    val typ = FPtrRTTI_4.typ
+    fun fptr () = mk_fptr (FPtrRTTI_4.mkcall, h ())
+    fun f x1
+        = Heavy.ptr (T.pointer T.uchar) (call (fptr (), Light.ptr x1))
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-PQconndefaults.sml b/libpq/FFI/f-PQconndefaults.sml
new file mode 100644 (file)
index 0000000..10a447c
--- /dev/null
@@ -0,0 +1,24 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":200.1-46] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQconndefaults"
+in
+structure F_PQconndefaults : sig
+    val typ :
+        (unit -> (ST__PQconninfoOption.tag, rw) su_obj ptr') fptr T.typ
+    val fptr :
+        unit -> (unit -> (ST__PQconninfoOption.tag, rw) su_obj ptr') fptr
+    val f : unit -> (ST__PQconninfoOption.tag, rw) su_obj ptr
+    val f' : unit -> (ST__PQconninfoOption.tag, rw) su_obj ptr'
+end = struct
+    val typ = FPtrRTTI_5.typ
+    fun fptr () = mk_fptr (FPtrRTTI_5.mkcall, h ())
+    fun f ()
+        = Heavy.ptr
+              (T.pointer ST__PQconninfoOption.typ) (call (fptr (), ()))
+    fun f' () = call (fptr (), ())
+end
+end
diff --git a/libpq/FFI/f-PQconnectPoll.sml b/libpq/FFI/f-PQconnectPoll.sml
new file mode 100644 (file)
index 0000000..e69f97b
--- /dev/null
@@ -0,0 +1,25 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":184.1-61] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQconnectPoll"
+in
+structure F_PQconnectPoll : sig
+    val typ :
+        ((ST_pg_conn.tag, rw) su_obj ptr' ->
+             ET_'PostgresPollingStatusType.tag enum) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, rw) su_obj ptr' ->
+                 ET_'PostgresPollingStatusType.tag enum) fptr
+    val f : (ST_pg_conn.tag, rw) su_obj ptr -> MLRep.Signed.int
+    val f' : (ST_pg_conn.tag, rw) su_obj ptr' -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_6.typ
+    fun fptr () = mk_fptr (FPtrRTTI_6.mkcall, h ())
+    fun f x1 = Cvt.c2i_enum (call (fptr (), Light.ptr x1))
+    fun f' x1 = Cvt.c2i_enum (call (fptr (), x1))
+end
+end
diff --git a/libpq/FFI/f-PQconnectStart.sml b/libpq/FFI/f-PQconnectStart.sml
new file mode 100644 (file)
index 0000000..3fbe898
--- /dev/null
@@ -0,0 +1,21 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":183.1-52] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQconnectStart"
+in
+structure F_PQconnectStart : sig
+    val typ :
+        (ro uchar_obj ptr' -> (ST_pg_conn.tag, rw) su_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            (ro uchar_obj ptr' -> (ST_pg_conn.tag, rw) su_obj ptr') fptr
+    val f' : ro uchar_obj ptr' -> (ST_pg_conn.tag, rw) su_obj ptr'
+end = struct
+    val typ = FPtrRTTI_7.typ
+    fun fptr () = mk_fptr (FPtrRTTI_7.mkcall, h ())
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-PQconnectdb.sml b/libpq/FFI/f-PQconnectdb.sml
new file mode 100644 (file)
index 0000000..feffd27
--- /dev/null
@@ -0,0 +1,21 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":187.1-49] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQconnectdb"
+in
+structure F_PQconnectdb : sig
+    val typ :
+        (ro uchar_obj ptr' -> (ST_pg_conn.tag, rw) su_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            (ro uchar_obj ptr' -> (ST_pg_conn.tag, rw) su_obj ptr') fptr
+    val f' : ro uchar_obj ptr' -> (ST_pg_conn.tag, rw) su_obj ptr'
+end = struct
+    val typ = FPtrRTTI_7.typ
+    fun fptr () = mk_fptr (FPtrRTTI_7.mkcall, h ())
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-PQconninfoFree.sml b/libpq/FFI/f-PQconninfoFree.sml
new file mode 100644 (file)
index 0000000..6968d8e
--- /dev/null
@@ -0,0 +1,22 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":203.1-58] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQconninfoFree"
+in
+structure F_PQconninfoFree : sig
+    val typ :
+        ((ST__PQconninfoOption.tag, rw) su_obj ptr' -> unit) fptr T.typ
+    val fptr :
+        unit -> ((ST__PQconninfoOption.tag, rw) su_obj ptr' -> unit) fptr
+    val f : (ST__PQconninfoOption.tag, rw) su_obj ptr -> unit
+    val f' : (ST__PQconninfoOption.tag, rw) su_obj ptr' -> unit
+end = struct
+    val typ = FPtrRTTI_8.typ
+    fun fptr () = mk_fptr (FPtrRTTI_8.mkcall, h ())
+    fun f x1 = call (fptr (), Light.ptr x1)
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-PQconsumeInput.sml b/libpq/FFI/f-PQconsumeInput.sml
new file mode 100644 (file)
index 0000000..8127e84
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":267.1-40] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQconsumeInput"
+in
+structure F_PQconsumeInput : sig
+    val typ : ((ST_pg_conn.tag, rw) su_obj ptr' -> sint) fptr T.typ
+    val fptr : unit -> ((ST_pg_conn.tag, rw) su_obj ptr' -> sint) fptr
+    val f : (ST_pg_conn.tag, rw) su_obj ptr -> MLRep.Signed.int
+    val f' : (ST_pg_conn.tag, rw) su_obj ptr' -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_9.typ
+    fun fptr () = mk_fptr (FPtrRTTI_9.mkcall, h ())
+    fun f x1 = Cvt.ml_sint (call (fptr (), Light.ptr x1))
+    fun f' x1 = Cvt.ml_sint (call (fptr (), x1))
+end
+end
diff --git a/libpq/FFI/f-PQdb.sml b/libpq/FFI/f-PQdb.sml
new file mode 100644 (file)
index 0000000..13acdc7
--- /dev/null
@@ -0,0 +1,24 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":220.1-38] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQdb"
+in
+structure F_PQdb : sig
+    val typ :
+        ((ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr
+    val f : (ST_pg_conn.tag, ro) su_obj ptr -> rw uchar_obj ptr
+    val f' : (ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr'
+end = struct
+    val typ = FPtrRTTI_10.typ
+    fun fptr () = mk_fptr (FPtrRTTI_10.mkcall, h ())
+    fun f x1
+        = Heavy.ptr (T.pointer T.uchar) (call (fptr (), Light.ptr x1))
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-PQdisplayTuples.sml b/libpq/FFI/f-PQdisplayTuples.sml
new file mode 100644 (file)
index 0000000..fc4a6aa
--- /dev/null
@@ -0,0 +1,56 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":335.1-341.15] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQdisplayTuples"
+in
+structure F_PQdisplayTuples : sig
+    val typ :
+        ((ST_pg_result.tag, ro) su_obj ptr' *
+         (ST__IO_FILE.tag, rw) su_obj ptr' *
+         sint *
+         ro uchar_obj ptr' *
+         sint *
+         sint -> unit) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_result.tag, ro) su_obj ptr' *
+             (ST__IO_FILE.tag, rw) su_obj ptr' *
+             sint *
+             ro uchar_obj ptr' *
+             sint *
+             sint -> unit) fptr
+    val f :
+        (ST_pg_result.tag, ro) su_obj ptr *
+        (ST__IO_FILE.tag, rw) su_obj ptr *
+        MLRep.Signed.int *
+        ro uchar_obj ptr *
+        MLRep.Signed.int *
+        MLRep.Signed.int -> unit
+    val f' :
+        (ST_pg_result.tag, ro) su_obj ptr' *
+        (ST__IO_FILE.tag, rw) su_obj ptr' *
+        MLRep.Signed.int *
+        ro uchar_obj ptr' *
+        MLRep.Signed.int *
+        MLRep.Signed.int -> unit
+end = struct
+    val typ = FPtrRTTI_11.typ
+    fun fptr () = mk_fptr (FPtrRTTI_11.mkcall, h ())
+    fun f (x1, x2, x3, x4, x5, x6)
+        = call
+              (fptr (),
+               (Light.ptr x1,
+                Light.ptr x2,
+                Cvt.c_sint x3,
+                Light.ptr x4,
+                Cvt.c_sint x5,
+                Cvt.c_sint x6))
+    fun f' (x1, x2, x3, x4, x5, x6)
+        = call
+              (fptr (),
+               (x1, x2, Cvt.c_sint x3, x4, Cvt.c_sint x5, Cvt.c_sint x6))
+end
+end
diff --git a/libpq/FFI/f-PQendcopy.sml b/libpq/FFI/f-PQendcopy.sml
new file mode 100644 (file)
index 0000000..bfead4c
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":274.1-35] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQendcopy"
+in
+structure F_PQendcopy : sig
+    val typ : ((ST_pg_conn.tag, rw) su_obj ptr' -> sint) fptr T.typ
+    val fptr : unit -> ((ST_pg_conn.tag, rw) su_obj ptr' -> sint) fptr
+    val f : (ST_pg_conn.tag, rw) su_obj ptr -> MLRep.Signed.int
+    val f' : (ST_pg_conn.tag, rw) su_obj ptr' -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_9.typ
+    fun fptr () = mk_fptr (FPtrRTTI_9.mkcall, h ())
+    fun f x1 = Cvt.ml_sint (call (fptr (), Light.ptr x1))
+    fun f' x1 = Cvt.ml_sint (call (fptr (), x1))
+end
+end
diff --git a/libpq/FFI/f-PQenv2encoding.sml b/libpq/FFI/f-PQenv2encoding.sml
new file mode 100644 (file)
index 0000000..dae29ae
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":372.1-32] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQenv2encoding"
+in
+structure F_PQenv2encoding : sig
+    val typ : (unit -> sint) fptr T.typ
+    val fptr : unit -> (unit -> sint) fptr
+    val f : unit -> MLRep.Signed.int
+    val f' : unit -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_12.typ
+    fun fptr () = mk_fptr (FPtrRTTI_12.mkcall, h ())
+    fun f () = Cvt.ml_sint (call (fptr (), ()))
+    fun f' () = Cvt.ml_sint (call (fptr (), ()))
+end
+end
diff --git a/libpq/FFI/f-PQerrorMessage.sml b/libpq/FFI/f-PQerrorMessage.sml
new file mode 100644 (file)
index 0000000..d448503
--- /dev/null
@@ -0,0 +1,24 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":228.1-48] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQerrorMessage"
+in
+structure F_PQerrorMessage : sig
+    val typ :
+        ((ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr
+    val f : (ST_pg_conn.tag, ro) su_obj ptr -> rw uchar_obj ptr
+    val f' : (ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr'
+end = struct
+    val typ = FPtrRTTI_10.typ
+    fun fptr () = mk_fptr (FPtrRTTI_10.mkcall, h ())
+    fun f x1
+        = Heavy.ptr (T.pointer T.uchar) (call (fptr (), Light.ptr x1))
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-PQescapeBytea.sml b/libpq/FFI/f-PQescapeBytea.sml
new file mode 100644 (file)
index 0000000..d1b062d
--- /dev/null
@@ -0,0 +1,32 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":253.1-254.23] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQescapeBytea"
+in
+structure F_PQescapeBytea : sig
+    val typ :
+        (rw uchar_obj ptr' * uint * rw uint_obj ptr' -> rw uchar_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            (rw uchar_obj ptr' * uint * rw uint_obj ptr' ->
+                 rw uchar_obj ptr') fptr
+    val f :
+        rw uchar_obj ptr * MLRep.Unsigned.word * rw uint_obj ptr ->
+            rw uchar_obj ptr
+    val f' :
+        rw uchar_obj ptr' * MLRep.Unsigned.word * rw uint_obj ptr' ->
+            rw uchar_obj ptr'
+end = struct
+    val typ = FPtrRTTI_13.typ
+    fun fptr () = mk_fptr (FPtrRTTI_13.mkcall, h ())
+    fun f (x1, x2, x3)
+        = Heavy.ptr
+              (T.pointer T.uchar)
+              (call
+                  (fptr (), (Light.ptr x1, Cvt.c_uint x2, Light.ptr x3)))
+    fun f' (x1, x2, x3) = call (fptr (), (x1, Cvt.c_uint x2, x3))
+end
+end
diff --git a/libpq/FFI/f-PQescapeString.sml b/libpq/FFI/f-PQescapeString.sml
new file mode 100644 (file)
index 0000000..c945f00
--- /dev/null
@@ -0,0 +1,31 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":252.1-72] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQescapeString"
+in
+structure F_PQescapeString : sig
+    val typ :
+        (rw uchar_obj ptr' * ro uchar_obj ptr' * uint -> uint) fptr T.typ
+    val fptr :
+        unit ->
+            (rw uchar_obj ptr' * ro uchar_obj ptr' * uint -> uint) fptr
+    val f :
+        rw uchar_obj ptr * ro uchar_obj ptr * MLRep.Unsigned.word ->
+            MLRep.Unsigned.word
+    val f' :
+        rw uchar_obj ptr' * ro uchar_obj ptr' * MLRep.Unsigned.word ->
+            MLRep.Unsigned.word
+end = struct
+    val typ = FPtrRTTI_14.typ
+    fun fptr () = mk_fptr (FPtrRTTI_14.mkcall, h ())
+    fun f (x1, x2, x3)
+        = Cvt.ml_uint
+              (call
+                  (fptr (), (Light.ptr x1, Light.ptr x2, Cvt.c_uint x3)))
+    fun f' (x1, x2, x3)
+        = Cvt.ml_uint (call (fptr (), (x1, x2, Cvt.c_uint x3)))
+end
+end
diff --git a/libpq/FFI/f-PQexec.sml b/libpq/FFI/f-PQexec.sml
new file mode 100644 (file)
index 0000000..762b68d
--- /dev/null
@@ -0,0 +1,25 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":257.1-57] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQexec"
+in
+structure F_PQexec : sig
+    val typ :
+        ((ST_pg_conn.tag, rw) su_obj ptr' * ro uchar_obj ptr' ->
+             (ST_pg_result.tag, rw) su_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, rw) su_obj ptr' * ro uchar_obj ptr' ->
+                 (ST_pg_result.tag, rw) su_obj ptr') fptr
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' * ro uchar_obj ptr' ->
+            (ST_pg_result.tag, rw) su_obj ptr'
+end = struct
+    val typ = FPtrRTTI_15.typ
+    fun fptr () = mk_fptr (FPtrRTTI_15.mkcall, h ())
+    fun f' (x1, x2) = call (fptr (), (x1, x2))
+end
+end
diff --git a/libpq/FFI/f-PQfinish.sml b/libpq/FFI/f-PQfinish.sml
new file mode 100644 (file)
index 0000000..366ac81
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":197.1-35] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQfinish"
+in
+structure F_PQfinish : sig
+    val typ : ((ST_pg_conn.tag, rw) su_obj ptr' -> unit) fptr T.typ
+    val fptr : unit -> ((ST_pg_conn.tag, rw) su_obj ptr' -> unit) fptr
+    val f : (ST_pg_conn.tag, rw) su_obj ptr -> unit
+    val f' : (ST_pg_conn.tag, rw) su_obj ptr' -> unit
+end = struct
+    val typ = FPtrRTTI_16.typ
+    fun fptr () = mk_fptr (FPtrRTTI_16.mkcall, h ())
+    fun f x1 = call (fptr (), Light.ptr x1)
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-PQflush.sml b/libpq/FFI/f-PQflush.sml
new file mode 100644 (file)
index 0000000..e325ce0
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":281.1-33] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQflush"
+in
+structure F_PQflush : sig
+    val typ : ((ST_pg_conn.tag, rw) su_obj ptr' -> sint) fptr T.typ
+    val fptr : unit -> ((ST_pg_conn.tag, rw) su_obj ptr' -> sint) fptr
+    val f : (ST_pg_conn.tag, rw) su_obj ptr -> MLRep.Signed.int
+    val f' : (ST_pg_conn.tag, rw) su_obj ptr' -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_9.typ
+    fun fptr () = mk_fptr (FPtrRTTI_9.mkcall, h ())
+    fun f x1 = Cvt.ml_sint (call (fptr (), Light.ptr x1))
+    fun f' x1 = Cvt.ml_sint (call (fptr (), x1))
+end
+end
diff --git a/libpq/FFI/f-PQfmod.sml b/libpq/FFI/f-PQfmod.sml
new file mode 100644 (file)
index 0000000..51d2739
--- /dev/null
@@ -0,0 +1,27 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":306.1-54] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQfmod"
+in
+structure F_PQfmod : sig
+    val typ :
+        ((ST_pg_result.tag, ro) su_obj ptr' * sint -> sint) fptr T.typ
+    val fptr :
+        unit -> ((ST_pg_result.tag, ro) su_obj ptr' * sint -> sint) fptr
+    val f :
+        (ST_pg_result.tag, ro) su_obj ptr * MLRep.Signed.int ->
+            MLRep.Signed.int
+    val f' :
+        (ST_pg_result.tag, ro) su_obj ptr' * MLRep.Signed.int ->
+            MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_17.typ
+    fun fptr () = mk_fptr (FPtrRTTI_17.mkcall, h ())
+    fun f (x1, x2)
+        = Cvt.ml_sint (call (fptr (), (Light.ptr x1, Cvt.c_sint x2)))
+    fun f' (x1, x2) = Cvt.ml_sint (call (fptr (), (x1, Cvt.c_sint x2)))
+end
+end
diff --git a/libpq/FFI/f-PQfn.sml b/libpq/FFI/f-PQfn.sml
new file mode 100644 (file)
index 0000000..218d59b
--- /dev/null
@@ -0,0 +1,49 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":287.1-293.13] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQfn"
+in
+structure F_PQfn : sig
+    val typ :
+        ((ST_pg_conn.tag, rw) su_obj ptr' *
+         sint *
+         rw sint_obj ptr' *
+         rw sint_obj ptr' *
+         sint *
+         (ST_'PQArgBlock.tag, ro) su_obj ptr' *
+         sint -> (ST_pg_result.tag, rw) su_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, rw) su_obj ptr' *
+             sint *
+             rw sint_obj ptr' *
+             rw sint_obj ptr' *
+             sint *
+             (ST_'PQArgBlock.tag, ro) su_obj ptr' *
+             sint -> (ST_pg_result.tag, rw) su_obj ptr') fptr
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' *
+        MLRep.Signed.int *
+        rw sint_obj ptr' *
+        rw sint_obj ptr' *
+        MLRep.Signed.int *
+        (ST_'PQArgBlock.tag, ro) su_obj ptr' *
+        MLRep.Signed.int -> (ST_pg_result.tag, rw) su_obj ptr'
+end = struct
+    val typ = FPtrRTTI_18.typ
+    fun fptr () = mk_fptr (FPtrRTTI_18.mkcall, h ())
+    fun f' (x1, x2, x3, x4, x5, x6, x7)
+        = call
+              (fptr (),
+               (x1,
+                Cvt.c_sint x2,
+                x3,
+                x4,
+                Cvt.c_sint x5,
+                x6,
+                Cvt.c_sint x7))
+end
+end
diff --git a/libpq/FFI/f-PQfname.sml b/libpq/FFI/f-PQfname.sml
new file mode 100644 (file)
index 0000000..c2810e5
--- /dev/null
@@ -0,0 +1,31 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":302.1-57] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQfname"
+in
+structure F_PQfname : sig
+    val typ :
+        ((ST_pg_result.tag, ro) su_obj ptr' * sint -> rw uchar_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_result.tag, ro) su_obj ptr' * sint ->
+                 rw uchar_obj ptr') fptr
+    val f :
+        (ST_pg_result.tag, ro) su_obj ptr * MLRep.Signed.int ->
+            rw uchar_obj ptr
+    val f' :
+        (ST_pg_result.tag, ro) su_obj ptr' * MLRep.Signed.int ->
+            rw uchar_obj ptr'
+end = struct
+    val typ = FPtrRTTI_19.typ
+    fun fptr () = mk_fptr (FPtrRTTI_19.mkcall, h ())
+    fun f (x1, x2)
+        = Heavy.ptr
+              (T.pointer T.uchar)
+              (call (fptr (), (Light.ptr x1, Cvt.c_sint x2)))
+    fun f' (x1, x2) = call (fptr (), (x1, Cvt.c_sint x2))
+end
+end
diff --git a/libpq/FFI/f-PQfnumber.sml b/libpq/FFI/f-PQfnumber.sml
new file mode 100644 (file)
index 0000000..031957b
--- /dev/null
@@ -0,0 +1,29 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":303.1-66] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQfnumber"
+in
+structure F_PQfnumber : sig
+    val typ :
+        ((ST_pg_result.tag, ro) su_obj ptr' * ro uchar_obj ptr' -> sint) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_result.tag, ro) su_obj ptr' * ro uchar_obj ptr' ->
+                 sint) fptr
+    val f :
+        (ST_pg_result.tag, ro) su_obj ptr * ro uchar_obj ptr ->
+            MLRep.Signed.int
+    val f' :
+        (ST_pg_result.tag, ro) su_obj ptr' * ro uchar_obj ptr' ->
+            MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_20.typ
+    fun fptr () = mk_fptr (FPtrRTTI_20.mkcall, h ())
+    fun f (x1, x2)
+        = Cvt.ml_sint (call (fptr (), (Light.ptr x1, Light.ptr x2)))
+    fun f' (x1, x2) = Cvt.ml_sint (call (fptr (), (x1, x2)))
+end
+end
diff --git a/libpq/FFI/f-PQfreeNotify.sml b/libpq/FFI/f-PQfreeNotify.sml
new file mode 100644 (file)
index 0000000..d035826
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":259.1-43] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQfreeNotify"
+in
+structure F_PQfreeNotify : sig
+    val typ : ((ST_pgNotify.tag, rw) su_obj ptr' -> unit) fptr T.typ
+    val fptr : unit -> ((ST_pgNotify.tag, rw) su_obj ptr' -> unit) fptr
+    val f : (ST_pgNotify.tag, rw) su_obj ptr -> unit
+    val f' : (ST_pgNotify.tag, rw) su_obj ptr' -> unit
+end = struct
+    val typ = FPtrRTTI_21.typ
+    fun fptr () = mk_fptr (FPtrRTTI_21.mkcall, h ())
+    fun f x1 = call (fptr (), Light.ptr x1)
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-PQfsize.sml b/libpq/FFI/f-PQfsize.sml
new file mode 100644 (file)
index 0000000..e68edf4
--- /dev/null
@@ -0,0 +1,27 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":305.1-55] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQfsize"
+in
+structure F_PQfsize : sig
+    val typ :
+        ((ST_pg_result.tag, ro) su_obj ptr' * sint -> sint) fptr T.typ
+    val fptr :
+        unit -> ((ST_pg_result.tag, ro) su_obj ptr' * sint -> sint) fptr
+    val f :
+        (ST_pg_result.tag, ro) su_obj ptr * MLRep.Signed.int ->
+            MLRep.Signed.int
+    val f' :
+        (ST_pg_result.tag, ro) su_obj ptr' * MLRep.Signed.int ->
+            MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_17.typ
+    fun fptr () = mk_fptr (FPtrRTTI_17.mkcall, h ())
+    fun f (x1, x2)
+        = Cvt.ml_sint (call (fptr (), (Light.ptr x1, Cvt.c_sint x2)))
+    fun f' (x1, x2) = Cvt.ml_sint (call (fptr (), (x1, Cvt.c_sint x2)))
+end
+end
diff --git a/libpq/FFI/f-PQftype.sml b/libpq/FFI/f-PQftype.sml
new file mode 100644 (file)
index 0000000..943904a
--- /dev/null
@@ -0,0 +1,27 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":304.1-55] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQftype"
+in
+structure F_PQftype : sig
+    val typ :
+        ((ST_pg_result.tag, ro) su_obj ptr' * sint -> uint) fptr T.typ
+    val fptr :
+        unit -> ((ST_pg_result.tag, ro) su_obj ptr' * sint -> uint) fptr
+    val f :
+        (ST_pg_result.tag, ro) su_obj ptr * MLRep.Signed.int ->
+            MLRep.Unsigned.word
+    val f' :
+        (ST_pg_result.tag, ro) su_obj ptr' * MLRep.Signed.int ->
+            MLRep.Unsigned.word
+end = struct
+    val typ = FPtrRTTI_22.typ
+    fun fptr () = mk_fptr (FPtrRTTI_22.mkcall, h ())
+    fun f (x1, x2)
+        = Cvt.ml_uint (call (fptr (), (Light.ptr x1, Cvt.c_sint x2)))
+    fun f' (x1, x2) = Cvt.ml_uint (call (fptr (), (x1, Cvt.c_sint x2)))
+end
+end
diff --git a/libpq/FFI/f-PQgetResult.sml b/libpq/FFI/f-PQgetResult.sml
new file mode 100644 (file)
index 0000000..1f9ded6
--- /dev/null
@@ -0,0 +1,25 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":263.1-43] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQgetResult"
+in
+structure F_PQgetResult : sig
+    val typ :
+        ((ST_pg_conn.tag, rw) su_obj ptr' ->
+             (ST_pg_result.tag, rw) su_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, rw) su_obj ptr' ->
+                 (ST_pg_result.tag, rw) su_obj ptr') fptr
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' ->
+            (ST_pg_result.tag, rw) su_obj ptr'
+end = struct
+    val typ = FPtrRTTI_23.typ
+    fun fptr () = mk_fptr (FPtrRTTI_23.mkcall, h ())
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-PQgetisnull.sml b/libpq/FFI/f-PQgetisnull.sml
new file mode 100644 (file)
index 0000000..a564556
--- /dev/null
@@ -0,0 +1,33 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":313.1-72] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQgetisnull"
+in
+structure F_PQgetisnull : sig
+    val typ :
+        ((ST_pg_result.tag, ro) su_obj ptr' * sint * sint -> sint) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_result.tag, ro) su_obj ptr' * sint * sint -> sint) fptr
+    val f :
+        (ST_pg_result.tag, ro) su_obj ptr *
+        MLRep.Signed.int *
+        MLRep.Signed.int -> MLRep.Signed.int
+    val f' :
+        (ST_pg_result.tag, ro) su_obj ptr' *
+        MLRep.Signed.int *
+        MLRep.Signed.int -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_24.typ
+    fun fptr () = mk_fptr (FPtrRTTI_24.mkcall, h ())
+    fun f (x1, x2, x3)
+        = Cvt.ml_sint
+              (call
+                  (fptr (), (Light.ptr x1, Cvt.c_sint x2, Cvt.c_sint x3)))
+    fun f' (x1, x2, x3)
+        = Cvt.ml_sint (call (fptr (), (x1, Cvt.c_sint x2, Cvt.c_sint x3)))
+end
+end
diff --git a/libpq/FFI/f-PQgetlength.sml b/libpq/FFI/f-PQgetlength.sml
new file mode 100644 (file)
index 0000000..dee053f
--- /dev/null
@@ -0,0 +1,33 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":312.1-72] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQgetlength"
+in
+structure F_PQgetlength : sig
+    val typ :
+        ((ST_pg_result.tag, ro) su_obj ptr' * sint * sint -> sint) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_result.tag, ro) su_obj ptr' * sint * sint -> sint) fptr
+    val f :
+        (ST_pg_result.tag, ro) su_obj ptr *
+        MLRep.Signed.int *
+        MLRep.Signed.int -> MLRep.Signed.int
+    val f' :
+        (ST_pg_result.tag, ro) su_obj ptr' *
+        MLRep.Signed.int *
+        MLRep.Signed.int -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_24.typ
+    fun fptr () = mk_fptr (FPtrRTTI_24.mkcall, h ())
+    fun f (x1, x2, x3)
+        = Cvt.ml_sint
+              (call
+                  (fptr (), (Light.ptr x1, Cvt.c_sint x2, Cvt.c_sint x3)))
+    fun f' (x1, x2, x3)
+        = Cvt.ml_sint (call (fptr (), (x1, Cvt.c_sint x2, Cvt.c_sint x3)))
+end
+end
diff --git a/libpq/FFI/f-PQgetline.sml b/libpq/FFI/f-PQgetline.sml
new file mode 100644 (file)
index 0000000..e023913
--- /dev/null
@@ -0,0 +1,35 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":270.1-61] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQgetline"
+in
+structure F_PQgetline : sig
+    val typ :
+        ((ST_pg_conn.tag, rw) su_obj ptr' * rw uchar_obj ptr' * sint ->
+             sint) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, rw) su_obj ptr' * rw uchar_obj ptr' * sint ->
+                 sint) fptr
+    val f :
+        (ST_pg_conn.tag, rw) su_obj ptr *
+        rw uchar_obj ptr *
+        MLRep.Signed.int -> MLRep.Signed.int
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' *
+        rw uchar_obj ptr' *
+        MLRep.Signed.int -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_25.typ
+    fun fptr () = mk_fptr (FPtrRTTI_25.mkcall, h ())
+    fun f (x1, x2, x3)
+        = Cvt.ml_sint
+              (call
+                  (fptr (), (Light.ptr x1, Light.ptr x2, Cvt.c_sint x3)))
+    fun f' (x1, x2, x3)
+        = Cvt.ml_sint (call (fptr (), (x1, x2, Cvt.c_sint x3)))
+end
+end
diff --git a/libpq/FFI/f-PQgetlineAsync.sml b/libpq/FFI/f-PQgetlineAsync.sml
new file mode 100644 (file)
index 0000000..382d771
--- /dev/null
@@ -0,0 +1,35 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":272.1-67] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQgetlineAsync"
+in
+structure F_PQgetlineAsync : sig
+    val typ :
+        ((ST_pg_conn.tag, rw) su_obj ptr' * rw uchar_obj ptr' * sint ->
+             sint) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, rw) su_obj ptr' * rw uchar_obj ptr' * sint ->
+                 sint) fptr
+    val f :
+        (ST_pg_conn.tag, rw) su_obj ptr *
+        rw uchar_obj ptr *
+        MLRep.Signed.int -> MLRep.Signed.int
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' *
+        rw uchar_obj ptr' *
+        MLRep.Signed.int -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_25.typ
+    fun fptr () = mk_fptr (FPtrRTTI_25.mkcall, h ())
+    fun f (x1, x2, x3)
+        = Cvt.ml_sint
+              (call
+                  (fptr (), (Light.ptr x1, Light.ptr x2, Cvt.c_sint x3)))
+    fun f' (x1, x2, x3)
+        = Cvt.ml_sint (call (fptr (), (x1, x2, Cvt.c_sint x3)))
+end
+end
diff --git a/libpq/FFI/f-PQgetvalue.sml b/libpq/FFI/f-PQgetvalue.sml
new file mode 100644 (file)
index 0000000..a0b77e4
--- /dev/null
@@ -0,0 +1,36 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":311.1-73] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQgetvalue"
+in
+structure F_PQgetvalue : sig
+    val typ :
+        ((ST_pg_result.tag, ro) su_obj ptr' * sint * sint ->
+             rw uchar_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_result.tag, ro) su_obj ptr' * sint * sint ->
+                 rw uchar_obj ptr') fptr
+    val f :
+        (ST_pg_result.tag, ro) su_obj ptr *
+        MLRep.Signed.int *
+        MLRep.Signed.int -> rw uchar_obj ptr
+    val f' :
+        (ST_pg_result.tag, ro) su_obj ptr' *
+        MLRep.Signed.int *
+        MLRep.Signed.int -> rw uchar_obj ptr'
+end = struct
+    val typ = FPtrRTTI_26.typ
+    fun fptr () = mk_fptr (FPtrRTTI_26.mkcall, h ())
+    fun f (x1, x2, x3)
+        = Heavy.ptr
+              (T.pointer T.uchar)
+              (call
+                  (fptr (), (Light.ptr x1, Cvt.c_sint x2, Cvt.c_sint x3)))
+    fun f' (x1, x2, x3)
+        = call (fptr (), (x1, Cvt.c_sint x2, Cvt.c_sint x3))
+end
+end
diff --git a/libpq/FFI/f-PQhost.sml b/libpq/FFI/f-PQhost.sml
new file mode 100644 (file)
index 0000000..1636c6c
--- /dev/null
@@ -0,0 +1,24 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":223.1-40] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQhost"
+in
+structure F_PQhost : sig
+    val typ :
+        ((ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr
+    val f : (ST_pg_conn.tag, ro) su_obj ptr -> rw uchar_obj ptr
+    val f' : (ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr'
+end = struct
+    val typ = FPtrRTTI_10.typ
+    fun fptr () = mk_fptr (FPtrRTTI_10.mkcall, h ())
+    fun f x1
+        = Heavy.ptr (T.pointer T.uchar) (call (fptr (), Light.ptr x1))
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-PQisBusy.sml b/libpq/FFI/f-PQisBusy.sml
new file mode 100644 (file)
index 0000000..0e873a6
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":266.1-34] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQisBusy"
+in
+structure F_PQisBusy : sig
+    val typ : ((ST_pg_conn.tag, rw) su_obj ptr' -> sint) fptr T.typ
+    val fptr : unit -> ((ST_pg_conn.tag, rw) su_obj ptr' -> sint) fptr
+    val f : (ST_pg_conn.tag, rw) su_obj ptr -> MLRep.Signed.int
+    val f' : (ST_pg_conn.tag, rw) su_obj ptr' -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_9.typ
+    fun fptr () = mk_fptr (FPtrRTTI_9.mkcall, h ())
+    fun f x1 = Cvt.ml_sint (call (fptr (), Light.ptr x1))
+    fun f' x1 = Cvt.ml_sint (call (fptr (), x1))
+end
+end
diff --git a/libpq/FFI/f-PQisnonblocking.sml b/libpq/FFI/f-PQisnonblocking.sml
new file mode 100644 (file)
index 0000000..84487c6
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":278.1-47] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQisnonblocking"
+in
+structure F_PQisnonblocking : sig
+    val typ : ((ST_pg_conn.tag, ro) su_obj ptr' -> sint) fptr T.typ
+    val fptr : unit -> ((ST_pg_conn.tag, ro) su_obj ptr' -> sint) fptr
+    val f : (ST_pg_conn.tag, ro) su_obj ptr -> MLRep.Signed.int
+    val f' : (ST_pg_conn.tag, ro) su_obj ptr' -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_1.typ
+    fun fptr () = mk_fptr (FPtrRTTI_1.mkcall, h ())
+    fun f x1 = Cvt.ml_sint (call (fptr (), Light.ptr x1))
+    fun f' x1 = Cvt.ml_sint (call (fptr (), x1))
+end
+end
diff --git a/libpq/FFI/f-PQmakeEmptyPGresult.sml b/libpq/FFI/f-PQmakeEmptyPGresult.sml
new file mode 100644 (file)
index 0000000..4b3ed7a
--- /dev/null
@@ -0,0 +1,26 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":323.1-74] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQmakeEmptyPGresult"
+in
+structure F_PQmakeEmptyPGresult : sig
+    val typ :
+        ((ST_pg_conn.tag, rw) su_obj ptr' * ET_'ExecStatusType.tag enum ->
+             (ST_pg_result.tag, rw) su_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, rw) su_obj ptr' *
+             ET_'ExecStatusType.tag enum ->
+                 (ST_pg_result.tag, rw) su_obj ptr') fptr
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' * MLRep.Signed.int ->
+            (ST_pg_result.tag, rw) su_obj ptr'
+end = struct
+    val typ = FPtrRTTI_27.typ
+    fun fptr () = mk_fptr (FPtrRTTI_27.mkcall, h ())
+    fun f' (x1, x2) = call (fptr (), (x1, Cvt.i2c_enum x2))
+end
+end
diff --git a/libpq/FFI/f-PQmblen.sml b/libpq/FFI/f-PQmblen.sml
new file mode 100644 (file)
index 0000000..e7abd12
--- /dev/null
@@ -0,0 +1,21 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":369.1-57] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQmblen"
+in
+structure F_PQmblen : sig
+    val typ : (ro uchar_obj ptr' * sint -> sint) fptr T.typ
+    val fptr : unit -> (ro uchar_obj ptr' * sint -> sint) fptr
+    val f : ro uchar_obj ptr * MLRep.Signed.int -> MLRep.Signed.int
+    val f' : ro uchar_obj ptr' * MLRep.Signed.int -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_28.typ
+    fun fptr () = mk_fptr (FPtrRTTI_28.mkcall, h ())
+    fun f (x1, x2)
+        = Cvt.ml_sint (call (fptr (), (Light.ptr x1, Cvt.c_sint x2)))
+    fun f' (x1, x2) = Cvt.ml_sint (call (fptr (), (x1, Cvt.c_sint x2)))
+end
+end
diff --git a/libpq/FFI/f-PQnfields.sml b/libpq/FFI/f-PQnfields.sml
new file mode 100644 (file)
index 0000000..b1dadf5
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":300.1-42] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQnfields"
+in
+structure F_PQnfields : sig
+    val typ : ((ST_pg_result.tag, ro) su_obj ptr' -> sint) fptr T.typ
+    val fptr : unit -> ((ST_pg_result.tag, ro) su_obj ptr' -> sint) fptr
+    val f : (ST_pg_result.tag, ro) su_obj ptr -> MLRep.Signed.int
+    val f' : (ST_pg_result.tag, ro) su_obj ptr' -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_2.typ
+    fun fptr () = mk_fptr (FPtrRTTI_2.mkcall, h ())
+    fun f x1 = Cvt.ml_sint (call (fptr (), Light.ptr x1))
+    fun f' x1 = Cvt.ml_sint (call (fptr (), x1))
+end
+end
diff --git a/libpq/FFI/f-PQnotifies.sml b/libpq/FFI/f-PQnotifies.sml
new file mode 100644 (file)
index 0000000..d850954
--- /dev/null
@@ -0,0 +1,31 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":258.1-42] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQnotifies"
+in
+structure F_PQnotifies : sig
+    val typ :
+        ((ST_pg_conn.tag, rw) su_obj ptr' ->
+             (ST_pgNotify.tag, rw) su_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, rw) su_obj ptr' ->
+                 (ST_pgNotify.tag, rw) su_obj ptr') fptr
+    val f :
+        (ST_pg_conn.tag, rw) su_obj ptr ->
+            (ST_pgNotify.tag, rw) su_obj ptr
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' ->
+            (ST_pgNotify.tag, rw) su_obj ptr'
+end = struct
+    val typ = FPtrRTTI_29.typ
+    fun fptr () = mk_fptr (FPtrRTTI_29.mkcall, h ())
+    fun f x1
+        = Heavy.ptr
+              (T.pointer ST_pgNotify.typ) (call (fptr (), Light.ptr x1))
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-PQntuples.sml b/libpq/FFI/f-PQntuples.sml
new file mode 100644 (file)
index 0000000..978dbee
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":299.1-42] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQntuples"
+in
+structure F_PQntuples : sig
+    val typ : ((ST_pg_result.tag, ro) su_obj ptr' -> sint) fptr T.typ
+    val fptr : unit -> ((ST_pg_result.tag, ro) su_obj ptr' -> sint) fptr
+    val f : (ST_pg_result.tag, ro) su_obj ptr -> MLRep.Signed.int
+    val f' : (ST_pg_result.tag, ro) su_obj ptr' -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_2.typ
+    fun fptr () = mk_fptr (FPtrRTTI_2.mkcall, h ())
+    fun f x1 = Cvt.ml_sint (call (fptr (), Light.ptr x1))
+    fun f' x1 = Cvt.ml_sint (call (fptr (), x1))
+end
+end
diff --git a/libpq/FFI/f-PQoidStatus.sml b/libpq/FFI/f-PQoidStatus.sml
new file mode 100644 (file)
index 0000000..435b8fb
--- /dev/null
@@ -0,0 +1,24 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":308.1-46] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQoidStatus"
+in
+structure F_PQoidStatus : sig
+    val typ :
+        ((ST_pg_result.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_result.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr
+    val f : (ST_pg_result.tag, ro) su_obj ptr -> rw uchar_obj ptr
+    val f' : (ST_pg_result.tag, ro) su_obj ptr' -> rw uchar_obj ptr'
+end = struct
+    val typ = FPtrRTTI_30.typ
+    fun fptr () = mk_fptr (FPtrRTTI_30.mkcall, h ())
+    fun f x1
+        = Heavy.ptr (T.pointer T.uchar) (call (fptr (), Light.ptr x1))
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-PQoidValue.sml b/libpq/FFI/f-PQoidValue.sml
new file mode 100644 (file)
index 0000000..eb330f5
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":309.1-43] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQoidValue"
+in
+structure F_PQoidValue : sig
+    val typ : ((ST_pg_result.tag, ro) su_obj ptr' -> uint) fptr T.typ
+    val fptr : unit -> ((ST_pg_result.tag, ro) su_obj ptr' -> uint) fptr
+    val f : (ST_pg_result.tag, ro) su_obj ptr -> MLRep.Unsigned.word
+    val f' : (ST_pg_result.tag, ro) su_obj ptr' -> MLRep.Unsigned.word
+end = struct
+    val typ = FPtrRTTI_31.typ
+    fun fptr () = mk_fptr (FPtrRTTI_31.mkcall, h ())
+    fun f x1 = Cvt.ml_uint (call (fptr (), Light.ptr x1))
+    fun f' x1 = Cvt.ml_uint (call (fptr (), x1))
+end
+end
diff --git a/libpq/FFI/f-PQoptions.sml b/libpq/FFI/f-PQoptions.sml
new file mode 100644 (file)
index 0000000..1b8663c
--- /dev/null
@@ -0,0 +1,24 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":226.1-43] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQoptions"
+in
+structure F_PQoptions : sig
+    val typ :
+        ((ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr
+    val f : (ST_pg_conn.tag, ro) su_obj ptr -> rw uchar_obj ptr
+    val f' : (ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr'
+end = struct
+    val typ = FPtrRTTI_10.typ
+    fun fptr () = mk_fptr (FPtrRTTI_10.mkcall, h ())
+    fun f x1
+        = Heavy.ptr (T.pointer T.uchar) (call (fptr (), Light.ptr x1))
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-PQpass.sml b/libpq/FFI/f-PQpass.sml
new file mode 100644 (file)
index 0000000..bdbfb29
--- /dev/null
@@ -0,0 +1,24 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":222.1-40] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQpass"
+in
+structure F_PQpass : sig
+    val typ :
+        ((ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr
+    val f : (ST_pg_conn.tag, ro) su_obj ptr -> rw uchar_obj ptr
+    val f' : (ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr'
+end = struct
+    val typ = FPtrRTTI_10.typ
+    fun fptr () = mk_fptr (FPtrRTTI_10.mkcall, h ())
+    fun f x1
+        = Heavy.ptr (T.pointer T.uchar) (call (fptr (), Light.ptr x1))
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-PQport.sml b/libpq/FFI/f-PQport.sml
new file mode 100644 (file)
index 0000000..1e32aa6
--- /dev/null
@@ -0,0 +1,24 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":224.1-40] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQport"
+in
+structure F_PQport : sig
+    val typ :
+        ((ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr
+    val f : (ST_pg_conn.tag, ro) su_obj ptr -> rw uchar_obj ptr
+    val f' : (ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr'
+end = struct
+    val typ = FPtrRTTI_10.typ
+    fun fptr () = mk_fptr (FPtrRTTI_10.mkcall, h ())
+    fun f x1
+        = Heavy.ptr (T.pointer T.uchar) (call (fptr (), Light.ptr x1))
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-PQprint.sml b/libpq/FFI/f-PQprint.sml
new file mode 100644 (file)
index 0000000..58113cf
--- /dev/null
@@ -0,0 +1,34 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":327.1-330.24] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQprint"
+in
+structure F_PQprint : sig
+    val typ :
+        ((ST__IO_FILE.tag, rw) su_obj ptr' *
+         (ST_pg_result.tag, ro) su_obj ptr' *
+         (ST__PQprintOpt.tag, ro) su_obj ptr' -> unit) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST__IO_FILE.tag, rw) su_obj ptr' *
+             (ST_pg_result.tag, ro) su_obj ptr' *
+             (ST__PQprintOpt.tag, ro) su_obj ptr' -> unit) fptr
+    val f :
+        (ST__IO_FILE.tag, rw) su_obj ptr *
+        (ST_pg_result.tag, ro) su_obj ptr *
+        (ST__PQprintOpt.tag, ro) su_obj ptr -> unit
+    val f' :
+        (ST__IO_FILE.tag, rw) su_obj ptr' *
+        (ST_pg_result.tag, ro) su_obj ptr' *
+        (ST__PQprintOpt.tag, ro) su_obj ptr' -> unit
+end = struct
+    val typ = FPtrRTTI_32.typ
+    fun fptr () = mk_fptr (FPtrRTTI_32.mkcall, h ())
+    fun f (x1, x2, x3)
+        = call (fptr (), (Light.ptr x1, Light.ptr x2, Light.ptr x3))
+    fun f' (x1, x2, x3) = call (fptr (), (x1, x2, x3))
+end
+end
diff --git a/libpq/FFI/f-PQprintTuples.sml b/libpq/FFI/f-PQprintTuples.sml
new file mode 100644 (file)
index 0000000..4534e37
--- /dev/null
@@ -0,0 +1,51 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":343.1-348.16] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQprintTuples"
+in
+structure F_PQprintTuples : sig
+    val typ :
+        ((ST_pg_result.tag, ro) su_obj ptr' *
+         (ST__IO_FILE.tag, rw) su_obj ptr' *
+         sint *
+         sint *
+         sint -> unit) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_result.tag, ro) su_obj ptr' *
+             (ST__IO_FILE.tag, rw) su_obj ptr' *
+             sint *
+             sint *
+             sint -> unit) fptr
+    val f :
+        (ST_pg_result.tag, ro) su_obj ptr *
+        (ST__IO_FILE.tag, rw) su_obj ptr *
+        MLRep.Signed.int *
+        MLRep.Signed.int *
+        MLRep.Signed.int -> unit
+    val f' :
+        (ST_pg_result.tag, ro) su_obj ptr' *
+        (ST__IO_FILE.tag, rw) su_obj ptr' *
+        MLRep.Signed.int *
+        MLRep.Signed.int *
+        MLRep.Signed.int -> unit
+end = struct
+    val typ = FPtrRTTI_33.typ
+    fun fptr () = mk_fptr (FPtrRTTI_33.mkcall, h ())
+    fun f (x1, x2, x3, x4, x5)
+        = call
+              (fptr (),
+               (Light.ptr x1,
+                Light.ptr x2,
+                Cvt.c_sint x3,
+                Cvt.c_sint x4,
+                Cvt.c_sint x5))
+    fun f' (x1, x2, x3, x4, x5)
+        = call
+              (fptr (),
+               (x1, x2, Cvt.c_sint x3, Cvt.c_sint x4, Cvt.c_sint x5))
+end
+end
diff --git a/libpq/FFI/f-PQputline.sml b/libpq/FFI/f-PQputline.sml
new file mode 100644 (file)
index 0000000..767120b
--- /dev/null
@@ -0,0 +1,28 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":271.1-55] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQputline"
+in
+structure F_PQputline : sig
+    val typ :
+        ((ST_pg_conn.tag, rw) su_obj ptr' * ro uchar_obj ptr' -> sint) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, rw) su_obj ptr' * ro uchar_obj ptr' -> sint) fptr
+    val f :
+        (ST_pg_conn.tag, rw) su_obj ptr * ro uchar_obj ptr ->
+            MLRep.Signed.int
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' * ro uchar_obj ptr' ->
+            MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_34.typ
+    fun fptr () = mk_fptr (FPtrRTTI_34.mkcall, h ())
+    fun f (x1, x2)
+        = Cvt.ml_sint (call (fptr (), (Light.ptr x1, Light.ptr x2)))
+    fun f' (x1, x2) = Cvt.ml_sint (call (fptr (), (x1, x2)))
+end
+end
diff --git a/libpq/FFI/f-PQputnbytes.sml b/libpq/FFI/f-PQputnbytes.sml
new file mode 100644 (file)
index 0000000..443c139
--- /dev/null
@@ -0,0 +1,35 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":273.1-69] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQputnbytes"
+in
+structure F_PQputnbytes : sig
+    val typ :
+        ((ST_pg_conn.tag, rw) su_obj ptr' * ro uchar_obj ptr' * sint ->
+             sint) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, rw) su_obj ptr' * ro uchar_obj ptr' * sint ->
+                 sint) fptr
+    val f :
+        (ST_pg_conn.tag, rw) su_obj ptr *
+        ro uchar_obj ptr *
+        MLRep.Signed.int -> MLRep.Signed.int
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' *
+        ro uchar_obj ptr' *
+        MLRep.Signed.int -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_35.typ
+    fun fptr () = mk_fptr (FPtrRTTI_35.mkcall, h ())
+    fun f (x1, x2, x3)
+        = Cvt.ml_sint
+              (call
+                  (fptr (), (Light.ptr x1, Light.ptr x2, Cvt.c_sint x3)))
+    fun f' (x1, x2, x3)
+        = Cvt.ml_sint (call (fptr (), (x1, x2, Cvt.c_sint x3)))
+end
+end
diff --git a/libpq/FFI/f-PQrequestCancel.sml b/libpq/FFI/f-PQrequestCancel.sml
new file mode 100644 (file)
index 0000000..e7143a4
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":217.1-41] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQrequestCancel"
+in
+structure F_PQrequestCancel : sig
+    val typ : ((ST_pg_conn.tag, rw) su_obj ptr' -> sint) fptr T.typ
+    val fptr : unit -> ((ST_pg_conn.tag, rw) su_obj ptr' -> sint) fptr
+    val f : (ST_pg_conn.tag, rw) su_obj ptr -> MLRep.Signed.int
+    val f' : (ST_pg_conn.tag, rw) su_obj ptr' -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_9.typ
+    fun fptr () = mk_fptr (FPtrRTTI_9.mkcall, h ())
+    fun f x1 = Cvt.ml_sint (call (fptr (), Light.ptr x1))
+    fun f' x1 = Cvt.ml_sint (call (fptr (), x1))
+end
+end
diff --git a/libpq/FFI/f-PQresStatus.sml b/libpq/FFI/f-PQresStatus.sml
new file mode 100644 (file)
index 0000000..edabd02
--- /dev/null
@@ -0,0 +1,23 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":297.1-48] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQresStatus"
+in
+structure F_PQresStatus : sig
+    val typ :
+        (ET_'ExecStatusType.tag enum -> rw uchar_obj ptr') fptr T.typ
+    val fptr :
+        unit -> (ET_'ExecStatusType.tag enum -> rw uchar_obj ptr') fptr
+    val f : MLRep.Signed.int -> rw uchar_obj ptr
+    val f' : MLRep.Signed.int -> rw uchar_obj ptr'
+end = struct
+    val typ = FPtrRTTI_36.typ
+    fun fptr () = mk_fptr (FPtrRTTI_36.mkcall, h ())
+    fun f x1
+        = Heavy.ptr (T.pointer T.uchar) (call (fptr (), Cvt.i2c_enum x1))
+    fun f' x1 = call (fptr (), Cvt.i2c_enum x1)
+end
+end
diff --git a/libpq/FFI/f-PQreset.sml b/libpq/FFI/f-PQreset.sml
new file mode 100644 (file)
index 0000000..b7d0213
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":214.1-34] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQreset"
+in
+structure F_PQreset : sig
+    val typ : ((ST_pg_conn.tag, rw) su_obj ptr' -> unit) fptr T.typ
+    val fptr : unit -> ((ST_pg_conn.tag, rw) su_obj ptr' -> unit) fptr
+    val f : (ST_pg_conn.tag, rw) su_obj ptr -> unit
+    val f' : (ST_pg_conn.tag, rw) su_obj ptr' -> unit
+end = struct
+    val typ = FPtrRTTI_16.typ
+    fun fptr () = mk_fptr (FPtrRTTI_16.mkcall, h ())
+    fun f x1 = call (fptr (), Light.ptr x1)
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-PQresetPoll.sml b/libpq/FFI/f-PQresetPoll.sml
new file mode 100644 (file)
index 0000000..c0e267e
--- /dev/null
@@ -0,0 +1,25 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":211.1-59] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQresetPoll"
+in
+structure F_PQresetPoll : sig
+    val typ :
+        ((ST_pg_conn.tag, rw) su_obj ptr' ->
+             ET_'PostgresPollingStatusType.tag enum) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, rw) su_obj ptr' ->
+                 ET_'PostgresPollingStatusType.tag enum) fptr
+    val f : (ST_pg_conn.tag, rw) su_obj ptr -> MLRep.Signed.int
+    val f' : (ST_pg_conn.tag, rw) su_obj ptr' -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_6.typ
+    fun fptr () = mk_fptr (FPtrRTTI_6.mkcall, h ())
+    fun f x1 = Cvt.c2i_enum (call (fptr (), Light.ptr x1))
+    fun f' x1 = Cvt.c2i_enum (call (fptr (), x1))
+end
+end
diff --git a/libpq/FFI/f-PQresetStart.sml b/libpq/FFI/f-PQresetStart.sml
new file mode 100644 (file)
index 0000000..0978c34
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":210.1-38] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQresetStart"
+in
+structure F_PQresetStart : sig
+    val typ : ((ST_pg_conn.tag, rw) su_obj ptr' -> sint) fptr T.typ
+    val fptr : unit -> ((ST_pg_conn.tag, rw) su_obj ptr' -> sint) fptr
+    val f : (ST_pg_conn.tag, rw) su_obj ptr -> MLRep.Signed.int
+    val f' : (ST_pg_conn.tag, rw) su_obj ptr' -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_9.typ
+    fun fptr () = mk_fptr (FPtrRTTI_9.mkcall, h ())
+    fun f x1 = Cvt.ml_sint (call (fptr (), Light.ptr x1))
+    fun f' x1 = Cvt.ml_sint (call (fptr (), x1))
+end
+end
diff --git a/libpq/FFI/f-PQresultErrorMessage.sml b/libpq/FFI/f-PQresultErrorMessage.sml
new file mode 100644 (file)
index 0000000..d9ae259
--- /dev/null
@@ -0,0 +1,24 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":298.1-55] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQresultErrorMessage"
+in
+structure F_PQresultErrorMessage : sig
+    val typ :
+        ((ST_pg_result.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_result.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr
+    val f : (ST_pg_result.tag, ro) su_obj ptr -> rw uchar_obj ptr
+    val f' : (ST_pg_result.tag, ro) su_obj ptr' -> rw uchar_obj ptr'
+end = struct
+    val typ = FPtrRTTI_30.typ
+    fun fptr () = mk_fptr (FPtrRTTI_30.mkcall, h ())
+    fun f x1
+        = Heavy.ptr (T.pointer T.uchar) (call (fptr (), Light.ptr x1))
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-PQresultStatus.sml b/libpq/FFI/f-PQresultStatus.sml
new file mode 100644 (file)
index 0000000..b27db3f
--- /dev/null
@@ -0,0 +1,25 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":296.1-58] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQresultStatus"
+in
+structure F_PQresultStatus : sig
+    val typ :
+        ((ST_pg_result.tag, ro) su_obj ptr' ->
+             ET_'ExecStatusType.tag enum) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_result.tag, ro) su_obj ptr' ->
+                 ET_'ExecStatusType.tag enum) fptr
+    val f : (ST_pg_result.tag, ro) su_obj ptr -> MLRep.Signed.int
+    val f' : (ST_pg_result.tag, ro) su_obj ptr' -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_37.typ
+    fun fptr () = mk_fptr (FPtrRTTI_37.mkcall, h ())
+    fun f x1 = Cvt.c2i_enum (call (fptr (), Light.ptr x1))
+    fun f' x1 = Cvt.c2i_enum (call (fptr (), x1))
+end
+end
diff --git a/libpq/FFI/f-PQsendQuery.sml b/libpq/FFI/f-PQsendQuery.sml
new file mode 100644 (file)
index 0000000..0e511c2
--- /dev/null
@@ -0,0 +1,28 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":262.1-56] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQsendQuery"
+in
+structure F_PQsendQuery : sig
+    val typ :
+        ((ST_pg_conn.tag, rw) su_obj ptr' * ro uchar_obj ptr' -> sint) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, rw) su_obj ptr' * ro uchar_obj ptr' -> sint) fptr
+    val f :
+        (ST_pg_conn.tag, rw) su_obj ptr * ro uchar_obj ptr ->
+            MLRep.Signed.int
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' * ro uchar_obj ptr' ->
+            MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_34.typ
+    fun fptr () = mk_fptr (FPtrRTTI_34.mkcall, h ())
+    fun f (x1, x2)
+        = Cvt.ml_sint (call (fptr (), (Light.ptr x1, Light.ptr x2)))
+    fun f' (x1, x2) = Cvt.ml_sint (call (fptr (), (x1, x2)))
+end
+end
diff --git a/libpq/FFI/f-PQsetClientEncoding.sml b/libpq/FFI/f-PQsetClientEncoding.sml
new file mode 100644 (file)
index 0000000..44e0432
--- /dev/null
@@ -0,0 +1,28 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":232.1-67] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQsetClientEncoding"
+in
+structure F_PQsetClientEncoding : sig
+    val typ :
+        ((ST_pg_conn.tag, rw) su_obj ptr' * ro uchar_obj ptr' -> sint) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, rw) su_obj ptr' * ro uchar_obj ptr' -> sint) fptr
+    val f :
+        (ST_pg_conn.tag, rw) su_obj ptr * ro uchar_obj ptr ->
+            MLRep.Signed.int
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' * ro uchar_obj ptr' ->
+            MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_34.typ
+    fun fptr () = mk_fptr (FPtrRTTI_34.mkcall, h ())
+    fun f (x1, x2)
+        = Cvt.ml_sint (call (fptr (), (Light.ptr x1, Light.ptr x2)))
+    fun f' (x1, x2) = Cvt.ml_sint (call (fptr (), (x1, x2)))
+end
+end
diff --git a/libpq/FFI/f-PQsetNoticeProcessor.sml b/libpq/FFI/f-PQsetNoticeProcessor.sml
new file mode 100644 (file)
index 0000000..30253e9
--- /dev/null
@@ -0,0 +1,36 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":245.1-247.17] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQsetNoticeProcessor"
+in
+structure F_PQsetNoticeProcessor : sig
+    val typ :
+        ((ST_pg_conn.tag, rw) su_obj ptr' *
+         (voidptr * ro uchar_obj ptr' -> unit) fptr' *
+         voidptr -> (voidptr * ro uchar_obj ptr' -> unit) fptr') fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, rw) su_obj ptr' *
+             (voidptr * ro uchar_obj ptr' -> unit) fptr' *
+             voidptr -> (voidptr * ro uchar_obj ptr' -> unit) fptr') fptr
+    val f :
+        (ST_pg_conn.tag, rw) su_obj ptr *
+        (voidptr * ro uchar_obj ptr' -> unit) fptr *
+        voidptr -> (voidptr * ro uchar_obj ptr' -> unit) fptr
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' *
+        (voidptr * ro uchar_obj ptr' -> unit) fptr' *
+        voidptr -> (voidptr * ro uchar_obj ptr' -> unit) fptr'
+end = struct
+    val typ = FPtrRTTI_38.typ
+    fun fptr () = mk_fptr (FPtrRTTI_38.mkcall, h ())
+    fun f (x1, x2, x3)
+        = Heavy.fptr
+              FPtrRTTI_0.typ
+              (call (fptr (), (Light.ptr x1, Light.fptr x2, x3)))
+    fun f' (x1, x2, x3) = call (fptr (), (x1, x2, x3))
+end
+end
diff --git a/libpq/FFI/f-PQsetdbLogin.sml b/libpq/FFI/f-PQsetdbLogin.sml
new file mode 100644 (file)
index 0000000..397da94
--- /dev/null
@@ -0,0 +1,41 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":188.1-191.40] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQsetdbLogin"
+in
+structure F_PQsetdbLogin : sig
+    val typ :
+        (ro uchar_obj ptr' *
+         ro uchar_obj ptr' *
+         ro uchar_obj ptr' *
+         ro uchar_obj ptr' *
+         ro uchar_obj ptr' *
+         ro uchar_obj ptr' *
+         ro uchar_obj ptr' -> (ST_pg_conn.tag, rw) su_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            (ro uchar_obj ptr' *
+             ro uchar_obj ptr' *
+             ro uchar_obj ptr' *
+             ro uchar_obj ptr' *
+             ro uchar_obj ptr' *
+             ro uchar_obj ptr' *
+             ro uchar_obj ptr' -> (ST_pg_conn.tag, rw) su_obj ptr') fptr
+    val f' :
+        ro uchar_obj ptr' *
+        ro uchar_obj ptr' *
+        ro uchar_obj ptr' *
+        ro uchar_obj ptr' *
+        ro uchar_obj ptr' *
+        ro uchar_obj ptr' *
+        ro uchar_obj ptr' -> (ST_pg_conn.tag, rw) su_obj ptr'
+end = struct
+    val typ = FPtrRTTI_39.typ
+    fun fptr () = mk_fptr (FPtrRTTI_39.mkcall, h ())
+    fun f' (x1, x2, x3, x4, x5, x6, x7)
+        = call (fptr (), (x1, x2, x3, x4, x5, x6, x7))
+end
+end
diff --git a/libpq/FFI/f-PQsetnonblocking.sml b/libpq/FFI/f-PQsetnonblocking.sml
new file mode 100644 (file)
index 0000000..62c5770
--- /dev/null
@@ -0,0 +1,26 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":277.1-51] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQsetnonblocking"
+in
+structure F_PQsetnonblocking : sig
+    val typ : ((ST_pg_conn.tag, rw) su_obj ptr' * sint -> sint) fptr T.typ
+    val fptr :
+        unit -> ((ST_pg_conn.tag, rw) su_obj ptr' * sint -> sint) fptr
+    val f :
+        (ST_pg_conn.tag, rw) su_obj ptr * MLRep.Signed.int ->
+            MLRep.Signed.int
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' * MLRep.Signed.int ->
+            MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_40.typ
+    fun fptr () = mk_fptr (FPtrRTTI_40.mkcall, h ())
+    fun f (x1, x2)
+        = Cvt.ml_sint (call (fptr (), (Light.ptr x1, Cvt.c_sint x2)))
+    fun f' (x1, x2) = Cvt.ml_sint (call (fptr (), (x1, Cvt.c_sint x2)))
+end
+end
diff --git a/libpq/FFI/f-PQsocket.sml b/libpq/FFI/f-PQsocket.sml
new file mode 100644 (file)
index 0000000..b6da808
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":229.1-40] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQsocket"
+in
+structure F_PQsocket : sig
+    val typ : ((ST_pg_conn.tag, ro) su_obj ptr' -> sint) fptr T.typ
+    val fptr : unit -> ((ST_pg_conn.tag, ro) su_obj ptr' -> sint) fptr
+    val f : (ST_pg_conn.tag, ro) su_obj ptr -> MLRep.Signed.int
+    val f' : (ST_pg_conn.tag, ro) su_obj ptr' -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_1.typ
+    fun fptr () = mk_fptr (FPtrRTTI_1.mkcall, h ())
+    fun f x1 = Cvt.ml_sint (call (fptr (), Light.ptr x1))
+    fun f' x1 = Cvt.ml_sint (call (fptr (), x1))
+end
+end
diff --git a/libpq/FFI/f-PQstatus.sml b/libpq/FFI/f-PQstatus.sml
new file mode 100644 (file)
index 0000000..cb43f64
--- /dev/null
@@ -0,0 +1,24 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":227.1-51] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQstatus"
+in
+structure F_PQstatus : sig
+    val typ :
+        ((ST_pg_conn.tag, ro) su_obj ptr' -> ET_'ConnStatusType.tag enum) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, ro) su_obj ptr' ->
+                 ET_'ConnStatusType.tag enum) fptr
+    val f : (ST_pg_conn.tag, ro) su_obj ptr -> MLRep.Signed.int
+    val f' : (ST_pg_conn.tag, ro) su_obj ptr' -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_41.typ
+    fun fptr () = mk_fptr (FPtrRTTI_41.mkcall, h ())
+    fun f x1 = Cvt.c2i_enum (call (fptr (), Light.ptr x1))
+    fun f' x1 = Cvt.c2i_enum (call (fptr (), x1))
+end
+end
diff --git a/libpq/FFI/f-PQtrace.sml b/libpq/FFI/f-PQtrace.sml
new file mode 100644 (file)
index 0000000..038ca55
--- /dev/null
@@ -0,0 +1,29 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":241.1-52] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQtrace"
+in
+structure F_PQtrace : sig
+    val typ :
+        ((ST_pg_conn.tag, rw) su_obj ptr' *
+         (ST__IO_FILE.tag, rw) su_obj ptr' -> unit) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, rw) su_obj ptr' *
+             (ST__IO_FILE.tag, rw) su_obj ptr' -> unit) fptr
+    val f :
+        (ST_pg_conn.tag, rw) su_obj ptr * (ST__IO_FILE.tag, rw) su_obj ptr ->
+            unit
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' *
+        (ST__IO_FILE.tag, rw) su_obj ptr' -> unit
+end = struct
+    val typ = FPtrRTTI_42.typ
+    fun fptr () = mk_fptr (FPtrRTTI_42.mkcall, h ())
+    fun f (x1, x2) = call (fptr (), (Light.ptr x1, Light.ptr x2))
+    fun f' (x1, x2) = call (fptr (), (x1, x2))
+end
+end
diff --git a/libpq/FFI/f-PQtty.sml b/libpq/FFI/f-PQtty.sml
new file mode 100644 (file)
index 0000000..db2d12d
--- /dev/null
@@ -0,0 +1,24 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":225.1-39] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQtty"
+in
+structure F_PQtty : sig
+    val typ :
+        ((ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr
+    val f : (ST_pg_conn.tag, ro) su_obj ptr -> rw uchar_obj ptr
+    val f' : (ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr'
+end = struct
+    val typ = FPtrRTTI_10.typ
+    fun fptr () = mk_fptr (FPtrRTTI_10.mkcall, h ())
+    fun f x1
+        = Heavy.ptr (T.pointer T.uchar) (call (fptr (), Light.ptr x1))
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-PQuntrace.sml b/libpq/FFI/f-PQuntrace.sml
new file mode 100644 (file)
index 0000000..a38d3f9
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":242.1-36] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQuntrace"
+in
+structure F_PQuntrace : sig
+    val typ : ((ST_pg_conn.tag, rw) su_obj ptr' -> unit) fptr T.typ
+    val fptr : unit -> ((ST_pg_conn.tag, rw) su_obj ptr' -> unit) fptr
+    val f : (ST_pg_conn.tag, rw) su_obj ptr -> unit
+    val f' : (ST_pg_conn.tag, rw) su_obj ptr' -> unit
+end = struct
+    val typ = FPtrRTTI_16.typ
+    fun fptr () = mk_fptr (FPtrRTTI_16.mkcall, h ())
+    fun f x1 = call (fptr (), Light.ptr x1)
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-PQuser.sml b/libpq/FFI/f-PQuser.sml
new file mode 100644 (file)
index 0000000..83013f6
--- /dev/null
@@ -0,0 +1,24 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":221.1-40] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "PQuser"
+in
+structure F_PQuser : sig
+    val typ :
+        ((ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr
+    val f : (ST_pg_conn.tag, ro) su_obj ptr -> rw uchar_obj ptr
+    val f' : (ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr'
+end = struct
+    val typ = FPtrRTTI_10.typ
+    fun fptr () = mk_fptr (FPtrRTTI_10.mkcall, h ())
+    fun f x1
+        = Heavy.ptr (T.pointer T.uchar) (call (fptr (), Light.ptr x1))
+    fun f' x1 = call (fptr (), x1)
+end
+end
diff --git a/libpq/FFI/f-lo_close.sml b/libpq/FFI/f-lo_close.sml
new file mode 100644 (file)
index 0000000..c58abec
--- /dev/null
@@ -0,0 +1,26 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":356.1-42] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "lo_close"
+in
+structure F_lo_close : sig
+    val typ : ((ST_pg_conn.tag, rw) su_obj ptr' * sint -> sint) fptr T.typ
+    val fptr :
+        unit -> ((ST_pg_conn.tag, rw) su_obj ptr' * sint -> sint) fptr
+    val f :
+        (ST_pg_conn.tag, rw) su_obj ptr * MLRep.Signed.int ->
+            MLRep.Signed.int
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' * MLRep.Signed.int ->
+            MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_40.typ
+    fun fptr () = mk_fptr (FPtrRTTI_40.mkcall, h ())
+    fun f (x1, x2)
+        = Cvt.ml_sint (call (fptr (), (Light.ptr x1, Cvt.c_sint x2)))
+    fun f' (x1, x2) = Cvt.ml_sint (call (fptr (), (x1, Cvt.c_sint x2)))
+end
+end
diff --git a/libpq/FFI/f-lo_creat.sml b/libpq/FFI/f-lo_creat.sml
new file mode 100644 (file)
index 0000000..dc6088c
--- /dev/null
@@ -0,0 +1,26 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":360.1-44] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "lo_creat"
+in
+structure F_lo_creat : sig
+    val typ : ((ST_pg_conn.tag, rw) su_obj ptr' * sint -> uint) fptr T.typ
+    val fptr :
+        unit -> ((ST_pg_conn.tag, rw) su_obj ptr' * sint -> uint) fptr
+    val f :
+        (ST_pg_conn.tag, rw) su_obj ptr * MLRep.Signed.int ->
+            MLRep.Unsigned.word
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' * MLRep.Signed.int ->
+            MLRep.Unsigned.word
+end = struct
+    val typ = FPtrRTTI_43.typ
+    fun fptr () = mk_fptr (FPtrRTTI_43.mkcall, h ())
+    fun f (x1, x2)
+        = Cvt.ml_uint (call (fptr (), (Light.ptr x1, Cvt.c_sint x2)))
+    fun f' (x1, x2) = Cvt.ml_uint (call (fptr (), (x1, Cvt.c_sint x2)))
+end
+end
diff --git a/libpq/FFI/f-lo_export.sml b/libpq/FFI/f-lo_export.sml
new file mode 100644 (file)
index 0000000..7bc4b9f
--- /dev/null
@@ -0,0 +1,35 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":364.1-69] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "lo_export"
+in
+structure F_lo_export : sig
+    val typ :
+        ((ST_pg_conn.tag, rw) su_obj ptr' * uint * ro uchar_obj ptr' ->
+             sint) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, rw) su_obj ptr' * uint * ro uchar_obj ptr' ->
+                 sint) fptr
+    val f :
+        (ST_pg_conn.tag, rw) su_obj ptr *
+        MLRep.Unsigned.word *
+        ro uchar_obj ptr -> MLRep.Signed.int
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' *
+        MLRep.Unsigned.word *
+        ro uchar_obj ptr' -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_44.typ
+    fun fptr () = mk_fptr (FPtrRTTI_44.mkcall, h ())
+    fun f (x1, x2, x3)
+        = Cvt.ml_sint
+              (call
+                  (fptr (), (Light.ptr x1, Cvt.c_uint x2, Light.ptr x3)))
+    fun f' (x1, x2, x3)
+        = Cvt.ml_sint (call (fptr (), (x1, Cvt.c_uint x2, x3)))
+end
+end
diff --git a/libpq/FFI/f-lo_import.sml b/libpq/FFI/f-lo_import.sml
new file mode 100644 (file)
index 0000000..8fb269e
--- /dev/null
@@ -0,0 +1,28 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":363.1-57] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "lo_import"
+in
+structure F_lo_import : sig
+    val typ :
+        ((ST_pg_conn.tag, rw) su_obj ptr' * ro uchar_obj ptr' -> uint) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, rw) su_obj ptr' * ro uchar_obj ptr' -> uint) fptr
+    val f :
+        (ST_pg_conn.tag, rw) su_obj ptr * ro uchar_obj ptr ->
+            MLRep.Unsigned.word
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' * ro uchar_obj ptr' ->
+            MLRep.Unsigned.word
+end = struct
+    val typ = FPtrRTTI_45.typ
+    fun fptr () = mk_fptr (FPtrRTTI_45.mkcall, h ())
+    fun f (x1, x2)
+        = Cvt.ml_uint (call (fptr (), (Light.ptr x1, Light.ptr x2)))
+    fun f' (x1, x2) = Cvt.ml_uint (call (fptr (), (x1, x2)))
+end
+end
diff --git a/libpq/FFI/f-lo_lseek.sml b/libpq/FFI/f-lo_lseek.sml
new file mode 100644 (file)
index 0000000..8e810c9
--- /dev/null
@@ -0,0 +1,43 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":359.1-66] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "lo_lseek"
+in
+structure F_lo_lseek : sig
+    val typ :
+        ((ST_pg_conn.tag, rw) su_obj ptr' * sint * sint * sint -> sint) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, rw) su_obj ptr' * sint * sint * sint ->
+                 sint) fptr
+    val f :
+        (ST_pg_conn.tag, rw) su_obj ptr *
+        MLRep.Signed.int *
+        MLRep.Signed.int *
+        MLRep.Signed.int -> MLRep.Signed.int
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' *
+        MLRep.Signed.int *
+        MLRep.Signed.int *
+        MLRep.Signed.int -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_46.typ
+    fun fptr () = mk_fptr (FPtrRTTI_46.mkcall, h ())
+    fun f (x1, x2, x3, x4)
+        = Cvt.ml_sint
+              (call
+                  (fptr (),
+                   (Light.ptr x1,
+                    Cvt.c_sint x2,
+                    Cvt.c_sint x3,
+                    Cvt.c_sint x4)))
+    fun f' (x1, x2, x3, x4)
+        = Cvt.ml_sint
+              (call
+                  (fptr (),
+                   (x1, Cvt.c_sint x2, Cvt.c_sint x3, Cvt.c_sint x4)))
+end
+end
diff --git a/libpq/FFI/f-lo_open.sml b/libpq/FFI/f-lo_open.sml
new file mode 100644 (file)
index 0000000..e9c226c
--- /dev/null
@@ -0,0 +1,33 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":355.1-55] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "lo_open"
+in
+structure F_lo_open : sig
+    val typ :
+        ((ST_pg_conn.tag, rw) su_obj ptr' * uint * sint -> sint) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, rw) su_obj ptr' * uint * sint -> sint) fptr
+    val f :
+        (ST_pg_conn.tag, rw) su_obj ptr *
+        MLRep.Unsigned.word *
+        MLRep.Signed.int -> MLRep.Signed.int
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' *
+        MLRep.Unsigned.word *
+        MLRep.Signed.int -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_47.typ
+    fun fptr () = mk_fptr (FPtrRTTI_47.mkcall, h ())
+    fun f (x1, x2, x3)
+        = Cvt.ml_sint
+              (call
+                  (fptr (), (Light.ptr x1, Cvt.c_uint x2, Cvt.c_sint x3)))
+    fun f' (x1, x2, x3)
+        = Cvt.ml_sint (call (fptr (), (x1, Cvt.c_uint x2, Cvt.c_sint x3)))
+end
+end
diff --git a/libpq/FFI/f-lo_read.sml b/libpq/FFI/f-lo_read.sml
new file mode 100644 (file)
index 0000000..04e7c0d
--- /dev/null
@@ -0,0 +1,46 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":357.1-64] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "lo_read"
+in
+structure F_lo_read : sig
+    val typ :
+        ((ST_pg_conn.tag, rw) su_obj ptr' *
+         sint *
+         rw uchar_obj ptr' *
+         uint -> sint) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, rw) su_obj ptr' *
+             sint *
+             rw uchar_obj ptr' *
+             uint -> sint) fptr
+    val f :
+        (ST_pg_conn.tag, rw) su_obj ptr *
+        MLRep.Signed.int *
+        rw uchar_obj ptr *
+        MLRep.Unsigned.word -> MLRep.Signed.int
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' *
+        MLRep.Signed.int *
+        rw uchar_obj ptr' *
+        MLRep.Unsigned.word -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_48.typ
+    fun fptr () = mk_fptr (FPtrRTTI_48.mkcall, h ())
+    fun f (x1, x2, x3, x4)
+        = Cvt.ml_sint
+              (call
+                  (fptr (),
+                   (Light.ptr x1,
+                    Cvt.c_sint x2,
+                    Light.ptr x3,
+                    Cvt.c_uint x4)))
+    fun f' (x1, x2, x3, x4)
+        = Cvt.ml_sint
+              (call (fptr (), (x1, Cvt.c_sint x2, x3, Cvt.c_uint x4)))
+end
+end
diff --git a/libpq/FFI/f-lo_tell.sml b/libpq/FFI/f-lo_tell.sml
new file mode 100644 (file)
index 0000000..1a5295e
--- /dev/null
@@ -0,0 +1,26 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":361.1-41] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "lo_tell"
+in
+structure F_lo_tell : sig
+    val typ : ((ST_pg_conn.tag, rw) su_obj ptr' * sint -> sint) fptr T.typ
+    val fptr :
+        unit -> ((ST_pg_conn.tag, rw) su_obj ptr' * sint -> sint) fptr
+    val f :
+        (ST_pg_conn.tag, rw) su_obj ptr * MLRep.Signed.int ->
+            MLRep.Signed.int
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' * MLRep.Signed.int ->
+            MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_40.typ
+    fun fptr () = mk_fptr (FPtrRTTI_40.mkcall, h ())
+    fun f (x1, x2)
+        = Cvt.ml_sint (call (fptr (), (Light.ptr x1, Cvt.c_sint x2)))
+    fun f' (x1, x2) = Cvt.ml_sint (call (fptr (), (x1, Cvt.c_sint x2)))
+end
+end
diff --git a/libpq/FFI/f-lo_unlink.sml b/libpq/FFI/f-lo_unlink.sml
new file mode 100644 (file)
index 0000000..54d4cb7
--- /dev/null
@@ -0,0 +1,26 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":362.1-47] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "lo_unlink"
+in
+structure F_lo_unlink : sig
+    val typ : ((ST_pg_conn.tag, rw) su_obj ptr' * uint -> sint) fptr T.typ
+    val fptr :
+        unit -> ((ST_pg_conn.tag, rw) su_obj ptr' * uint -> sint) fptr
+    val f :
+        (ST_pg_conn.tag, rw) su_obj ptr * MLRep.Unsigned.word ->
+            MLRep.Signed.int
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' * MLRep.Unsigned.word ->
+            MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_49.typ
+    fun fptr () = mk_fptr (FPtrRTTI_49.mkcall, h ())
+    fun f (x1, x2)
+        = Cvt.ml_sint (call (fptr (), (Light.ptr x1, Cvt.c_uint x2)))
+    fun f' (x1, x2) = Cvt.ml_sint (call (fptr (), (x1, Cvt.c_uint x2)))
+end
+end
diff --git a/libpq/FFI/f-lo_write.sml b/libpq/FFI/f-lo_write.sml
new file mode 100644 (file)
index 0000000..02cfdaa
--- /dev/null
@@ -0,0 +1,46 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":358.1-65] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    open C.Dim C_Int
+    val h = LibpqH.libh "lo_write"
+in
+structure F_lo_write : sig
+    val typ :
+        ((ST_pg_conn.tag, rw) su_obj ptr' *
+         sint *
+         rw uchar_obj ptr' *
+         uint -> sint) fptr T.typ
+    val fptr :
+        unit ->
+            ((ST_pg_conn.tag, rw) su_obj ptr' *
+             sint *
+             rw uchar_obj ptr' *
+             uint -> sint) fptr
+    val f :
+        (ST_pg_conn.tag, rw) su_obj ptr *
+        MLRep.Signed.int *
+        rw uchar_obj ptr *
+        MLRep.Unsigned.word -> MLRep.Signed.int
+    val f' :
+        (ST_pg_conn.tag, rw) su_obj ptr' *
+        MLRep.Signed.int *
+        rw uchar_obj ptr' *
+        MLRep.Unsigned.word -> MLRep.Signed.int
+end = struct
+    val typ = FPtrRTTI_48.typ
+    fun fptr () = mk_fptr (FPtrRTTI_48.mkcall, h ())
+    fun f (x1, x2, x3, x4)
+        = Cvt.ml_sint
+              (call
+                  (fptr (),
+                   (Light.ptr x1,
+                    Cvt.c_sint x2,
+                    Light.ptr x3,
+                    Cvt.c_uint x4)))
+    fun f' (x1, x2, x3, x4)
+        = Cvt.ml_sint
+              (call (fptr (), (x1, Cvt.c_sint x2, x3, Cvt.c_uint x4)))
+end
+end
diff --git a/libpq/FFI/fptr-rtti-0.sml b/libpq/FFI/fptr-rtti-0.sml
new file mode 100644 (file)
index 0000000..53e84ff
--- /dev/null
@@ -0,0 +1,16 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_0 = struct
+    fun mkcall a (x1, x2)
+        = Callop_0.callop
+              (a,
+               (CMemory.wrap_addr (reveal x1),
+                CMemory.wrap_addr (reveal (Ptr.inject' x2))),
+               nil)
+    val typ =
+        mk_fptr_typ mkcall :
+            (voidptr * ro uchar_obj ptr' -> unit) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-1.sml b/libpq/FFI/fptr-rtti-1.sml
new file mode 100644 (file)
index 0000000..3871865
--- /dev/null
@@ -0,0 +1,17 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_1 = struct
+    fun mkcall a x1
+        = Cvt.c_sint
+              (CMemory.unwrap_sint
+                  (Callop_1.callop
+                      (a,
+                       CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, ro) su_obj ptr' -> sint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-10.sml b/libpq/FFI/fptr-rtti-10.sml
new file mode 100644 (file)
index 0000000..364d337
--- /dev/null
@@ -0,0 +1,17 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_10 = struct
+    fun mkcall a x1
+        = pcast
+              (CMemory.unwrap_addr
+                  (Callop_3.callop
+                      (a,
+                       CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-11.sml b/libpq/FFI/fptr-rtti-11.sml
new file mode 100644 (file)
index 0000000..774fc23
--- /dev/null
@@ -0,0 +1,25 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_11 = struct
+    fun mkcall a (x1, x2, x3, x4, x5, x6)
+        = Callop_5.callop
+              (a,
+               (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                CMemory.wrap_addr (reveal (Ptr.inject' x2)),
+                CMemory.wrap_sint (Cvt.ml_sint x3),
+                CMemory.wrap_addr (reveal (Ptr.inject' x4)),
+                CMemory.wrap_sint (Cvt.ml_sint x5),
+                CMemory.wrap_sint (Cvt.ml_sint x6)),
+               nil)
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_result.tag, ro) su_obj ptr' *
+             (ST__IO_FILE.tag, rw) su_obj ptr' *
+             sint *
+             ro uchar_obj ptr' *
+             sint *
+             sint -> unit) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-12.sml b/libpq/FFI/fptr-rtti-12.sml
new file mode 100644 (file)
index 0000000..06f351e
--- /dev/null
@@ -0,0 +1,10 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_12 = struct
+    fun mkcall a ()
+        = Cvt.c_sint (CMemory.unwrap_sint (Callop_6.callop (a, (), nil)))
+    val typ = mk_fptr_typ mkcall : (unit -> sint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-13.sml b/libpq/FFI/fptr-rtti-13.sml
new file mode 100644 (file)
index 0000000..6e88462
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_13 = struct
+    fun mkcall a (x1, x2, x3)
+        = pcast
+              (CMemory.unwrap_addr
+                  (Callop_7.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_uint (Cvt.ml_uint x2),
+                        CMemory.wrap_addr (reveal (Ptr.inject' x3))),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            (rw uchar_obj ptr' * uint * rw uint_obj ptr' ->
+                 rw uchar_obj ptr') fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-14.sml b/libpq/FFI/fptr-rtti-14.sml
new file mode 100644 (file)
index 0000000..344d2fe
--- /dev/null
@@ -0,0 +1,19 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_14 = struct
+    fun mkcall a (x1, x2, x3)
+        = Cvt.c_uint
+              (CMemory.unwrap_uint
+                  (Callop_8.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_addr (reveal (Ptr.inject' x2)),
+                        CMemory.wrap_uint (Cvt.ml_uint x3)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            (rw uchar_obj ptr' * ro uchar_obj ptr' * uint -> uint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-15.sml b/libpq/FFI/fptr-rtti-15.sml
new file mode 100644 (file)
index 0000000..0bf845b
--- /dev/null
@@ -0,0 +1,19 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_15 = struct
+    fun mkcall a (x1, x2)
+        = pcast
+              (CMemory.unwrap_addr
+                  (Callop_9.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_addr (reveal (Ptr.inject' x2))),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, rw) su_obj ptr' * ro uchar_obj ptr' ->
+                 (ST_pg_result.tag, rw) su_obj ptr') fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-16.sml b/libpq/FFI/fptr-rtti-16.sml
new file mode 100644 (file)
index 0000000..a881ea3
--- /dev/null
@@ -0,0 +1,13 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_16 = struct
+    fun mkcall a x1
+        = Callop_2.callop
+              (a, CMemory.wrap_addr (reveal (Ptr.inject' x1)), nil)
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, rw) su_obj ptr' -> unit) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-17.sml b/libpq/FFI/fptr-rtti-17.sml
new file mode 100644 (file)
index 0000000..d50f1c9
--- /dev/null
@@ -0,0 +1,18 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_17 = struct
+    fun mkcall a (x1, x2)
+        = Cvt.c_sint
+              (CMemory.unwrap_sint
+                  (Callop_10.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_sint (Cvt.ml_sint x2)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_result.tag, ro) su_obj ptr' * sint -> sint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-18.sml b/libpq/FFI/fptr-rtti-18.sml
new file mode 100644 (file)
index 0000000..2fd24ae
--- /dev/null
@@ -0,0 +1,29 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_18 = struct
+    fun mkcall a (x1, x2, x3, x4, x5, x6, x7)
+        = pcast
+              (CMemory.unwrap_addr
+                  (Callop_11.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_sint (Cvt.ml_sint x2),
+                        CMemory.wrap_addr (reveal (Ptr.inject' x3)),
+                        CMemory.wrap_addr (reveal (Ptr.inject' x4)),
+                        CMemory.wrap_sint (Cvt.ml_sint x5),
+                        CMemory.wrap_addr (reveal (Ptr.inject' x6)),
+                        CMemory.wrap_sint (Cvt.ml_sint x7)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, rw) su_obj ptr' *
+             sint *
+             rw sint_obj ptr' *
+             rw sint_obj ptr' *
+             sint *
+             (ST_'PQArgBlock.tag, ro) su_obj ptr' *
+             sint -> (ST_pg_result.tag, rw) su_obj ptr') fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-19.sml b/libpq/FFI/fptr-rtti-19.sml
new file mode 100644 (file)
index 0000000..b62e36c
--- /dev/null
@@ -0,0 +1,19 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_19 = struct
+    fun mkcall a (x1, x2)
+        = pcast
+              (CMemory.unwrap_addr
+                  (Callop_12.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_sint (Cvt.ml_sint x2)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_result.tag, ro) su_obj ptr' * sint ->
+                 rw uchar_obj ptr') fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-2.sml b/libpq/FFI/fptr-rtti-2.sml
new file mode 100644 (file)
index 0000000..84b257a
--- /dev/null
@@ -0,0 +1,17 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_2 = struct
+    fun mkcall a x1
+        = Cvt.c_sint
+              (CMemory.unwrap_sint
+                  (Callop_1.callop
+                      (a,
+                       CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_result.tag, ro) su_obj ptr' -> sint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-20.sml b/libpq/FFI/fptr-rtti-20.sml
new file mode 100644 (file)
index 0000000..1e0af2a
--- /dev/null
@@ -0,0 +1,19 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_20 = struct
+    fun mkcall a (x1, x2)
+        = Cvt.c_sint
+              (CMemory.unwrap_sint
+                  (Callop_13.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_addr (reveal (Ptr.inject' x2))),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_result.tag, ro) su_obj ptr' * ro uchar_obj ptr' ->
+                 sint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-21.sml b/libpq/FFI/fptr-rtti-21.sml
new file mode 100644 (file)
index 0000000..3d504dc
--- /dev/null
@@ -0,0 +1,13 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_21 = struct
+    fun mkcall a x1
+        = Callop_2.callop
+              (a, CMemory.wrap_addr (reveal (Ptr.inject' x1)), nil)
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pgNotify.tag, rw) su_obj ptr' -> unit) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-22.sml b/libpq/FFI/fptr-rtti-22.sml
new file mode 100644 (file)
index 0000000..e46de3f
--- /dev/null
@@ -0,0 +1,18 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_22 = struct
+    fun mkcall a (x1, x2)
+        = Cvt.c_uint
+              (CMemory.unwrap_uint
+                  (Callop_14.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_sint (Cvt.ml_sint x2)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_result.tag, ro) su_obj ptr' * sint -> uint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-23.sml b/libpq/FFI/fptr-rtti-23.sml
new file mode 100644 (file)
index 0000000..65bc1b8
--- /dev/null
@@ -0,0 +1,18 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_23 = struct
+    fun mkcall a x1
+        = pcast
+              (CMemory.unwrap_addr
+                  (Callop_3.callop
+                      (a,
+                       CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, rw) su_obj ptr' ->
+                 (ST_pg_result.tag, rw) su_obj ptr') fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-24.sml b/libpq/FFI/fptr-rtti-24.sml
new file mode 100644 (file)
index 0000000..67e749b
--- /dev/null
@@ -0,0 +1,19 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_24 = struct
+    fun mkcall a (x1, x2, x3)
+        = Cvt.c_sint
+              (CMemory.unwrap_sint
+                  (Callop_15.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_sint (Cvt.ml_sint x2),
+                        CMemory.wrap_sint (Cvt.ml_sint x3)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_result.tag, ro) su_obj ptr' * sint * sint -> sint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-25.sml b/libpq/FFI/fptr-rtti-25.sml
new file mode 100644 (file)
index 0000000..51fb569
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_25 = struct
+    fun mkcall a (x1, x2, x3)
+        = Cvt.c_sint
+              (CMemory.unwrap_sint
+                  (Callop_16.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_addr (reveal (Ptr.inject' x2)),
+                        CMemory.wrap_sint (Cvt.ml_sint x3)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, rw) su_obj ptr' * rw uchar_obj ptr' * sint ->
+                 sint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-26.sml b/libpq/FFI/fptr-rtti-26.sml
new file mode 100644 (file)
index 0000000..de9f58e
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_26 = struct
+    fun mkcall a (x1, x2, x3)
+        = pcast
+              (CMemory.unwrap_addr
+                  (Callop_17.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_sint (Cvt.ml_sint x2),
+                        CMemory.wrap_sint (Cvt.ml_sint x3)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_result.tag, ro) su_obj ptr' * sint * sint ->
+                 rw uchar_obj ptr') fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-27.sml b/libpq/FFI/fptr-rtti-27.sml
new file mode 100644 (file)
index 0000000..f3fbae0
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_27 = struct
+    fun mkcall a (x1, x2)
+        = pcast
+              (CMemory.unwrap_addr
+                  (Callop_12.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_sint (Cvt.c2i_enum x2)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, rw) su_obj ptr' *
+             ET_'ExecStatusType.tag enum ->
+                 (ST_pg_result.tag, rw) su_obj ptr') fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-28.sml b/libpq/FFI/fptr-rtti-28.sml
new file mode 100644 (file)
index 0000000..26aaef7
--- /dev/null
@@ -0,0 +1,17 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_28 = struct
+    fun mkcall a (x1, x2)
+        = Cvt.c_sint
+              (CMemory.unwrap_sint
+                  (Callop_10.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_sint (Cvt.ml_sint x2)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall : (ro uchar_obj ptr' * sint -> sint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-29.sml b/libpq/FFI/fptr-rtti-29.sml
new file mode 100644 (file)
index 0000000..f99ce79
--- /dev/null
@@ -0,0 +1,18 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_29 = struct
+    fun mkcall a x1
+        = pcast
+              (CMemory.unwrap_addr
+                  (Callop_3.callop
+                      (a,
+                       CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, rw) su_obj ptr' ->
+                 (ST_pgNotify.tag, rw) su_obj ptr') fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-3.sml b/libpq/FFI/fptr-rtti-3.sml
new file mode 100644 (file)
index 0000000..1e898fd
--- /dev/null
@@ -0,0 +1,13 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_3 = struct
+    fun mkcall a x1
+        = Callop_2.callop
+              (a, CMemory.wrap_addr (reveal (Ptr.inject' x1)), nil)
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_result.tag, rw) su_obj ptr' -> unit) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-30.sml b/libpq/FFI/fptr-rtti-30.sml
new file mode 100644 (file)
index 0000000..c8d71af
--- /dev/null
@@ -0,0 +1,17 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_30 = struct
+    fun mkcall a x1
+        = pcast
+              (CMemory.unwrap_addr
+                  (Callop_3.callop
+                      (a,
+                       CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_result.tag, ro) su_obj ptr' -> rw uchar_obj ptr') fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-31.sml b/libpq/FFI/fptr-rtti-31.sml
new file mode 100644 (file)
index 0000000..c7529b4
--- /dev/null
@@ -0,0 +1,17 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_31 = struct
+    fun mkcall a x1
+        = Cvt.c_uint
+              (CMemory.unwrap_uint
+                  (Callop_18.callop
+                      (a,
+                       CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_result.tag, ro) su_obj ptr' -> uint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-32.sml b/libpq/FFI/fptr-rtti-32.sml
new file mode 100644 (file)
index 0000000..bd3e0e0
--- /dev/null
@@ -0,0 +1,19 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_32 = struct
+    fun mkcall a (x1, x2, x3)
+        = Callop_19.callop
+              (a,
+               (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                CMemory.wrap_addr (reveal (Ptr.inject' x2)),
+                CMemory.wrap_addr (reveal (Ptr.inject' x3))),
+               nil)
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST__IO_FILE.tag, rw) su_obj ptr' *
+             (ST_pg_result.tag, ro) su_obj ptr' *
+             (ST__PQprintOpt.tag, ro) su_obj ptr' -> unit) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-33.sml b/libpq/FFI/fptr-rtti-33.sml
new file mode 100644 (file)
index 0000000..f47e054
--- /dev/null
@@ -0,0 +1,23 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_33 = struct
+    fun mkcall a (x1, x2, x3, x4, x5)
+        = Callop_20.callop
+              (a,
+               (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                CMemory.wrap_addr (reveal (Ptr.inject' x2)),
+                CMemory.wrap_sint (Cvt.ml_sint x3),
+                CMemory.wrap_sint (Cvt.ml_sint x4),
+                CMemory.wrap_sint (Cvt.ml_sint x5)),
+               nil)
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_result.tag, ro) su_obj ptr' *
+             (ST__IO_FILE.tag, rw) su_obj ptr' *
+             sint *
+             sint *
+             sint -> unit) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-34.sml b/libpq/FFI/fptr-rtti-34.sml
new file mode 100644 (file)
index 0000000..611083f
--- /dev/null
@@ -0,0 +1,18 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_34 = struct
+    fun mkcall a (x1, x2)
+        = Cvt.c_sint
+              (CMemory.unwrap_sint
+                  (Callop_13.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_addr (reveal (Ptr.inject' x2))),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, rw) su_obj ptr' * ro uchar_obj ptr' -> sint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-35.sml b/libpq/FFI/fptr-rtti-35.sml
new file mode 100644 (file)
index 0000000..3941b2a
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_35 = struct
+    fun mkcall a (x1, x2, x3)
+        = Cvt.c_sint
+              (CMemory.unwrap_sint
+                  (Callop_16.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_addr (reveal (Ptr.inject' x2)),
+                        CMemory.wrap_sint (Cvt.ml_sint x3)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, rw) su_obj ptr' * ro uchar_obj ptr' * sint ->
+                 sint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-36.sml b/libpq/FFI/fptr-rtti-36.sml
new file mode 100644 (file)
index 0000000..e3fc488
--- /dev/null
@@ -0,0 +1,15 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_36 = struct
+    fun mkcall a x1
+        = pcast
+              (CMemory.unwrap_addr
+                  (Callop_21.callop
+                      (a, CMemory.wrap_sint (Cvt.c2i_enum x1), nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            (ET_'ExecStatusType.tag enum -> rw uchar_obj ptr') fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-37.sml b/libpq/FFI/fptr-rtti-37.sml
new file mode 100644 (file)
index 0000000..d9a489d
--- /dev/null
@@ -0,0 +1,18 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_37 = struct
+    fun mkcall a x1
+        = Cvt.i2c_enum
+              (CMemory.unwrap_sint
+                  (Callop_1.callop
+                      (a,
+                       CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_result.tag, ro) su_obj ptr' ->
+                 ET_'ExecStatusType.tag enum) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-38.sml b/libpq/FFI/fptr-rtti-38.sml
new file mode 100644 (file)
index 0000000..e6a3d1b
--- /dev/null
@@ -0,0 +1,21 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_38 = struct
+    fun mkcall a (x1, x2, x3)
+        = fcast
+              (CMemory.unwrap_addr
+                  (Callop_22.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_addr (freveal x2),
+                        CMemory.wrap_addr (reveal x3)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, rw) su_obj ptr' *
+             (voidptr * ro uchar_obj ptr' -> unit) fptr' *
+             voidptr -> (voidptr * ro uchar_obj ptr' -> unit) fptr') fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-39.sml b/libpq/FFI/fptr-rtti-39.sml
new file mode 100644 (file)
index 0000000..ec270cf
--- /dev/null
@@ -0,0 +1,29 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_39 = struct
+    fun mkcall a (x1, x2, x3, x4, x5, x6, x7)
+        = pcast
+              (CMemory.unwrap_addr
+                  (Callop_23.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_addr (reveal (Ptr.inject' x2)),
+                        CMemory.wrap_addr (reveal (Ptr.inject' x3)),
+                        CMemory.wrap_addr (reveal (Ptr.inject' x4)),
+                        CMemory.wrap_addr (reveal (Ptr.inject' x5)),
+                        CMemory.wrap_addr (reveal (Ptr.inject' x6)),
+                        CMemory.wrap_addr (reveal (Ptr.inject' x7))),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            (ro uchar_obj ptr' *
+             ro uchar_obj ptr' *
+             ro uchar_obj ptr' *
+             ro uchar_obj ptr' *
+             ro uchar_obj ptr' *
+             ro uchar_obj ptr' *
+             ro uchar_obj ptr' -> (ST_pg_conn.tag, rw) su_obj ptr') fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-4.sml b/libpq/FFI/fptr-rtti-4.sml
new file mode 100644 (file)
index 0000000..309c113
--- /dev/null
@@ -0,0 +1,17 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_4 = struct
+    fun mkcall a x1
+        = pcast
+              (CMemory.unwrap_addr
+                  (Callop_3.callop
+                      (a,
+                       CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_result.tag, rw) su_obj ptr' -> rw uchar_obj ptr') fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-40.sml b/libpq/FFI/fptr-rtti-40.sml
new file mode 100644 (file)
index 0000000..ff2853f
--- /dev/null
@@ -0,0 +1,18 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_40 = struct
+    fun mkcall a (x1, x2)
+        = Cvt.c_sint
+              (CMemory.unwrap_sint
+                  (Callop_10.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_sint (Cvt.ml_sint x2)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, rw) su_obj ptr' * sint -> sint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-41.sml b/libpq/FFI/fptr-rtti-41.sml
new file mode 100644 (file)
index 0000000..62d723c
--- /dev/null
@@ -0,0 +1,18 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_41 = struct
+    fun mkcall a x1
+        = Cvt.i2c_enum
+              (CMemory.unwrap_sint
+                  (Callop_1.callop
+                      (a,
+                       CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, ro) su_obj ptr' ->
+                 ET_'ConnStatusType.tag enum) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-42.sml b/libpq/FFI/fptr-rtti-42.sml
new file mode 100644 (file)
index 0000000..63f66d1
--- /dev/null
@@ -0,0 +1,17 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_42 = struct
+    fun mkcall a (x1, x2)
+        = Callop_0.callop
+              (a,
+               (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                CMemory.wrap_addr (reveal (Ptr.inject' x2))),
+               nil)
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, rw) su_obj ptr' *
+             (ST__IO_FILE.tag, rw) su_obj ptr' -> unit) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-43.sml b/libpq/FFI/fptr-rtti-43.sml
new file mode 100644 (file)
index 0000000..b54edb4
--- /dev/null
@@ -0,0 +1,18 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_43 = struct
+    fun mkcall a (x1, x2)
+        = Cvt.c_uint
+              (CMemory.unwrap_uint
+                  (Callop_14.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_sint (Cvt.ml_sint x2)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, rw) su_obj ptr' * sint -> uint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-44.sml b/libpq/FFI/fptr-rtti-44.sml
new file mode 100644 (file)
index 0000000..b432e12
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_44 = struct
+    fun mkcall a (x1, x2, x3)
+        = Cvt.c_sint
+              (CMemory.unwrap_sint
+                  (Callop_24.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_uint (Cvt.ml_uint x2),
+                        CMemory.wrap_addr (reveal (Ptr.inject' x3))),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, rw) su_obj ptr' * uint * ro uchar_obj ptr' ->
+                 sint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-45.sml b/libpq/FFI/fptr-rtti-45.sml
new file mode 100644 (file)
index 0000000..2f492e2
--- /dev/null
@@ -0,0 +1,18 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_45 = struct
+    fun mkcall a (x1, x2)
+        = Cvt.c_uint
+              (CMemory.unwrap_uint
+                  (Callop_25.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_addr (reveal (Ptr.inject' x2))),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, rw) su_obj ptr' * ro uchar_obj ptr' -> uint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-46.sml b/libpq/FFI/fptr-rtti-46.sml
new file mode 100644 (file)
index 0000000..4941102
--- /dev/null
@@ -0,0 +1,21 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_46 = struct
+    fun mkcall a (x1, x2, x3, x4)
+        = Cvt.c_sint
+              (CMemory.unwrap_sint
+                  (Callop_26.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_sint (Cvt.ml_sint x2),
+                        CMemory.wrap_sint (Cvt.ml_sint x3),
+                        CMemory.wrap_sint (Cvt.ml_sint x4)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, rw) su_obj ptr' * sint * sint * sint ->
+                 sint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-47.sml b/libpq/FFI/fptr-rtti-47.sml
new file mode 100644 (file)
index 0000000..f6d76a7
--- /dev/null
@@ -0,0 +1,19 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_47 = struct
+    fun mkcall a (x1, x2, x3)
+        = Cvt.c_sint
+              (CMemory.unwrap_sint
+                  (Callop_27.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_uint (Cvt.ml_uint x2),
+                        CMemory.wrap_sint (Cvt.ml_sint x3)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, rw) su_obj ptr' * uint * sint -> sint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-48.sml b/libpq/FFI/fptr-rtti-48.sml
new file mode 100644 (file)
index 0000000..90ce59b
--- /dev/null
@@ -0,0 +1,23 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_48 = struct
+    fun mkcall a (x1, x2, x3, x4)
+        = Cvt.c_sint
+              (CMemory.unwrap_sint
+                  (Callop_28.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_sint (Cvt.ml_sint x2),
+                        CMemory.wrap_addr (reveal (Ptr.inject' x3)),
+                        CMemory.wrap_uint (Cvt.ml_uint x4)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, rw) su_obj ptr' *
+             sint *
+             rw uchar_obj ptr' *
+             uint -> sint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-49.sml b/libpq/FFI/fptr-rtti-49.sml
new file mode 100644 (file)
index 0000000..1b746c4
--- /dev/null
@@ -0,0 +1,18 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_49 = struct
+    fun mkcall a (x1, x2)
+        = Cvt.c_sint
+              (CMemory.unwrap_sint
+                  (Callop_29.callop
+                      (a,
+                       (CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                        CMemory.wrap_uint (Cvt.ml_uint x2)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, rw) su_obj ptr' * uint -> sint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-5.sml b/libpq/FFI/fptr-rtti-5.sml
new file mode 100644 (file)
index 0000000..2f36b72
--- /dev/null
@@ -0,0 +1,12 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_5 = struct
+    fun mkcall a ()
+        = pcast (CMemory.unwrap_addr (Callop_4.callop (a, (), nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            (unit -> (ST__PQconninfoOption.tag, rw) su_obj ptr') fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-6.sml b/libpq/FFI/fptr-rtti-6.sml
new file mode 100644 (file)
index 0000000..650ca50
--- /dev/null
@@ -0,0 +1,18 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_6 = struct
+    fun mkcall a x1
+        = Cvt.i2c_enum
+              (CMemory.unwrap_sint
+                  (Callop_1.callop
+                      (a,
+                       CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, rw) su_obj ptr' ->
+                 ET_'PostgresPollingStatusType.tag enum) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-7.sml b/libpq/FFI/fptr-rtti-7.sml
new file mode 100644 (file)
index 0000000..0d056fe
--- /dev/null
@@ -0,0 +1,17 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_7 = struct
+    fun mkcall a x1
+        = pcast
+              (CMemory.unwrap_addr
+                  (Callop_3.callop
+                      (a,
+                       CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            (ro uchar_obj ptr' -> (ST_pg_conn.tag, rw) su_obj ptr') fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-8.sml b/libpq/FFI/fptr-rtti-8.sml
new file mode 100644 (file)
index 0000000..c771e50
--- /dev/null
@@ -0,0 +1,13 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_8 = struct
+    fun mkcall a x1
+        = Callop_2.callop
+              (a, CMemory.wrap_addr (reveal (Ptr.inject' x1)), nil)
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST__PQconninfoOption.tag, rw) su_obj ptr' -> unit) fptr T.typ
+end
+end
diff --git a/libpq/FFI/fptr-rtti-9.sml b/libpq/FFI/fptr-rtti-9.sml
new file mode 100644 (file)
index 0000000..65ee56c
--- /dev/null
@@ -0,0 +1,17 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure FPtrRTTI_9 = struct
+    fun mkcall a x1
+        = Cvt.c_sint
+              (CMemory.unwrap_sint
+                  (Callop_1.callop
+                      (a,
+                       CMemory.wrap_addr (reveal (Ptr.inject' x1)),
+                       nil)))
+    val typ =
+        mk_fptr_typ mkcall :
+            ((ST_pg_conn.tag, rw) su_obj ptr' -> sint) fptr T.typ
+end
+end
diff --git a/libpq/FFI/libpq.h.cm b/libpq/FFI/libpq.h.cm
new file mode 100644 (file)
index 0000000..407cf72
--- /dev/null
@@ -0,0 +1,296 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+(primitive c-int)
+library
+    structure ST_pg_conn
+    structure F_lo_write
+    structure F_lo_unlink
+    structure F_lo_tell
+    structure F_lo_read
+    structure F_lo_open
+    structure F_lo_lseek
+    structure F_lo_import
+    structure F_lo_export
+    structure F_lo_creat
+    structure F_lo_close
+    structure F_PQuser
+    structure F_PQuntrace
+    structure F_PQtty
+    structure F_PQtrace
+    structure F_PQstatus
+    structure F_PQsocket
+    structure F_PQsetnonblocking
+    structure F_PQsetdbLogin
+    structure F_PQsetNoticeProcessor
+    structure F_PQsetClientEncoding
+    structure F_PQsendQuery
+    structure F_PQresultStatus
+    structure F_PQresultErrorMessage
+    structure F_PQresetStart
+    structure F_PQresetPoll
+    structure F_PQreset
+    structure F_PQresStatus
+    structure F_PQrequestCancel
+    structure F_PQputnbytes
+    structure F_PQputline
+    structure F_PQprintTuples
+    structure F_PQprint
+    structure F_PQport
+    structure F_PQpass
+    structure F_PQoptions
+    structure F_PQoidValue
+    structure F_PQoidStatus
+    structure F_PQntuples
+    structure F_PQnotifies
+    structure F_PQnfields
+    structure F_PQmblen
+    structure F_PQmakeEmptyPGresult
+    structure F_PQisnonblocking
+    structure F_PQisBusy
+    structure F_PQhost
+    structure F_PQgetvalue
+    structure F_PQgetlineAsync
+    structure F_PQgetline
+    structure F_PQgetlength
+    structure F_PQgetisnull
+    structure F_PQgetResult
+    structure F_PQftype
+    structure F_PQfsize
+    structure F_PQfreeNotify
+    structure F_PQfnumber
+    structure F_PQfname
+    structure F_PQfn
+    structure F_PQfmod
+    structure F_PQflush
+    structure F_PQfinish
+    structure F_PQexec
+    structure F_PQescapeString
+    structure F_PQescapeBytea
+    structure F_PQerrorMessage
+    structure F_PQenv2encoding
+    structure F_PQendcopy
+    structure F_PQdisplayTuples
+    structure F_PQdb
+    structure F_PQconsumeInput
+    structure F_PQconninfoFree
+    structure F_PQconnectdb
+    structure F_PQconnectStart
+    structure F_PQconnectPoll
+    structure F_PQconndefaults
+    structure F_PQcmdTuples
+    structure F_PQcmdStatus
+    structure F_PQclientEncoding
+    structure F_PQclear
+    structure F_PQbinaryTuples
+    structure F_PQbackendPID
+    structure T_pqbool
+    structure T_PostgresPollingStatusType
+    structure T_PQprintOpt
+    structure T_PQnoticeProcessor
+    structure T_PQconninfoOption
+    structure T_PQArgBlock
+    structure T_PGnotify
+    structure T_ExecStatusType
+    structure T_ConnStatusType
+    structure E_'PostgresPollingStatusType
+    structure E_'ExecStatusType
+    structure E_'ConnStatusType
+    structure U_'PQArgBlock'0
+    structure S_pgNotify
+    structure S__PQprintOpt
+    structure S__PQconninfoOption
+    structure S_'PQArgBlock
+is
+    $/basis.cm
+    $c/internals/c-int.cm
+    $smlnj/init/init.cmi : cm
+    f-lo_write.sml(noguid)
+    f-lo_unlink.sml(noguid)
+    f-lo_tell.sml(noguid)
+    f-lo_read.sml(noguid)
+    f-lo_open.sml(noguid)
+    f-lo_lseek.sml(noguid)
+    f-lo_import.sml(noguid)
+    f-lo_export.sml(noguid)
+    f-lo_creat.sml(noguid)
+    f-lo_close.sml(noguid)
+    f-PQuser.sml(noguid)
+    f-PQuntrace.sml(noguid)
+    f-PQtty.sml(noguid)
+    f-PQtrace.sml(noguid)
+    f-PQstatus.sml(noguid)
+    f-PQsocket.sml(noguid)
+    f-PQsetnonblocking.sml(noguid)
+    f-PQsetdbLogin.sml(noguid)
+    f-PQsetNoticeProcessor.sml(noguid)
+    f-PQsetClientEncoding.sml(noguid)
+    f-PQsendQuery.sml(noguid)
+    f-PQresultStatus.sml(noguid)
+    f-PQresultErrorMessage.sml(noguid)
+    f-PQresetStart.sml(noguid)
+    f-PQresetPoll.sml(noguid)
+    f-PQreset.sml(noguid)
+    f-PQresStatus.sml(noguid)
+    f-PQrequestCancel.sml(noguid)
+    f-PQputnbytes.sml(noguid)
+    f-PQputline.sml(noguid)
+    f-PQprintTuples.sml(noguid)
+    f-PQprint.sml(noguid)
+    f-PQport.sml(noguid)
+    f-PQpass.sml(noguid)
+    f-PQoptions.sml(noguid)
+    f-PQoidValue.sml(noguid)
+    f-PQoidStatus.sml(noguid)
+    f-PQntuples.sml(noguid)
+    f-PQnotifies.sml(noguid)
+    f-PQnfields.sml(noguid)
+    f-PQmblen.sml(noguid)
+    f-PQmakeEmptyPGresult.sml(noguid)
+    f-PQisnonblocking.sml(noguid)
+    f-PQisBusy.sml(noguid)
+    f-PQhost.sml(noguid)
+    f-PQgetvalue.sml(noguid)
+    f-PQgetlineAsync.sml(noguid)
+    f-PQgetline.sml(noguid)
+    f-PQgetlength.sml(noguid)
+    f-PQgetisnull.sml(noguid)
+    f-PQgetResult.sml(noguid)
+    f-PQftype.sml(noguid)
+    f-PQfsize.sml(noguid)
+    f-PQfreeNotify.sml(noguid)
+    f-PQfnumber.sml(noguid)
+    f-PQfname.sml(noguid)
+    f-PQfn.sml(noguid)
+    f-PQfmod.sml(noguid)
+    f-PQflush.sml(noguid)
+    f-PQfinish.sml(noguid)
+    f-PQexec.sml(noguid)
+    f-PQescapeString.sml(noguid)
+    f-PQescapeBytea.sml(noguid)
+    f-PQerrorMessage.sml(noguid)
+    f-PQenv2encoding.sml(noguid)
+    f-PQendcopy.sml(noguid)
+    f-PQdisplayTuples.sml(noguid)
+    f-PQdb.sml(noguid)
+    f-PQconsumeInput.sml(noguid)
+    f-PQconninfoFree.sml(noguid)
+    f-PQconnectdb.sml(noguid)
+    f-PQconnectStart.sml(noguid)
+    f-PQconnectPoll.sml(noguid)
+    f-PQconndefaults.sml(noguid)
+    f-PQcmdTuples.sml(noguid)
+    f-PQcmdStatus.sml(noguid)
+    f-PQclientEncoding.sml(noguid)
+    f-PQclear.sml(noguid)
+    f-PQbinaryTuples.sml(noguid)
+    f-PQbackendPID.sml(noguid)
+    t-pqbool.sml(noguid)
+    t-PostgresPollingStatusType.sml(noguid)
+    t-PQprintOpt.sml(noguid)
+    t-PQnoticeProcessor.sml(noguid)
+    t-PQconninfoOption.sml(noguid)
+    t-PQArgBlock.sml(noguid)
+    t-PGnotify.sml(noguid)
+    t-ExecStatusType.sml(noguid)
+    t-ConnStatusType.sml(noguid)
+    e--PostgresPollingStatusType.sml(noguid)
+    e--ExecStatusType.sml(noguid)
+    e--ConnStatusType.sml(noguid)
+    u--PQArgBlock-0.sml(noguid)
+    s-pgNotify.sml(noguid)
+    s-_PQprintOpt.sml(noguid)
+    s-_PQconninfoOption.sml(noguid)
+    s--PQArgBlock.sml(noguid)
+    st-pg_result.sml(noguid)
+    st-pg_conn.sml(noguid)
+    st-_IO_FILE.sml(noguid)
+    et--PostgresPollingStatusType.sml(noguid)
+    et--ExecStatusType.sml(noguid)
+    et--ConnStatusType.sml(noguid)
+    ut--PQArgBlock-0.sml(noguid)
+    st-pgNotify.sml(noguid)
+    st-_PQprintOpt.sml(noguid)
+    st-_PQconninfoOption.sml(noguid)
+    st--PQArgBlock.sml(noguid)
+    callop-29.sml(noguid)
+    fptr-rtti-49.sml(noguid)
+    callop-28.sml(noguid)
+    fptr-rtti-48.sml(noguid)
+    callop-27.sml(noguid)
+    fptr-rtti-47.sml(noguid)
+    callop-26.sml(noguid)
+    fptr-rtti-46.sml(noguid)
+    callop-25.sml(noguid)
+    fptr-rtti-45.sml(noguid)
+    callop-24.sml(noguid)
+    fptr-rtti-44.sml(noguid)
+    fptr-rtti-43.sml(noguid)
+    fptr-rtti-42.sml(noguid)
+    fptr-rtti-41.sml(noguid)
+    fptr-rtti-40.sml(noguid)
+    callop-23.sml(noguid)
+    fptr-rtti-39.sml(noguid)
+    callop-22.sml(noguid)
+    fptr-rtti-38.sml(noguid)
+    fptr-rtti-37.sml(noguid)
+    callop-21.sml(noguid)
+    fptr-rtti-36.sml(noguid)
+    fptr-rtti-35.sml(noguid)
+    fptr-rtti-34.sml(noguid)
+    callop-20.sml(noguid)
+    fptr-rtti-33.sml(noguid)
+    callop-19.sml(noguid)
+    fptr-rtti-32.sml(noguid)
+    callop-18.sml(noguid)
+    fptr-rtti-31.sml(noguid)
+    fptr-rtti-30.sml(noguid)
+    fptr-rtti-29.sml(noguid)
+    fptr-rtti-28.sml(noguid)
+    fptr-rtti-27.sml(noguid)
+    callop-17.sml(noguid)
+    fptr-rtti-26.sml(noguid)
+    callop-16.sml(noguid)
+    fptr-rtti-25.sml(noguid)
+    callop-15.sml(noguid)
+    fptr-rtti-24.sml(noguid)
+    fptr-rtti-23.sml(noguid)
+    callop-14.sml(noguid)
+    fptr-rtti-22.sml(noguid)
+    fptr-rtti-21.sml(noguid)
+    callop-13.sml(noguid)
+    fptr-rtti-20.sml(noguid)
+    callop-12.sml(noguid)
+    fptr-rtti-19.sml(noguid)
+    callop-11.sml(noguid)
+    fptr-rtti-18.sml(noguid)
+    callop-10.sml(noguid)
+    fptr-rtti-17.sml(noguid)
+    fptr-rtti-16.sml(noguid)
+    callop-9.sml(noguid)
+    fptr-rtti-15.sml(noguid)
+    callop-8.sml(noguid)
+    fptr-rtti-14.sml(noguid)
+    callop-7.sml(noguid)
+    fptr-rtti-13.sml(noguid)
+    callop-6.sml(noguid)
+    fptr-rtti-12.sml(noguid)
+    callop-5.sml(noguid)
+    fptr-rtti-11.sml(noguid)
+    fptr-rtti-10.sml(noguid)
+    fptr-rtti-9.sml(noguid)
+    fptr-rtti-8.sml(noguid)
+    fptr-rtti-7.sml(noguid)
+    fptr-rtti-6.sml(noguid)
+    callop-4.sml(noguid)
+    fptr-rtti-5.sml(noguid)
+    callop-3.sml(noguid)
+    fptr-rtti-4.sml(noguid)
+    callop-2.sml(noguid)
+    fptr-rtti-3.sml(noguid)
+    fptr-rtti-2.sml(noguid)
+    callop-1.sml(noguid)
+    fptr-rtti-1.sml(noguid)
+    callop-0.sml(noguid)
+    fptr-rtti-0.sml(noguid)
+    ../libpq-h.sml
diff --git a/libpq/FFI/s--PQArgBlock.sml b/libpq/FFI/s--PQArgBlock.sml
new file mode 100644 (file)
index 0000000..d72723e
--- /dev/null
@@ -0,0 +1,23 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":163.1-172.13] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure S_'PQArgBlock = struct
+    open ST_'PQArgBlock
+    type t_f_len = sint
+    val typ_f_len = T.sint : t_f_len T.typ
+    fun f_len' (x : (tag, 'c) su_obj')
+        = mk_field' (0, x) : (t_f_len, 'c) obj'
+    fun f_len (x : (tag, 'c) su_obj) = mk_rw_field (typ_f_len, 0, x)
+    type t_f_isint = sint
+    val typ_f_isint = T.sint : t_f_isint T.typ
+    fun f_isint' (x : (tag, 'c) su_obj')
+        = mk_field' (4, x) : (t_f_isint, 'c) obj'
+    fun f_isint (x : (tag, 'c) su_obj) = mk_rw_field (typ_f_isint, 4, x)
+    type t_f_u = UT_'PQArgBlock'0.tag su
+    val typ_f_u = UT_'PQArgBlock'0.typ : t_f_u T.typ
+    fun f_u' (x : (tag, 'c) su_obj') = mk_field' (8, x) : (t_f_u, 'c) obj'
+    fun f_u (x : (tag, 'c) su_obj) = mk_rw_field (typ_f_u, 8, x)
+end
+end
diff --git a/libpq/FFI/s-_PQconninfoOption.sml b/libpq/FFI/s-_PQconninfoOption.sml
new file mode 100644 (file)
index 0000000..c2ed614
--- /dev/null
@@ -0,0 +1,48 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":144.1-157.19] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure S__PQconninfoOption = struct
+    open ST__PQconninfoOption
+    type t_f_keyword = rw uchar_obj ptr
+    val typ_f_keyword = T.pointer T.uchar : t_f_keyword T.typ
+    fun f_keyword' (x : (tag, 'c) su_obj')
+        = mk_field' (0, x) : (t_f_keyword, 'c) obj'
+    fun f_keyword (x : (tag, 'c) su_obj)
+        = mk_rw_field (typ_f_keyword, 0, x)
+    type t_f_envvar = rw uchar_obj ptr
+    val typ_f_envvar = T.pointer T.uchar : t_f_envvar T.typ
+    fun f_envvar' (x : (tag, 'c) su_obj')
+        = mk_field' (4, x) : (t_f_envvar, 'c) obj'
+    fun f_envvar (x : (tag, 'c) su_obj) = mk_rw_field (typ_f_envvar, 4, x)
+    type t_f_compiled = rw uchar_obj ptr
+    val typ_f_compiled = T.pointer T.uchar : t_f_compiled T.typ
+    fun f_compiled' (x : (tag, 'c) su_obj')
+        = mk_field' (8, x) : (t_f_compiled, 'c) obj'
+    fun f_compiled (x : (tag, 'c) su_obj)
+        = mk_rw_field (typ_f_compiled, 8, x)
+    type t_f_val = rw uchar_obj ptr
+    val typ_f_val = T.pointer T.uchar : t_f_val T.typ
+    fun f_val' (x : (tag, 'c) su_obj')
+        = mk_field' (12, x) : (t_f_val, 'c) obj'
+    fun f_val (x : (tag, 'c) su_obj) = mk_rw_field (typ_f_val, 12, x)
+    type t_f_label = rw uchar_obj ptr
+    val typ_f_label = T.pointer T.uchar : t_f_label T.typ
+    fun f_label' (x : (tag, 'c) su_obj')
+        = mk_field' (16, x) : (t_f_label, 'c) obj'
+    fun f_label (x : (tag, 'c) su_obj) = mk_rw_field (typ_f_label, 16, x)
+    type t_f_dispchar = rw uchar_obj ptr
+    val typ_f_dispchar = T.pointer T.uchar : t_f_dispchar T.typ
+    fun f_dispchar' (x : (tag, 'c) su_obj')
+        = mk_field' (20, x) : (t_f_dispchar, 'c) obj'
+    fun f_dispchar (x : (tag, 'c) su_obj)
+        = mk_rw_field (typ_f_dispchar, 20, x)
+    type t_f_dispsize = sint
+    val typ_f_dispsize = T.sint : t_f_dispsize T.typ
+    fun f_dispsize' (x : (tag, 'c) su_obj')
+        = mk_field' (24, x) : (t_f_dispsize, 'c) obj'
+    fun f_dispsize (x : (tag, 'c) su_obj)
+        = mk_rw_field (typ_f_dispsize, 24, x)
+end
+end
diff --git a/libpq/FFI/s-_PQprintOpt.sml b/libpq/FFI/s-_PQprintOpt.sml
new file mode 100644 (file)
index 0000000..5cedbf7
--- /dev/null
@@ -0,0 +1,66 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":120.1-134.13] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure S__PQprintOpt = struct
+    open ST__PQprintOpt
+    type t_f_header = uchar
+    val typ_f_header = T.uchar : t_f_header T.typ
+    fun f_header' (x : (tag, 'c) su_obj')
+        = mk_field' (0, x) : (t_f_header, 'c) obj'
+    fun f_header (x : (tag, 'c) su_obj) = mk_rw_field (typ_f_header, 0, x)
+    type t_f_align = uchar
+    val typ_f_align = T.uchar : t_f_align T.typ
+    fun f_align' (x : (tag, 'c) su_obj')
+        = mk_field' (1, x) : (t_f_align, 'c) obj'
+    fun f_align (x : (tag, 'c) su_obj) = mk_rw_field (typ_f_align, 1, x)
+    type t_f_standard = uchar
+    val typ_f_standard = T.uchar : t_f_standard T.typ
+    fun f_standard' (x : (tag, 'c) su_obj')
+        = mk_field' (2, x) : (t_f_standard, 'c) obj'
+    fun f_standard (x : (tag, 'c) su_obj)
+        = mk_rw_field (typ_f_standard, 2, x)
+    type t_f_html3 = uchar
+    val typ_f_html3 = T.uchar : t_f_html3 T.typ
+    fun f_html3' (x : (tag, 'c) su_obj')
+        = mk_field' (3, x) : (t_f_html3, 'c) obj'
+    fun f_html3 (x : (tag, 'c) su_obj) = mk_rw_field (typ_f_html3, 3, x)
+    type t_f_expanded = uchar
+    val typ_f_expanded = T.uchar : t_f_expanded T.typ
+    fun f_expanded' (x : (tag, 'c) su_obj')
+        = mk_field' (4, x) : (t_f_expanded, 'c) obj'
+    fun f_expanded (x : (tag, 'c) su_obj)
+        = mk_rw_field (typ_f_expanded, 4, x)
+    type t_f_pager = uchar
+    val typ_f_pager = T.uchar : t_f_pager T.typ
+    fun f_pager' (x : (tag, 'c) su_obj')
+        = mk_field' (5, x) : (t_f_pager, 'c) obj'
+    fun f_pager (x : (tag, 'c) su_obj) = mk_rw_field (typ_f_pager, 5, x)
+    type t_f_fieldSep = rw uchar_obj ptr
+    val typ_f_fieldSep = T.pointer T.uchar : t_f_fieldSep T.typ
+    fun f_fieldSep' (x : (tag, 'c) su_obj')
+        = mk_field' (8, x) : (t_f_fieldSep, 'c) obj'
+    fun f_fieldSep (x : (tag, 'c) su_obj)
+        = mk_rw_field (typ_f_fieldSep, 8, x)
+    type t_f_tableOpt = rw uchar_obj ptr
+    val typ_f_tableOpt = T.pointer T.uchar : t_f_tableOpt T.typ
+    fun f_tableOpt' (x : (tag, 'c) su_obj')
+        = mk_field' (12, x) : (t_f_tableOpt, 'c) obj'
+    fun f_tableOpt (x : (tag, 'c) su_obj)
+        = mk_rw_field (typ_f_tableOpt, 12, x)
+    type t_f_caption = rw uchar_obj ptr
+    val typ_f_caption = T.pointer T.uchar : t_f_caption T.typ
+    fun f_caption' (x : (tag, 'c) su_obj')
+        = mk_field' (16, x) : (t_f_caption, 'c) obj'
+    fun f_caption (x : (tag, 'c) su_obj)
+        = mk_rw_field (typ_f_caption, 16, x)
+    type t_f_fieldName = (rw uchar_obj ptr, rw) obj ptr
+    val typ_f_fieldName =
+        T.pointer (T.pointer T.uchar) : t_f_fieldName T.typ
+    fun f_fieldName' (x : (tag, 'c) su_obj')
+        = mk_field' (20, x) : (t_f_fieldName, 'c) obj'
+    fun f_fieldName (x : (tag, 'c) su_obj)
+        = mk_rw_field (typ_f_fieldName, 20, x)
+end
+end
diff --git a/libpq/FFI/s-pgNotify.sml b/libpq/FFI/s-pgNotify.sml
new file mode 100644 (file)
index 0000000..5eeb45d
--- /dev/null
@@ -0,0 +1,22 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":106.1-111.11] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure S_pgNotify = struct
+    open ST_pgNotify
+    type t_f_relname = (uchar, dec dg3 dg2) arr
+    val typ_f_relname =
+        T.arr (T.uchar, dec dg3 dg2 dim) : t_f_relname T.typ
+    fun f_relname' (x : (tag, 'c) su_obj')
+        = mk_field' (0, x) : (t_f_relname, 'c) obj'
+    fun f_relname (x : (tag, 'c) su_obj)
+        = mk_rw_field (typ_f_relname, 0, x)
+    type t_f_be_pid = sint
+    val typ_f_be_pid = T.sint : t_f_be_pid T.typ
+    fun f_be_pid' (x : (tag, 'c) su_obj')
+        = mk_field' (32, x) : (t_f_be_pid, 'c) obj'
+    fun f_be_pid (x : (tag, 'c) su_obj)
+        = mk_rw_field (typ_f_be_pid, 32, x)
+end
+end
diff --git a/libpq/FFI/st--PQArgBlock.sml b/libpq/FFI/st--PQArgBlock.sml
new file mode 100644 (file)
index 0000000..1503fab
--- /dev/null
@@ -0,0 +1,17 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":163.1-172.13] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    structure S_'PQArgBlock = struct
+        local
+            open Tag
+        in
+            type tag = s t_' t_P t_Q t_A t_r t_g t_B t_l t_o t_c t_k
+        end
+        val size = C_Int.mk_su_size 0wxc : tag C.su C.S.size
+        val typ = C_Int.mk_su_typ size
+    end
+in
+    structure ST_'PQArgBlock = S_'PQArgBlock
+end
diff --git a/libpq/FFI/st-_IO_FILE.sml b/libpq/FFI/st-_IO_FILE.sml
new file mode 100644 (file)
index 0000000..ccce6a5
--- /dev/null
@@ -0,0 +1,14 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    structure S__IO_FILE = struct
+        local
+            open Tag
+        in
+            type tag = s t__ t_I t_O t__ t_F t_I t_L t_E
+        end
+    end
+in
+    structure ST__IO_FILE = S__IO_FILE
+end
diff --git a/libpq/FFI/st-_PQconninfoOption.sml b/libpq/FFI/st-_PQconninfoOption.sml
new file mode 100644 (file)
index 0000000..f1330a2
--- /dev/null
@@ -0,0 +1,18 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":144.1-157.19] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    structure S__PQconninfoOption = struct
+        local
+            open Tag
+        in
+            type tag =
+                s t__ t_P t_Q t_c t_o t_n t_n t_i t_n t_f t_o t_O t_p t_t t_i t_o t_n
+        end
+        val size = C_Int.mk_su_size 0wx1c : tag C.su C.S.size
+        val typ = C_Int.mk_su_typ size
+    end
+in
+    structure ST__PQconninfoOption = S__PQconninfoOption
+end
diff --git a/libpq/FFI/st-_PQprintOpt.sml b/libpq/FFI/st-_PQprintOpt.sml
new file mode 100644 (file)
index 0000000..0dc2e8a
--- /dev/null
@@ -0,0 +1,17 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":120.1-134.13] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    structure S__PQprintOpt = struct
+        local
+            open Tag
+        in
+            type tag = s t__ t_P t_Q t_p t_r t_i t_n t_t t_O t_p t_t
+        end
+        val size = C_Int.mk_su_size 0wx18 : tag C.su C.S.size
+        val typ = C_Int.mk_su_typ size
+    end
+in
+    structure ST__PQprintOpt = S__PQprintOpt
+end
diff --git a/libpq/FFI/st-pgNotify.sml b/libpq/FFI/st-pgNotify.sml
new file mode 100644 (file)
index 0000000..a05c785
--- /dev/null
@@ -0,0 +1,17 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":106.1-111.11] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    structure S_pgNotify = struct
+        local
+            open Tag
+        in
+            type tag = s t_p t_g t_N t_o t_t t_i t_f t_y
+        end
+        val size = C_Int.mk_su_size 0wx24 : tag C.su C.S.size
+        val typ = C_Int.mk_su_typ size
+    end
+in
+    structure ST_pgNotify = S_pgNotify
+end
diff --git a/libpq/FFI/st-pg_conn.sml b/libpq/FFI/st-pg_conn.sml
new file mode 100644 (file)
index 0000000..a36fd30
--- /dev/null
@@ -0,0 +1,14 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    structure S_pg_conn = struct
+        local
+            open Tag
+        in
+            type tag = s t_p t_g t__ t_c t_o t_n t_n
+        end
+    end
+in
+    structure ST_pg_conn = S_pg_conn
+end
diff --git a/libpq/FFI/st-pg_result.sml b/libpq/FFI/st-pg_result.sml
new file mode 100644 (file)
index 0000000..840a572
--- /dev/null
@@ -0,0 +1,14 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    structure S_pg_result = struct
+        local
+            open Tag
+        in
+            type tag = s t_p t_g t__ t_r t_e t_s t_u t_l t_t
+        end
+    end
+in
+    structure ST_pg_result = S_pg_result
+end
diff --git a/libpq/FFI/t-ConnStatusType.sml b/libpq/FFI/t-ConnStatusType.sml
new file mode 100644 (file)
index 0000000..7a36258
--- /dev/null
@@ -0,0 +1,10 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":38.1-60.17] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C in
+structure T_ConnStatusType = struct
+    type t = ET_'ConnStatusType.tag enum T.typ
+    val typ = T.enum : ET_'ConnStatusType.tag enum T.typ : t
+end
+end
diff --git a/libpq/FFI/t-ExecStatusType.sml b/libpq/FFI/t-ExecStatusType.sml
new file mode 100644 (file)
index 0000000..69d585c
--- /dev/null
@@ -0,0 +1,10 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":71.1-86.17] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C in
+structure T_ExecStatusType = struct
+    type t = ET_'ExecStatusType.tag enum T.typ
+    val typ = T.enum : ET_'ExecStatusType.tag enum T.typ : t
+end
+end
diff --git a/libpq/FFI/t-PGnotify.sml b/libpq/FFI/t-PGnotify.sml
new file mode 100644 (file)
index 0000000..e52a889
--- /dev/null
@@ -0,0 +1,10 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":106.1-111.11] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C in
+structure T_PGnotify = struct
+    type t = ST_pgNotify.tag su T.typ
+    val typ = ST_pgNotify.typ : t
+end
+end
diff --git a/libpq/FFI/t-PQArgBlock.sml b/libpq/FFI/t-PQArgBlock.sml
new file mode 100644 (file)
index 0000000..02789c6
--- /dev/null
@@ -0,0 +1,10 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":163.1-172.13] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C in
+structure T_PQArgBlock = struct
+    type t = ST_'PQArgBlock.tag su T.typ
+    val typ = ST_'PQArgBlock.typ : t
+end
+end
diff --git a/libpq/FFI/t-PQconninfoOption.sml b/libpq/FFI/t-PQconninfoOption.sml
new file mode 100644 (file)
index 0000000..1ba7b35
--- /dev/null
@@ -0,0 +1,10 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":144.1-157.19] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C in
+structure T_PQconninfoOption = struct
+    type t = ST__PQconninfoOption.tag su T.typ
+    val typ = ST__PQconninfoOption.typ : t
+end
+end
diff --git a/libpq/FFI/t-PQnoticeProcessor.sml b/libpq/FFI/t-PQnoticeProcessor.sml
new file mode 100644 (file)
index 0000000..bb6c842
--- /dev/null
@@ -0,0 +1,10 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":115.1-67] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C in
+structure T_PQnoticeProcessor = struct
+    type t = (voidptr * ro uchar_obj ptr' -> unit) fptr T.typ
+    val typ = FPtrRTTI_0.typ : t
+end
+end
diff --git a/libpq/FFI/t-PQprintOpt.sml b/libpq/FFI/t-PQprintOpt.sml
new file mode 100644 (file)
index 0000000..65e9376
--- /dev/null
@@ -0,0 +1,10 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":120.1-134.13] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C in
+structure T_PQprintOpt = struct
+    type t = ST__PQprintOpt.tag su T.typ
+    val typ = ST__PQprintOpt.typ : t
+end
+end
diff --git a/libpq/FFI/t-PostgresPollingStatusType.sml b/libpq/FFI/t-PostgresPollingStatusType.sml
new file mode 100644 (file)
index 0000000..6349766
--- /dev/null
@@ -0,0 +1,10 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":62.1-69.28] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C in
+structure T_PostgresPollingStatusType = struct
+    type t = ET_'PostgresPollingStatusType.tag enum T.typ
+    val typ = T.enum : ET_'PostgresPollingStatusType.tag enum T.typ : t
+end
+end
diff --git a/libpq/FFI/t-pqbool.sml b/libpq/FFI/t-pqbool.sml
new file mode 100644 (file)
index 0000000..a78c685
--- /dev/null
@@ -0,0 +1,10 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":118.1-20] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C in
+structure T_pqbool = struct
+    type t = uchar T.typ
+    val typ = T.uchar : t
+end
+end
diff --git a/libpq/FFI/u--PQArgBlock-0.sml b/libpq/FFI/u--PQArgBlock-0.sml
new file mode 100644 (file)
index 0000000..d56cd2e
--- /dev/null
@@ -0,0 +1,20 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":163.1-172.13] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local open C.Dim C_Int in
+structure U_'PQArgBlock'0 = struct
+    open UT_'PQArgBlock'0
+    type t_f_ptr = rw sint_obj ptr
+    val typ_f_ptr = T.pointer T.sint : t_f_ptr T.typ
+    fun f_ptr' (x : (tag, 'c) su_obj')
+        = mk_field' (0, x) : (t_f_ptr, 'c) obj'
+    fun f_ptr (x : (tag, 'c) su_obj) = mk_rw_field (typ_f_ptr, 0, x)
+    type t_f_integer = sint
+    val typ_f_integer = T.sint : t_f_integer T.typ
+    fun f_integer' (x : (tag, 'c) su_obj')
+        = mk_field' (0, x) : (t_f_integer, 'c) obj'
+    fun f_integer (x : (tag, 'c) su_obj)
+        = mk_rw_field (typ_f_integer, 0, x)
+end
+end
diff --git a/libpq/FFI/ut--PQArgBlock-0.sml b/libpq/FFI/ut--PQArgBlock-0.sml
new file mode 100644 (file)
index 0000000..fdbe685
--- /dev/null
@@ -0,0 +1,18 @@
+(* This file has been generated automatically. DO NOT EDIT! *)
+(* [from code at "/usr/include/postgresql/libpq-fe.h":163.1-172.13] *)
+(* [by Matthias Blume's ml-nlffigen (version 0.9) for x86-unix] *)
+(* Send comments and suggestions to blume@research.bell-labs.com. Thanks! *)
+local
+    structure U_'PQArgBlock'0 = struct
+        local
+            open Tag
+        in
+            type tag =
+                u t_' t_P t_Q t_A t_r t_g t_B t_l t_o t_c t_k t_' t_0
+        end
+        val size = C_Int.mk_su_size 0wx4 : tag C.su C.S.size
+        val typ = C_Int.mk_su_typ size
+    end
+in
+    structure UT_'PQArgBlock'0 = U_'PQArgBlock'0
+end
diff --git a/libpq/Makefile b/libpq/Makefile
new file mode 100644 (file)
index 0000000..aa3eac0
--- /dev/null
@@ -0,0 +1,8 @@
+FILES = /usr/include/postgresql/libpq-fe.h
+H = LibpqH.libh
+D = FFI
+HF = ../libpq-h.sml
+CF = libpq.h.cm
+
+$(D)/$(CF): $(FILES)
+       ml-nlffigen -include $(HF) -libhandle $(H) -dir $(D) -cmfile $(CF) $^
\ No newline at end of file
diff --git a/libpq/libpq-h.sml b/libpq/libpq-h.sml
new file mode 100644 (file)
index 0000000..544f73a
--- /dev/null
@@ -0,0 +1,12 @@
+structure LibpqH = struct
+    local
+        val lh = DynLinkage.open_lib
+             { name = "/usr/lib/libpq.so", global = true, lazy = true }
+    in
+        fun libh s = let
+            val sh = DynLinkage.lib_symbol (lh, s)
+        in
+            fn () => DynLinkage.addr sh
+        end
+    end
+end
diff --git a/libpq/pg.sml b/libpq/pg.sml
new file mode 100644 (file)
index 0000000..928bf98
--- /dev/null
@@ -0,0 +1,244 @@
+(*
+ * SQL database interfaces for Standard ML
+ * Copyright (C) 2003  Adam Chlipala
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *)
+
+structure PgDriver :> SQL_DRIVER =
+struct
+    val print = TextIO.print
+
+    type conn = (ST_pg_conn.tag, C.rw) C.su_obj C.ptr'
+
+    exception Sql of string
+
+    fun cerrmsg con = Int32.toString (F_PQstatus.f' (C.Ptr.ro' con)) ^ ": "
+                     ^ ZString.toML' (F_PQerrorMessage.f' (C.Ptr.ro' con))
+
+    fun errmsg (con, res, query) = Int32.toString (F_PQresultStatus.f' (C.Ptr.ro' res)) ^ ": " ^ ZString.toML' (F_PQresultErrorMessage.f' (C.Ptr.ro' res)) ^ ": " ^ ZString.toML' query
+
+    fun conn params =
+       let
+           val params = ZString.dupML' params
+           val c = F_PQconnectdb.f' params
+           val _ = C.free' params
+       in
+           if C.Ptr.isNull' c then
+               raise Sql "Null connection returned"
+           else
+               (case F_PQstatus.f' (C.Ptr.ro' c) of
+                    0 => c
+                  | _ =>
+                    let
+                        val msg = cerrmsg c
+                    in
+                        F_PQfinish.f' c;
+                        raise Sql msg
+                    end)
+       end
+
+    fun close c = ignore (F_PQfinish.f' c)
+
+    fun dml c q =
+       let
+           val q = ZString.dupML' q
+           val res = F_PQexec.f' (c, q)
+           val roRes = C.Ptr.ro' res
+           val code = F_PQresultStatus.f' roRes
+           fun done () = (C.free' q;
+                          F_PQclear.f' res)
+       in
+           case code of
+               1 => (done ();
+                     "")
+             | _ =>
+               let
+                   val msg = errmsg (c, res, q)
+               in
+                   done ();
+                   raise Sql msg
+               end
+       end
+
+    fun fold c f b q =
+       let
+           val q = ZString.dupML' q
+           val res = F_PQexec.f' (c, q)
+           val roRes = C.Ptr.ro' res
+           fun done () = (C.free' q;
+                          F_PQclear.f' res)
+
+           val code = F_PQresultStatus.f' roRes
+       in
+           case code of
+               2 =>
+               let
+                   val nt = F_PQntuples.f' roRes
+                   val nf = F_PQnfields.f' roRes
+
+                   fun builder (i, acc) =
+                       if i = nt then
+                           acc
+                       else
+                           let
+                               fun build (~1, acc) = acc
+                                 | build (j, acc) =
+                                   build (j-1, ZString.toML' (F_PQgetvalue.f' (roRes, i, j)) :: acc)
+                           in
+                               builder (i+1, f (build (nf-1, []), acc))
+                           end
+               in
+                   builder (0, b)
+                   before done ()
+               end
+             | code =>
+               let
+                   val msg = errmsg (c, res, q)
+               in
+                   done ();
+                   raise Sql msg
+               end
+       end
+
+
+    type timestamp = Time.time
+    exception Format of string
+
+    fun intToSql n =
+       if n < 0 then
+           "-" ^ Int.toString(~n)
+       else
+           Int.toString n
+    fun intFromSql "" = 0
+      | intFromSql s =
+       (case Int.fromString s of
+            NONE => raise Format ("Bad integer: " ^ s)
+          | SOME n => n)
+
+    fun stringToSql s =
+       let
+           fun xch #"'" = "\\'"
+             | xch #"\n" = "\\n"
+             | xch #"\r" = "\\r"
+             | xch c = str c
+       in
+           foldl (fn (c, s) => s ^ xch c) "'" (String.explode s) ^ "'"
+       end
+    fun stringFromSql s = s
+
+    fun realToSql s =
+       if s < 0.0 then
+           "-" ^ Real.toString(~s)
+       else
+           Real.toString s
+    fun realFromSql "" = 0.0
+      | realFromSql s =
+       (case Real.fromString s of
+            NONE => raise Format ("Bad real: " ^ s)
+          | SOME r => r)
+    fun realToString s = realToSql s
+
+    fun toMonth m =
+       let
+           open Date
+       in
+           case m of
+               1 => Jan
+             | 2 => Feb
+             | 3 => Mar
+             | 4 => Apr
+             | 5 => May
+             | 6 => Jun
+             | 7 => Jul
+             | 8 => Aug
+             | 9 => Sep
+             | 10 => Oct
+             | 11 => Nov
+             | 12 => Dec
+             | _ => raise Format "Invalid month number"
+       end
+
+    fun fromMonth m =
+       let
+           open Date
+       in
+           case m of
+               Jan => 1
+             | Feb => 2
+             | Mar => 3
+             | Apr => 4
+             | May => 5
+             | Jun => 6
+             | Jul => 7
+             | Aug => 8
+             | Sep => 9
+             | Oct => 10
+             | Nov => 11
+             | Dec => 12
+       end
+
+    fun pad' (s, 0) = s
+      | pad' (s, n) = pad' ("0" ^ s, n-1)
+    fun pad (n, i) = pad' (Int.toString n, i)
+
+    fun offsetStr NONE = "+00"
+      | offsetStr (SOME n) =
+       let
+           val n = Int32.toInt (Time.toSeconds n) div 3600
+       in
+           if n < 0 then
+               "-" ^ pad (~n, 2)
+           else
+               "+" ^ pad (n, 2)
+       end
+
+    fun timestampToSql t =
+       let
+           val d = Date.fromTimeLocal t
+       in
+           "'" ^ pad (Date.year d, 4) ^ "-" ^ pad (fromMonth (Date.month d), 2) ^ "-" ^ pad (Date.day d, 2) ^
+           " " ^ pad (Date.hour d, 2) ^ ":" ^ pad (Date.minute d, 2) ^ ":" ^ pad (Date.second d, 2) ^
+           ".000000+" ^ offsetStr (Date.offset d) ^ "'"
+       end
+    fun timestampFromSql s =
+       let
+           val tokens = String.tokens (fn ch => ch = #"-" orelse ch = #" " orelse ch = #":"
+                                                orelse ch = #"." orelse ch = #"+") s
+       in
+           case tokens of
+               [year, mon, day, hour, minute, second, _, offset] =>
+               Date.toTime (Date.date {day = intFromSql day, hour = intFromSql mon, minute = intFromSql minute,
+                                       month = toMonth (intFromSql mon),
+                                       offset = SOME (Time.fromSeconds (Int32.fromInt (intFromSql offset * 3600))),
+                                       second = intFromSql second div 1000, year = intFromSql year})
+             | _ => raise Format "Invalid timestamp"
+       end
+               
+
+    fun boolToSql true = "TRUE"
+      | boolToSql false = "FALSE"
+
+    fun boolFromSql "FALSE" = false
+      | boolFromSql "f" = false
+      | boolFromSql "false" = false
+      | boolFromSql "n" = false
+      | boolFromSql "no" = false
+      | boolFromSql "0" = false
+      | boolFromSql "" = false
+      | boolFromSql _ = true
+end
+
+structure PgClient = SqlClient(PgDriver)
\ No newline at end of file
diff --git a/libpq/sources.cm b/libpq/sources.cm
new file mode 100644 (file)
index 0000000..dd36ba9
--- /dev/null
@@ -0,0 +1,31 @@
+(*
+ * SQL database interfaces for Standard ML
+ * Copyright (C) 2003  Adam Chlipala
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *)
+
+library
+     library(FFI/libpq.h.cm)
+     structure PgClient
+is
+     ../smlsql.cm
+
+     $/basis.cm
+     $c/c.cm
+     FFI/libpq.h.cm (*: make ()*)
+
+     pg.sml
+     pg.sig
diff --git a/smlsql.cm b/smlsql.cm
new file mode 100644 (file)
index 0000000..c1aeedd
--- /dev/null
+++ b/smlsql.cm
@@ -0,0 +1,29 @@
+(*
+ * SQL database interfaces for Standard ML
+ * Copyright (C) 2003  Adam Chlipala
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *)
+
+Library
+       signature SQL_DRIVER
+       signature SQL_CLIENT
+       functor SqlClient
+is
+       $/basis.cm
+
+       sql_driver.sig
+       sql_client.sig
+       sql_client.sml
diff --git a/sql_client.sig b/sql_client.sig
new file mode 100644 (file)
index 0000000..9109f49
--- /dev/null
@@ -0,0 +1,38 @@
+(*
+ * SQL database interfaces for Standard ML
+ * Copyright (C) 2003  Adam Chlipala
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *)
+
+(* Signature for a full-fledged client interface *)
+
+signature SQL_CLIENT =
+sig
+    include SQL_DRIVER
+
+    val query : conn -> string -> string list list
+    (* Get thr row results of an SQL query over a connection *)
+
+    val oneRow : conn -> string -> string list
+    (* Make a query that must return exactly one row *)
+    val oneOrNoRows : conn -> string -> string list option
+    (* Make a query that may return zero or one row *)
+
+    val app : conn -> (string list -> unit) -> string -> unit
+    (* Behaves like List.app over the results of a query *)
+    val map : conn -> (string list -> 'a) -> string -> 'a list
+    (* Behaves like List.map over the results of a query *)
+end
diff --git a/sql_client.sml b/sql_client.sml
new file mode 100644 (file)
index 0000000..ed6ea42
--- /dev/null
@@ -0,0 +1,41 @@
+(*
+ * SQL database interfaces for Standard ML
+ * Copyright (C) 2003  Adam Chlipala
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *)
+
+(* Functor for creating a client from a minimal driver *)
+
+functor SqlClient(Driver : SQL_DRIVER) :> SQL_CLIENT
+           where type conn = Driver.conn =
+struct
+    open Driver
+
+    fun oneOrNoRows conn query =
+       fold conn (fn (row, NONE) => SOME row
+                   | (_, SOME _) => raise Sql "Expected one or zero rows; got multiple") NONE query
+
+    fun oneRow conn query =
+       (case oneOrNoRows conn query of
+            NONE => raise Sql "Expected one row; got none"
+          | SOME row => row)
+
+    fun app conn f q = fold conn (fn (row, ()) => f row) () q
+    fun map conn f q = List.rev (fold conn (fn (row, out) => (f row)::out) [] q)
+
+    fun query conn q = List.rev (fold conn op:: [] q)
+end
+
diff --git a/sql_driver.sig b/sql_driver.sig
new file mode 100644 (file)
index 0000000..2b1016e
--- /dev/null
@@ -0,0 +1,53 @@
+(*
+ * SQL database interfaces for Standard ML
+ * Copyright (C) 2003  Adam Chlipala
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *)
+
+(* Signature to be implemented to make use of a new client *)
+
+signature SQL_DRIVER =
+sig
+    type conn
+    (* SQL client connection *)
+
+    exception Sql of string
+    (* All-purpose exception *)
+
+    val conn : string -> conn
+    (* Connect to a server based on a string of information *)
+    val close : conn -> unit
+    (* Close a connection *)
+    val dml : conn -> string -> string
+    (* Execute a DML command over a connection, returning a result message *)
+    val fold : conn -> (string list * 'a -> 'a) -> 'a -> string -> 'a
+    (* Behaves like List.foldl, applied over the result rows of a query *)
+
+    type timestamp = Time.time
+    exception Format of string
+
+    (* Conversions between SML values and their string representations from SQL queries *)
+    val intToSql : int -> string
+    val intFromSql : string -> int
+    val stringToSql : string -> string
+    val stringFromSql : string -> string
+    val timestampToSql : timestamp -> string
+    val timestampFromSql : string -> timestamp
+    val realToSql : real -> string
+    val realFromSql : string -> real
+    val boolToSql : bool -> string
+    val boolFromSql : string -> bool
+end