English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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 caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners