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: -- (:)
From: Ken Wakita <wakita@i...>
Subject: Re: polymorphic variants (2) + 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.



In message (<>)
from David Chemouil <>,
talking about "Obj.magic",
on Fri, 09 Jun 2000 10:57:28 +0200

> I'd like to get information about Obj.magic. I know it is some kind of
> identity function `a -> `b, but I'd like to know how it can be used, why
> it can be interesting and why, also, it is sometimes dangerous
> (considering some older posts on this mailing-list). For example, I
> found myself trying some different things (with polymorphic variants and
> coercions, too):