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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 4B2FF7EE51 for ; Sun, 21 Apr 2013 09:38:11 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.214.54; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.214.54 as permitted sender) identity=mailfrom; client-ip=209.85.214.54; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-bk0-f54.google.com) identity=helo; client-ip=209.85.214.54; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-bk0-f54.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgoCAAKWc1HRVdY2lGdsb2JhbABPgzzBBnsIFg4BAQEBBw0JCRQEJIIfAQEFQAEbHQEDDAYFCwMKLiIBEQEFARwGEwiHeQEDD54OjDCCe4NLChknDVmIfgEFDI8AMweDRwOXFYEjjhMWKYQxOg X-IPAS-Result: AgoCAAKWc1HRVdY2lGdsb2JhbABPgzzBBnsIFg4BAQEBBw0JCRQEJIIfAQEFQAEbHQEDDAYFCwMKLiIBEQEFARwGEwiHeQEDD54OjDCCe4NLChknDVmIfgEFDI8AMweDRwOXFYEjjhMWKYQxOg X-IronPort-AV: E=Sophos;i="4.87,519,1363129200"; d="scan'208";a="11686158" Received: from mail-bk0-f54.google.com ([209.85.214.54]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 21 Apr 2013 09:38:10 +0200 Received: by mail-bk0-f54.google.com with SMTP id q16so2242804bkw.27 for ; Sun, 21 Apr 2013 00:38:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=4KDVvtrwO87wNlXo2QY4xDPDOEwoL4qma/zxCHsG5bI=; b=z+1lzlBVdr1D++aih77LAivjHxlb72+ekhMfOeeJmy1DNyxfZdQz/eMGw3Ts5bc192 8apMRH+Z85cgipjay4Eo4GXmyfIebzmAI5ZD4Mp6qX/hhBmI4elKKfNzXu40C9aRjSGy KSHTnkpfZpHCVPh4EYQ/kNxnyA1QFQmyP1werd6KAFoUMPFpW34RCuS9+4fMuvqcJjE9 cFrLBMozrwRIx0taTcNv8EmoY4cY8xn7k43rb48fs1gH4xrU0ys0UF5JF2VI/XlRW1gb uM/2tTJCGueXBFOVrQfrPvL3hBB5eoUi48CfTL715RkAlwkAUPKsx2pn4Iajh/x01e0Y j8gw== X-Received: by 10.205.33.81 with SMTP id sn17mr8520686bkb.53.1366529889912; Sun, 21 Apr 2013 00:38:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.205.83.144 with HTTP; Sun, 21 Apr 2013 00:37:28 -0700 (PDT) In-Reply-To: <51702200.1050806@emu-bark.com> References: <51702200.1050806@emu-bark.com> From: Gabriel Scherer Date: Sun, 21 Apr 2013 09:37:28 +0200 Message-ID: To: William Smith Cc: Caml-list Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] modified error messages for ocamlc One use case would be supporting other editors in an easier way. I just tried OCaml with Geany, and apparently the people that wrote Geany's OCaml mode didn't bother with a custom error regexp parser. If we had a command-line option to the compiler to produce gnu-standard error messages, that would be a non-issue. I think a patch affecting the error and warning-printing functions of the Location module (parsing/location.ml) should be a very satisfying first step (what kind of errors are you thinking about that aren't handled by these functions?). I'm considering writing such a patch. On Thu, Apr 18, 2013 at 6:40 PM, William Smith wrote: >> File "multilineError.ml", line 2, character 0-line 4, character 1: > >> This added info is great, but if you change the format, then please take >> advantage of this opportunity to make use a more standard format so that >> other tools can recognize those messages without extra work. > >> E.g: > >> multilineError.ml:2.0-4.1: Warning 8: this pattern-matching is not >> exhaustive. > > >> Stefan > > This is harder than it looks because there are about a dozen places in the > code where OCaml creates error messages. They're spread out amongst all = of > the tools. > > I believe I found them all, but each one requires careful work to avoid > breaking things. So far, I've only changed the one in ocamlc. After > finding them, I'll also need to learn how to trigger each of them to even > test the change. > > That's why I don't want to do it unless it's really useful to people. > > I don't use emacs right now so I don't know how to test that part of the > system. Will using the standard Gnu error format be ok with what Daniel > B=FCnzli was concerned about? > > Bill >