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 E1ADA7F7AF for ; Mon, 5 Oct 2015 22:40:14 +0200 (CEST) IronPort-PHdr: 9a23:e2HZkhxFCoBKziXXCy+O+j09IxM/srCxBDY+r6Qd0eMWIJqq85mqBkHD//Il1AaPBtWHrawUwLOL6+jJYi8p39WoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09fr2zQd6OyZrnnLnvo9X6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD89pozcNLUL37cqIkVvQYSW1+ayFmrPHs4DbKRxGO639UaW4WnwBFGUCR4xjwRJb8tm3hvepwwiSAFcLzRLEwHz+l6vE4ZgXvjXIlOiQ09WDawuBxiaNdp1r1pRB+xo/SZ6mXPfxzZb/HcN4GA2FGW5ACBGR6HoqgYt5XXKI6NuFCoty4/gNWoA== Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jdimino@janestreet.com; spf=Pass smtp.mailfrom=jdimino@janestreet.com; spf=None smtp.helo=postmaster@mxout1.mail.janestreet.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of jdimino@janestreet.com) identity=pra; client-ip=38.105.200.112; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="jdimino@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of jdimino@janestreet.com designates 38.105.200.112 as permitted sender) identity=mailfrom; client-ip=38.105.200.112; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="jdimino@janestreet.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mxout1.mail.janestreet.com) identity=helo; client-ip=38.105.200.112; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="postmaster@mxout1.mail.janestreet.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BZAQBs3xJWnHDIaSZeg3tuBr93I4V3AoEvBzwQAQEBAQEBAQEQAQEBAQEGFglPgh2CCAEBBBIRHQEBNwEPCwsNAgImAgIhARIBBQEcBhMih3cDEgMKnAWBMD4xilhxhGUBBYoeDYUMAQEBAQEBAQMBAQEBAQEBARQCBAqBGIVRhH6CUB6CHweCaYFDlgGFF4YNgXOBVpJEg1qCIxIjgRc4gi8jgVxwiD8BAQE X-IPAS-Result: A0BZAQBs3xJWnHDIaSZeg3tuBr93I4V3AoEvBzwQAQEBAQEBAQEQAQEBAQEGFglPgh2CCAEBBBIRHQEBNwEPCwsNAgImAgIhARIBBQEcBhMih3cDEgMKnAWBMD4xilhxhGUBBYoeDYUMAQEBAQEBAQMBAQEBAQEBARQCBAqBGIVRhH6CUB6CHweCaYFDlgGFF4YNgXOBVpJEg1qCIxIjgRc4gi8jgVxwiD8BAQE X-IronPort-AV: E=Sophos;i="5.17,640,1437429600"; d="scan'208";a="181211375" Received: from mxout1.mail.janestreet.com ([38.105.200.112]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Oct 2015 22:40:14 +0200 Received: from tot-qpr-mailcore1.delacy.com ([172.27.56.68] helo=tot-qpr-mailcore1) by mxout1.mail.janestreet.com with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82) (envelope-from ) id 1ZjCYO-0005pz-Rm for caml-list@inria.fr; Mon, 05 Oct 2015 16:40:12 -0400 X-JS-Flow: external Received: by tot-qpr-mailcore1 with JS-mailcore (0.1) (envelope-from ) id BWEuAs-AAAClB-TJ; 2015-10-05 16:40:12.613416-04:00 Received: from mail-io0-f169.google.com ([209.85.223.169]) by mxgoog1.mail.janestreet.com with esmtps (UNKNOWN:AES128-GCM-SHA256:128) (Exim 4.72) (envelope-from ) id 1ZjCYO-0003tq-Go for caml-list@inria.fr; Mon, 05 Oct 2015 16:40:12 -0400 Received: by ioiz6 with SMTP id z6so199318773ioi.2 for ; Mon, 05 Oct 2015 13:40:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=vzPk0d7oJI1kbw0aM2Ko02kKXdayLVf1gsq344EXh4s=; b=S6jGPGM9PEtpnP7OlrYRv9x5gPJx+3BnbrKNQoP38OuZPxyVz7kaIXdaO0tcrusF/9 1q2KXAnDoYFnzpnhsE0peYhxRsh8JdqUZkHQXLAuSuboJXuYxuNhfc8lTFsJ3AF9Sbvv G2TnQyrC7FQvyS7XvPjZ3d7Z9zW9rNz5EJmnw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=vzPk0d7oJI1kbw0aM2Ko02kKXdayLVf1gsq344EXh4s=; b=EqW40t2L+lAl82Bc9CBxUa9j1ShPysvPDqa/diM0MWI+5sHep1y44OBHaqJfq9UlwD Ddfn8rP2gTTNLxTRe0Na0uOtpEQOJ5YhYa3RIF7EBaUsC56MYJKhg1tRfoo5V+5kkud6 BEw04inC9bVZdBF77JiPdf1pgjZG+puOjKZh2MPZnF7QLqhm1Tvsmy4s5uKEyN9ILWZ+ I6p+ZuRml3Xuxoxyyw8gID3Q/MO6pCERrq0G6epa4TMh9aIBH8vrUPtKqTO6anms5CzS tWyrvRiTV/zen4IPuEUCons3Y9gs2lmJDywy0htaBRubSwW6FoT6w1oDmfy632kcrQ02 7Esg== X-Gm-Message-State: ALoCoQk7ejCrw0KjqxoJmentaACvPZqvMTA+aAjlIpwx6uRWAlmEHsQGPca3hti/QQpATfFVzs3sF+NsOB0beLa/lg14nDjw53E1wEiXdOnuYh4N2LnZNHXynR2s30hKQDUpNAh9/4lW X-Received: by 10.107.46.158 with SMTP id u30mr36342049iou.56.1444077612169; Mon, 05 Oct 2015 13:40:12 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.107.46.158 with SMTP id u30mr36342026iou.56.1444077611907; Mon, 05 Oct 2015 13:40:11 -0700 (PDT) Received: by 10.50.237.70 with HTTP; Mon, 5 Oct 2015 13:40:11 -0700 (PDT) In-Reply-To: References: Date: Mon, 5 Oct 2015 21:40:11 +0100 Message-ID: From:Jeremie Dimino To:Gabriel Scherer Cc:"ocaml-core@googlegroups.com" , "caml-list@inria.fr" Content-Type: text/plain; charset=UTF-8 X-JS-Processed-by: mailcore Subject: Re: [Caml-list] [ANN] Jane Street's ppx rewriters On Mon, Oct 5, 2015 at 2:48 PM, Gabriel Scherer wrote: > Do you plan provide any backward-compatibility guarantees for > ppx-core, or do you plan the helpers there to mirror changes to > upstream parsetree? Good question. Currently most of the helpers are auto-generated from the signature of Parsetree. Using names that closely matches the ones in parsetree.mli. These will surely change as Parsetree changes. Then we have additional helpers with different names for common use, these will probably be backward compatible. Going forward we'll add more such helpers to improve compatibility between versions of the parsetree. You can see the interface for these helpers here: https://github.com/janestreet/ppx_core/blob/master/src/ast_builder.ml https://github.com/janestreet/ppx_core/blob/master/src/ast_builder_intf.ml And for patterns: https://github.com/janestreet/ppx_core/blob/master/src/ast_pattern.ml https://github.com/janestreet/ppx_core/blob/master/src/ast_pattern_intf.ml > (I think there would be a place in the ppx ecosystem for a library > that allows users to write rewriters on their current OCaml version, > and know that they will still compile and be useable to preprocess > OCaml code for future versions. This may require an API with explicit > versioning.) Sure. But having backward-compatible helpers for building the AST is not enough as your patterns will still break. We have [Ast_pattern] which is often enough for matching the payload of attributes and extensions, but it doesn't conveniently replace all pattern matchings. -- Jeremie