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
polymorphic variants (2) + magic
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-06-13 (16:44)
From: Jean-Christophe Filliatre <filliatr@c...>
Subject: Re: Obj.magic

> The Obj module allows nearly direct access to the memory image of the
> Caml runtime system.  My small program explains usefulness and danger
> of this module.  The "show_val" function takes an arbitrary Caml value
> and prints out their internal representation.

I should  mention that  I also  wrote such a  function to  display the
internal representation of ocaml values some time ago, which of course
makes a great use of Obj.magic. It is available here:

For a direct access to the documented code with an example, see:

Jean-Christophe Filliatre    
  Computer Science Laboratory   Phone (650) 859-5173
  SRI International             FAX   (650) 859-2844
  333 Ravenswood Ave.           email
  Menlo Park, CA 94025, USA     web