Re: Suggested addition to Unix module

From: Judicael Courant (Judicael.Courant@ens-lyon.fr)
Date: Mon Aug 25 1997 - 13:55:49 MET DST


Date: Mon, 25 Aug 1997 13:55:49 +0200 (MET DST)
Message-Id: <199708251155.NAA04138@champagne.ens-lyon.fr>
From: Judicael Courant <Judicael.Courant@ens-lyon.fr>
To: ajenkins@cs.umass.edu
Subject: Re: Suggested addition to Unix module

Hello,

>
>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
descr_of_fd.

Judicael.

-- 
Judicael.Courant@ens-lyon.fr, http://www.ens-lyon.fr/~jcourant/
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