Objective Caml's Unix libraries

From: Pawel Wojciechowski (Pawel.Wojciechowski@cl.cam.ac.uk)
Date: Wed Mar 12 1997 - 00:05:37 MET

To: caml-list@inria.fr, Xavier.Leroy@inria.fr
Subject: Objective Caml's Unix libraries
Date: Tue, 11 Mar 1997 23:05:37 +0000
From: Pawel Wojciechowski <Pawel.Wojciechowski@cl.cam.ac.uk>
Message-Id: <E0w4aby-0001c1-00@heaton.cl.cam.ac.uk>

It seems to me that in the interface file unix.mli (from the directory
otherlibs/unix of the Objective Caml release 1.03), one line should be
amended. Instead of

(*** Basic file input/output *)

type file_descr

there should be:

(*** Basic file input/output *)

type file_descr = int

This allowed me to avoid some problems when using file descriptors
(I recently signalled my problem on the mailing list).

File descriptors are integers indeed. On the other hand, there is
a correct definition of this type (ie as above) in the main file unix.ml,
so everything should be ok (or I am wrong?). Unfortunately without that
small amendment in the library files, I couldn't compile my program
without an error: "This expression has type int but is here used with
type Unix.file_descr"



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:09 MET