Re: Suggested addition to Unix module

From: Judicael Courant (
Date: Mon Aug 25 1997 - 13:55:49 MET DST

Date: Mon, 25 Aug 1997 13:55:49 +0200 (MET DST)
Message-Id: <>
From: Judicael Courant <>
Subject: Re: Suggested addition to Unix module


>Also, is there a way to cast in OCaml instead of doing what I've done
>here, when you know the internal representations of two types are the
>same? I realize this could be abused, turning OCaml into C, but then
>what I did below is kind of silly too. Thank you.

you should consider using the function magic of module Obj... it is a
more generic implementation of your functions fd_of_descr and


tel : (+33) 04 72 72 85 82
Beware of bugs in the above code; I have only proved it correct, not tried it.
                -- Donald Knuth

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