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 E0F71801DC for ; Thu, 24 Aug 2017 19:30:42 +0200 (CEST) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=cpitclaudel@gmail.com; spf=Pass smtp.mailfrom=cpitclaudel@gmail.com; spf=None smtp.helo=postmaster@mail-wr0-f182.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of cpitclaudel@gmail.com) identity=pra; client-ip=209.85.128.182; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="cpitclaudel@gmail.com"; x-sender="cpitclaudel@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of cpitclaudel@gmail.com designates 209.85.128.182 as permitted sender) identity=mailfrom; client-ip=209.85.128.182; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="cpitclaudel@gmail.com"; x-sender="cpitclaudel@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-wr0-f182.google.com) identity=helo; client-ip=209.85.128.182; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="cpitclaudel@gmail.com"; x-sender="postmaster@mail-wr0-f182.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3Ax6rz0hf05xLhSwJFrA3Ipg6FlGMj4u6mDksu8pMi?= =?us-ascii?q?zoh2WeGdxc2yYR7h7PlgxGXEQZ/co6odzbGJ4+a9ASQp2tWojjMrSNR0TRgLiM?= =?us-ascii?q?EbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpQgpBw7nOAFp?= =?us-ascii?q?CuPwE4/Ux4TrhqHhs6HUNg5BgT74ZbJpMD23qx/Qv48Ym9hMMKE0nzDNI35Fff?= =?us-ascii?q?hh/WJ0YHmXlgvw68P4qJV78jhbv/s8+8NEear/dqU8C7dfCWJ1YCgO+MT3uEyb?= =?us-ascii?q?HkO07XwGXzBKwxc=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BUBwAYDJ9Zf7aAVdFdHQEFAQsBFwEBB?= =?us-ascii?q?AEBCgEBhBMDgRKDd5o0gU6JS48OLoUUA4RVQxQBAQEBAQEBAQEBARIBAQkLCwg?= =?us-ascii?q?mMYIzBQMEHoI9BCQPAQ0BGx4DAREQDwImAiURAQUBLwgBAYoUAQMNCAQMnmmDR?= =?us-ascii?q?UCMC4IFBQEcgwkFg2IKGScNV4M6AQoBAQEBARoCAQUJAQh7gh2CAoNaC4gwgke?= =?us-ascii?q?CYQWRG48+gWiFboxviz0RhxaUZzSBFTZtPlMkeIRughR0iWOBPwEBAQ?= X-IPAS-Result: =?us-ascii?q?A0BUBwAYDJ9Zf7aAVdFdHQEFAQsBFwEBBAEBCgEBhBMDgRK?= =?us-ascii?q?Dd5o0gU6JS48OLoUUA4RVQxQBAQEBAQEBAQEBARIBAQkLCwgmMYIzBQMEHoI9B?= =?us-ascii?q?CQPAQ0BGx4DAREQDwImAiURAQUBLwgBAYoUAQMNCAQMnmmDRUCMC4IFBQEcgwk?= =?us-ascii?q?Fg2IKGScNV4M6AQoBAQEBARoCAQUJAQh7gh2CAoNaC4gwgkeCYQWRG48+gWiFb?= =?us-ascii?q?oxviz0RhxaUZzSBFTZtPlMkeIRughR0iWOBPwEBAQ?= X-IronPort-AV: E=Sophos;i="5.41,422,1498514400"; d="scan'208";a="235265636" Received: from mail-wr0-f182.google.com ([209.85.128.182]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 24 Aug 2017 19:30:41 +0200 Received: by mail-wr0-f182.google.com with SMTP id z91so415817wrc.1 for ; Thu, 24 Aug 2017 10:30:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=zwJvReCGi3XS2utwm0D13PmBXpASrX83KTcbNHFOoIU=; b=XAIi3AaGEDWlIvb42CONmDbpoY014RkwpOBpTO49JBYEbXF+jZnYhJ4AghCgmAfcaR rA6u8g2xA7aJ6VrJr6c3P7+pUkapIHwFOTXe0GWz4WjKhAFSZmvDBXVpuCV+/5QynOCv 1ZeYgtxzUNbYNrmi2Z0jsBgaPvFQkbphU7JD2lTRUpd+ldOt/QI8mthM6gWlb0JVuvzo xizwUEx+IR6n28LEuZ77uOd1xbSnYmJM0cqm0w07qJs00LgfEVNrICL8lsqQYwtFpEJc 0T2KyYmoo1RhZoomyRbt2XeldmynhdsesjpRjnkFo8HnGkTt1daLmSv5qoOiRp/zGPOT kKAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=zwJvReCGi3XS2utwm0D13PmBXpASrX83KTcbNHFOoIU=; b=IPc2RGW7oHOkjMzg794hLAsigPfXmzqVcgqC1wwEtEb/LQiISSKCbSy75sYdH9D4EY 6kJG1fmNTxjZjXKxoR9jMN5I5gdOXyk8sRtGyZ48O/F0J9VQ6hs1msE4/50/5j9aHKsc HK/o4+oNsO2XBnMvY8mKpTTuwpnqy/XSNup56Hb5ssZfZDdgCFE3vhQipIr8nWAuQ95E zyOv31FfPbbSgMlAkXLJz7/Lh3QInns4RhuCEfF2zhwlcqBhwuMDnO2bCNcFCkJvBCnO IQ2yofmQRbIdAl4q03EYXvLqwT+ImT6QpzuTD70T4y0/g2u07ELjchmy3ygRpfpgLM2U J2yA== X-Gm-Message-State: AHYfb5iOFsJ5sRHuIb0IUV/Y/p9la7N9umKnh5WHkTKdE2jpSWmZw+MS 2XrbuSxh6iZaJn909do= X-Received: by 10.223.161.217 with SMTP id v25mr4805619wrv.1.1503595840307; Thu, 24 Aug 2017 10:30:40 -0700 (PDT) Received: from [192.168.1.82] (43.225.24.109.rev.sfr.net. [109.24.225.43]) by smtp.gmail.com with ESMTPSA id q21sm4099485wra.86.2017.08.24.10.30.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Aug 2017 10:30:39 -0700 (PDT) From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= To: caml-list@inria.fr Message-ID: Date: Thu, 24 Aug 2017 19:30:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit Subject: [Caml-list] More precise line number directives? Hi all, I came across the following section of the documentation a few days ago: > Line number directives > > Preprocessors that generate OCaml source code can insert line number > directives in their output so that error messages produced by the > compiler contain line numbers and file names referring to the source > file before preprocessing, instead of after preprocessing. A line > number directive is composed of a # (sharp sign), followed by a > positive integer (the source line number), optionally followed by a > character string (the source file name). Line number directives are > treated as blanks during lexical analysis. Has there been efforts or proposals in the past to support more precise annotations? Something like source maps, for example (https://github.com/ryanseddon/source-map/wiki/Source-maps:-languages,-tools-and-other-info; specs at https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/). Some background: multiple languages, including Coq and F*, use OCaml as an intermediate language. Debugging extracted code (with ocamldebug or gdb) or looking at backtraces is unpleasant, because the generated OCaml code isn't always pretty. It would be very nice to get backtraces pointing to the original code (and even nicer to be able to step through the original sources!). Has a similar proposal been discussed before? Would it be hard to implement? Thanks! Clément.