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
Re: What does Jane Street use/want for an IDE? What about you?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-10-24 (11:45)
From: mohamed iguernelala <mohamed.iguernelala@y...>
Subject: Re: What does Jane Street use/want for an IDE? What about you?
> Talking about ocamlwizard, why does it embed a part of ocaml sources
> rather than use a configure option to find the compiled sources of ocaml ?
> This would allow to compile ocamlwizard with any (compatible) version of
> ocaml (even a cvs version). For example, how to use it with ocaml 3.11 beta1
> without modifying the copied parts of ocaml present in ocamlwizard ?

> That's how topcameleon is compiled, asking the user where the compiled
> sources of ocaml are located.

> Having the compiled sources of ocaml is not a problem for an ocaml
> developer, and the ocamlwizard users are ocaml developers, aren't they ?

> For users of pre-compiled packages (debian, etc.), this is not a problem
> for the packagers to have ocamlwizard compiled using the sources of ocaml
> used for the ocaml package.

> Regards,
> -- 
> Maxence Guesdon                           http://yquem.inria.fr/~guesdon/
> Service Expérimentation et Développements https://devel.inria.fr/rocq/
> INRIA Paris-Rocquencourt                  http://www.inria.fr/rocquencourt/

Unfortunately, Its's not possible (for now) to have ocamlwizard compatible with both ocaml-3.10 and ocaml-3.11 for several reasons : 
Ocamlwizard uses a patched ocaml-3.10 parser to be used on incomplete source files. But I think it is easy to patch an ocaml-3.11 parser to do so.
During the first month (during June), we used cvs version of ocaml (3.11). We have patched an ocaml-3.11 parser, we parsed the annot file to get expression's type and read cmi files to get more information and to extract proposals ... 
But, We've released by the beginning of July that types in .annot (3.10.2) are not always qualified enough. And to give the right qualification we have to perfom a scope analysis. We also need to scope analysis for nagivation in soure code and refactoring.
We know its better to use ocaml compiler as a blackbox to increase portability. and we considered this approach as much as possible, but (unfortunately) important information are missing. Performing our own scope analysis it not realistic. The solution we have choose is to embed and ocaml type checker (3.10) and to patch it to have localizations in cmi files (.cmi + localizations = .owz files). I suppose typecheckers in ocaml-3.10 and in ocaml-3.11 are differents.
So, we have embed ocaml source files in ocamlwizard (parser + typechecker ) because we have to patch some files to get the information we need. Thus, to be used with ocaml-3.11, one have to patch ocaml-3.11 parser and typechecker.