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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 648717F1DB for ; Fri, 23 Nov 2012 18:30:08 +0100 (CET) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of philippe.wang.lists@gmail.com) identity=pra; client-ip=209.85.219.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="philippe.wang.lists@gmail.com"; x-sender="philippe.wang.lists@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of philippe.wang.lists@gmail.com designates 209.85.219.54 as permitted sender) identity=mailfrom; client-ip=209.85.219.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="philippe.wang.lists@gmail.com"; x-sender="philippe.wang.lists@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-oa0-f54.google.com) identity=helo; client-ip=209.85.219.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="philippe.wang.lists@gmail.com"; x-sender="postmaster@mail-oa0-f54.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aj8HABOyr1DRVds2mGdsb2JhbABEsT6OdAgWDgEBAQEBCAkNBxQngh4BAQUMNAE4AQMMAQUFCwMKLiEBEgEFARwGEwiHcwMPoG+PK4R+Jw2JTgEFDItCaRuEJgONToZegVWLMoMwFimBV4I6gWc X-IronPort-AV: E=Sophos;i="4.83,307,1352070000"; d="scan'208";a="163599768" Received: from mail-oa0-f54.google.com ([209.85.219.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 23 Nov 2012 18:30:07 +0100 Received: by mail-oa0-f54.google.com with SMTP id n9so15994910oag.27 for ; Fri, 23 Nov 2012 09:30:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=gjkBsRerBIG7Ip49BWoV7x2liyQs6gnCnPtXKYOhch0=; b=I8yega+X6/oL9TmMu7wqeKN6tke4bdtPwu6XIZQaVHvvCaES7Tj+DLpueoPjObRx2k jFfxLhdJnWTFkkrqDBRBmEz74BgTpzNFzsDfCi9iuKcWpMFCeo9eRKl3yNxfntlGAjhL DVzrbUBdKqD7Gw1xDiITvm4EBXgQY+Lz/2Twe2irfLeOKGLh1ehSPt4ojNj1qNf5goNo jlAwnLJcrejjkaalEbTfLUvk6lPWDZNVUiDjGQl34zYTo2T0np9W6j9LaQPWLyoCS22Y sMmwuCSYE4R2ADGFB5fdX3TzMsOZhRQ1nHxYuhnHLVY7zVMp1P9hP+W/g7gPHkKk+IlP sZNg== MIME-Version: 1.0 Received: by 10.60.9.166 with SMTP id a6mr3487144oeb.89.1353691806388; Fri, 23 Nov 2012 09:30:06 -0800 (PST) Sender: philippe.wang.lists@gmail.com Received: by 10.76.68.228 with HTTP; Fri, 23 Nov 2012 09:30:06 -0800 (PST) In-Reply-To: <50A6EBAD.8050204@gmail.com> References: <50A6EBAD.8050204@gmail.com> Date: Fri, 23 Nov 2012 18:30:06 +0100 X-Google-Sender-Auth: a8afu9FSJy7vWrraQoC1qNFuAD8 Message-ID: From: Philippe Wang To: Edgar Friendly Cc: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] OCaml linting On Sat, Nov 17, 2012 at 2:43 AM, Edgar Friendly wrot= e: > I'm playing with Sublime Text 2, and find it has an interesting plugin to= do > active linting of a program under development. What's the set of compiler > options that will produce warnings/errors the quickest, for using ocamlc = to > quickly check for syntax and maybe even type errors in a partial program? > Does anyone already have a process for this under emacs, using > auto-recompile or other plugins? > > Thanks, > E. I use ocamlc -i (or ocamlopt -i) so that it type-checks and prints the interface. If you have several files (hence there are dependancies especially for interfaces), as said by T=F6r=F6k Edwin, you should generate .cmi files. If you have an .mli file, ocamlc -c can generate the corresponding .cmi fil= e. If you don't have an .mli file, you can either generate it (with ocamlc -i) or produce the .cmi file directly from the .ml file (ocamlc -c or ocamlc -c). If ocamlc -i takes time, I believe it means that you have either a super large .ml file, or you have expressions that take time to type-check. Cheers, --=20 Philippe Wang mail@philippewang.info