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
[Caml-list] about Obj.magic
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-05-31 (04:00)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] about Obj.magic

On Thu, May 30, 2002 at 05:09:43PM -0400, dengping zhu wrote:

> When should I use 'Obj.magic'? It is really confusing. Now I am
> converting a bunch of code from sml to ocaml. [...]

About conversion from SML into OCaml, I may help: these days, I am
trying to convert a program of 70000 lines of SML into OCaml, using
Camlp4. Please ask me if you want more details.

About examples of use Obj.magic, there are the extensible grammars of
Camlp4, and in particular the EXTEND function. I can explain here if
people are interested. And I know that the OCaml toplevel program uses
it also.

In general, like Jacques Garrigue said, don't use Obj.magic if you are
not *absolutely* sure of what you do.

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: