From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=AWL,DNS_FROM_SECURITYSAGE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 6E466BB84; Mon, 27 Oct 2008 15:13:46 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.33,492,1220220000"; d="scan'208";a="16542480" Received: from alcazar.inria.fr ([128.93.24.50]) by mail2-relais-roc.national.inria.fr with ESMTP; 27 Oct 2008 15:13:46 +0100 Date: Mon, 27 Oct 2008 15:13:46 +0100 From: Maxence Guesdon To: mohamed iguernelala Cc: caml-list@yquem.inria.fr Subject: Re: What does Jane Street use/want for an IDE? What about you? Message-ID: <20081027151346.5e5da86b@alcazar.inria.fr> In-Reply-To: <446182.37115.qm@web28104.mail.ukl.yahoo.com> References: <446182.37115.qm@web28104.mail.ukl.yahoo.com> Organization: INRIA X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; maxence:01 guesdon:01 maxence:01 guesdon:01 ocaml:01 ocaml:01 cvs:01 pre-compiled:01 packagers:01 rocquencourt:01 ocaml-:01 ocaml-:01 patched:01 parser:01 parser:01 On Fri, 24 Oct 2008 11:45:09 +0000 (GMT) mohamed iguernelala wrote: > > Talking about ocamlwizard, why does it embed a part of ocaml sources > > rather than use a configure option to find the compiled sources of ocam= l ? > > 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 ? >=20 > > That's how topcameleon is compiled, asking the user where the compiled > > sources of ocaml are located. >=20 > > Having the compiled sources of ocaml is not a problem for an ocaml > > developer, and the ocamlwizard users are ocaml developers, aren't they ? >=20 > > For users of pre-compiled packages (debian, etc.), this is not a problem > > for the packagers to have ocamlwizard compiled using the sources of oca= ml > > used for the ocaml package. >=20 > > Regards, > =A0 > > --=20 > > Maxence Guesdon=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0= =A0http://yquem.inria.fr/~guesdon/ > > Service Exp=E9rimentation et D=E9veloppements https://devel.inria.fr/ro= cq/ > > INRIA Paris-Rocquencourt=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 http://www.= inria.fr/rocquencourt/ >=20 > Unfortunately, Its's not possible (for now) to have ocamlwizard compatibl= e with both ocaml-3.10 and ocaml-3.11 for several reasons :=20 > =A0 > Ocamlwizard uses a patched ocaml-3.10 parser to be used on incomplete sou= rce files. But I think it is easy to patch=A0an=A0ocaml-3.11 parser to do s= o. > =A0 > 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 exp= ression's type and read cmi files to get more information and to extract pr= oposals ...=20 > =A0 > 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 h= ave to perfom a scope analysis. We also need to scope analysis for nagivati= on in soure code and refactoring. > =A0 > We know its better to use ocaml compiler as a blackbox to increase portab= ility. and we considered this approach as much as possible, but (unfortunat= ely) important information are missing. Performing our own scope analysis i= t not realistic. The solution we have choose is to embed and ocaml type che= cker (3.10) and to patch it to have localizations in cmi files (.cmi + loca= lizations =3D .owz files). I=A0suppose typecheckers in ocaml-3.10 and in oc= aml-3.11 are differents. > =A0 > 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 typec= hecker. Thanks for these explanations. I suspected something like that, since I already encountered some problems with missing location info in the typedtree. Do you think about submitting a patch to caml developers in a near future so that ocamlwizard could find all needed information with any compatible version of ocaml without any patch ? And then it would be great to be able to use ocamlwizard features from an ocaml library (this is more convenient and faster than launch commands and read files). Regards, --=20 Maxence Guesdon http://yquem.inria.fr/~guesdon/ Service Exp=E9rimentation et D=E9veloppements https://devel.inria.fr/rocq/ INRIA Paris-Rocquencourt http://www.inria.fr/rocquencourt/