Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Suggested addition to Unix module
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1997-08-25 (13:54)
From: Judicael Courant <Judicael.Courant@e...>
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