From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id A08387EE49 for ; Thu, 21 Feb 2013 10:31:25 +0100 (CET) Received-SPF: Neutral (mail2-smtp-roc.national.inria.fr: domain of simon.cruanes.2007@m4x.org does not assert whether or not 129.104.30.34 is permitted sender) identity=pra; client-ip=129.104.30.34; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="SRS0=L26R=MN=m4x.org=simon.cruanes.2007@bounces.m4x.org"; x-sender="simon.cruanes.2007@m4x.org"; x-conformance=sidf_compatible; x-record-type="spf2.0" Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of SRS0=L26R=MN=m4x.org=simon.cruanes.2007@bounces.m4x.org designates 129.104.30.34 as permitted sender) identity=mailfrom; client-ip=129.104.30.34; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="SRS0=L26R=MN=m4x.org=simon.cruanes.2007@bounces.m4x.org"; x-sender="SRS0=L26R=MN=m4x.org=simon.cruanes.2007@bounces.m4x.org"; x-conformance=sidf_compatible; x-record-type="spf2.0" Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of postmaster@mx1.polytechnique.org designates 129.104.30.34 as permitted sender) identity=helo; client-ip=129.104.30.34; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="SRS0=L26R=MN=m4x.org=simon.cruanes.2007@bounces.m4x.org"; x-sender="postmaster@mx1.polytechnique.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoYCAMXoJVGBaB4ikWdsb2JhbABFEwEBAa5jknsWDgEBAQEUEhQngh8BAQUMJgE7GwsYCQQSCAcJAwIBAgEzARETBgIBAQ6HbgMPDLUxA4lkklUDl0+SSQ X-IPAS-Result: AoYCAMXoJVGBaB4ikWdsb2JhbABFEwEBAa5jknsWDgEBAQEUEhQngh8BAQUMJgE7GwsYCQQSCAcJAwIBAgEzARETBgIBAQ6HbgMPDLUxA4lkklUDl0+SSQ X-IronPort-AV: E=Sophos;i="4.84,706,1355094000"; d="scan'208";a="3844421" Received: from mx1.polytechnique.org ([129.104.30.34]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 21 Feb 2013 10:31:25 +0100 Received: from emmental.inria.fr (emmental.inria.fr [128.93.0.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTPSA id 411D4140C558C for ; Thu, 21 Feb 2013 10:31:24 +0100 (CET) Message-ID: <5125E96C.2010002@m4x.org> Date: Thu, 21 Feb 2013 10:31:24 +0100 From: Simon Cruanes User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: caml-list@inria.fr References: <512557EB.7030607@lakaban.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Thu Feb 21 10:31:24 2013 +0100 (CET)) X-Spam-Flag: No, tests=bogofilter, spamicity=0.000000, queueID=628E3140C5590 X-Org-Mail: simon.cruanes.2007@polytechnique.org Subject: Re: [Caml-list] [ANN] Beta-release of Merlin I started using Merlin a few days ago, on vim, and I must say it's a pleasure to have direct access to completion/type checking/type querying. Per-project configuration is really simple (just define a list of source directories, build directories, and ocamlfind-able packages); then completion and type-checking work seamlessly even with external code. Maybe that's no big deal for emacs users, but on vim I think this is quite a big improvement. It's already very useful for me, so I'd like to thank the authors :) Cheers, Simon On 02/21/2013 10:20 AM, Gabriel Scherer wrote: > I looked into Merlin in the last few days, so here is a bit more > information if you, like me, are interested in design information about > projects before deciding whether to use (and potentially contribute to) > them. > > Interface-wise: using Merlin (at least on emacs) feels a lot like > ProofGeneral (or CoqIde): there is a "checked zone" from the start of > the buffer to the first error, and reliable type information is > available in all this checked zone. The interface is rather simple and > easy to use. > > (If you're considering porting Merlin to another editor: merlin is an > OCaml program that inputs and outputs JSON queries, so it seems rather > easy to port to any editor having plugin support in any language with > JSON support. Given its youth, you should however expect Merlin's > protocol to evolve over the next development period, so editor plugin > developers would need to follow Merlin's internal changes for now.) > > The major difference between Merlin and -annot-based tools such as > Ocamlspotter or Typerex2 is that Merlin does the work of parsing OCaml > sentences into chunks and sending them incrementally to the > type-checker, instead of sending the whole buffer at once and using the > output. This means that Merlin is much more robust with respect to files > that have errors and cannot be compiled as a whole: you'll get reliable > type information from the start of the file upto the first error (and > some resilience heuristic to have more after). The OCaml type-checker is > in fact able to provide some typing information even for incorrect > programs, so -annot-based tools do support some of those features, but > in a less reliable and more coarse-grained way. > The design trade-off is that Merlin has to copy/adapt more logic from > the compiler: it embeds an OCaml parser derived from the compiler's one > (you won't get parsing bugs as with regexpy elisp modes), and currently > also copies and slightly modifies the type-checker (I hope this can be > changed in the future, possibly by adding some flexibility to the > type-checker regarding eg. production of warnings). This means more > maintenance work to port Merlin to future OCaml versions. On the other > hand, it's probably not reasonable to expect the compiler type-checker > to be re-engineered for optimal incrementality support, so having an > external implementation of incrementality that piggybacks on the batch > typer interface makes sense. > > My personal intuition is that Merlin's design is a good long-term choice > for an editor service (as opposed to code-analysis services). You want > tools such as ocamldoc, dead code analysis, or everything concerned with > analysis of an existing correct codebase to be based on -bin-annot and > work on the typedtrees directly (without local support for parsing and > typing programs). You want tools designed to work on incomplete programs > in the process of being created to embed incrementality logic (insofar > as it hasn't been pushed into the compiler), understanding partial files > and local modifications to cleverly control the parsing&typing process > with reactivity in mind. The One True Editor Mode will merge both > aspects, working on .cmt of already-compiled dependencies on one side, > and partial/incremental information in edition buffers on the other. > Merlin can evolve in this way, as its type-directed analyses (those > performed in the "checked zone") work directly on the typedtree, so > could work with .cmt files. > > On Thu, Feb 21, 2013 at 12:10 AM, Frédéric Bour > > wrote: > > We are very pleased to announce the beta release of Merlin. Merlin > is a tool > which provides smart completion, among other things, in your > favorite editor. > As of today, Vim and Emacs are supported. > > See it at work: > https://github.com/def-lkb/__merlin#screenshots > > > Its features include: > - completion of values, constructorsand modules based on local scope > - retrieving type of identifiers and/or expressions under cursor > - integration of findlib to manage buildpath > - highlighting of syntax errors, type errors and warnings inside the > editor > - to a certain amount, resilience to syntax and type errors > > It works only with Ocaml 4.00.1 (may works with newer versions). > > If you happen to have an opam installation with the right version > (opam switch 4.00.1), you can try it right away with: > > $ opam remote add kiwi http://kiwi.iuwt.fr/~asmanur/__opam/.git > > > > $ opam install merlin > > Then to get started and set-up your editor: > - https://github.com/def-lkb/__merlin#setting-up-vim > > - https://github.com/def-lkb/__merlin#emacs-interface > > > Check it out at: https://github.com/def-lkb/__merlin > > > The current version still needs to be tested under various systems and > configurations, your feedback iswelcome. > > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/__arc/caml-list > > Beginner's list: http://groups.yahoo.com/group/__ocaml_beginners > > Bug reports: http://caml.inria.fr/bin/caml-__bugs > > >