From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 22CFDBB9A for ; Sat, 29 Oct 2005 05:47:20 +0200 (CEST) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.202]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j9T3lJND003345 for ; Sat, 29 Oct 2005 05:47:19 +0200 Received: by xproxy.gmail.com with SMTP id s15so505314wxc for ; Fri, 28 Oct 2005 20:47:19 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=T8tTeJf2clMvrgKB+e23xJF4LKobyeMWu41TfcFsiI6heJwG8Rp/aSzUBloS8JIpZzai3bb58kaIJ+rmK1ouOFfHvJshmE+RLCMESi7TB84nnx19ESO+4BZtiHGAii6IJvkHpfsB0iHGJyua1gqQMhRV4yQ5+x2KPEVTwVaGIHo= Received: by 10.65.163.13 with SMTP id q13mr598365qbo; Fri, 28 Oct 2005 20:47:18 -0700 (PDT) Received: by 10.65.23.20 with HTTP; Fri, 28 Oct 2005 20:47:18 -0700 (PDT) Message-ID: Date: Sat, 29 Oct 2005 16:47:18 +1300 From: Jonathan Roewen To: caml-list@yquem.inria.fr Subject: [Caml-list] Changing implementations of standard libraries... MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Miltered: at nez-perce with ID 4362F0C7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 compiler:01 pervasives:01 cmi:01 stdlib:01 cmi:01 pervasives:01 stdin:01 ocaml:01 stdlib:01 ocaml:01 ...:98 unix:01 abstract:01 kernel:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.9 required=5.0 tests=RCVD_BY_IP, RCVD_IN_BL_SPAMCOP_NET autolearn=disabled version=3.0.3 Hi, What changes does -vmthread make to the compiler when generating code? I see vmthreads provides it's own version of pervasives for starters. Also, as long as the .cmi files don't change, one would be free to replace the implementation with any thing they see fit, correct? For example, for my OS project, I would probably want to change the implementation for the stdlib such that in_channel & out_channel would be implemented on top of my OCaml-based VFS layer, rather than relying on C code. I would assume, for example, that since in_channel is considered abstract in the .cmi file, I could change the actual implementation of the type to a custom record type -- is that correct? Another example would be modifying vmthreads package to work inside an OCaml-based process. This would then extend to pervasives and stdin/out/err, so that they work correctly (from the ocaml process data structure's file handles, rather than some global C variables). Apart from Unix module, which I'd like to do away with, the rest of stdlib seems to be quite useful, just not compatible in the current implementation for building a kernel without requiring doing lots of stuff in C. I'm just not sure what to do with things like select(), and whether I could implement some sort of replacement in ocaml, but that's a separate issue entirely. Kindest Regards, Jonathan