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 6DA8D7ED1C for ; Fri, 25 Sep 2015 23:13:33 +0200 (CEST) IronPort-PHdr: 9a23:SdiBWRRY+6FyWW0ljNuNL3vhDtpsv+yvbD5Q0YIujvd0So/mwa64Yx2N2/xhgRfzUJnB7Loc0qyN4/ymBDVLucjJmUtBWaIPfidNsd8RkQ0kDZzNImzAB9muURYHGt9fXkRu5XCxPBsdMs//Y1rPvi/6tmZKSV3BPAZ4bt74BpTVx5zukbvip9uOOk4Q2nKUWvBbElaflU3prM4YgI9veO4a6yDihT92QdlQ3n5iPlmJnhzxtY+a9Z9n9DlM6bp6r5YTGZPBYr8gQLdEIDMjOmEzrI235FiQBTeIs2QcU3kbiwdBGQuNuA76X4v8qzbzrOlVxymbIcDvULkuWnKl9ag9GzHyjyJSBjcj92efr812l6FK6Eawoh152I3FSIOcMvdlYrnQcM9cTm1ECJUCHxddC5+xOtNcR9EKOvxV+tWsqg== Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=yminsky@janestreet.com; spf=Pass smtp.mailfrom=yminsky@janestreet.com; spf=None smtp.helo=postmaster@mxout1.mail.janestreet.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of yminsky@janestreet.com) identity=pra; client-ip=38.105.200.112; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yminsky@janestreet.com"; x-sender="yminsky@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of yminsky@janestreet.com designates 38.105.200.112 as permitted sender) identity=mailfrom; client-ip=38.105.200.112; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yminsky@janestreet.com"; x-sender="yminsky@janestreet.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@mxout1.mail.janestreet.com) identity=helo; client-ip=38.105.200.112; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yminsky@janestreet.com"; x-sender="postmaster@mxout1.mail.janestreet.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BUAQDJtwVWnHDIaSZdg3hpBoMkqQ6TCYV5AoElBzwQAQEBAQEBAQEQAQEBAQEGFglPgh2CCAEBAwESER0BASwLAQQLCwsaHQICIhIBBQEKEgYTCAoQh3cDCggDCqojgTA+MYpWcYRlAQWKJgOFCgEBAQEBBQEBAQEBAQEBAQESBgqGaYR9hQkEB4JpgUOGAQyPZIUUh3mCFYxtimASI4EXESeCL4IZVQEBiR8BAQE X-IPAS-Result: A0BUAQDJtwVWnHDIaSZdg3hpBoMkqQ6TCYV5AoElBzwQAQEBAQEBAQEQAQEBAQEGFglPgh2CCAEBAwESER0BASwLAQQLCwsaHQICIhIBBQEKEgYTCAoQh3cDCggDCqojgTA+MYpWcYRlAQWKJgOFCgEBAQEBBQEBAQEBAQEBAQESBgqGaYR9hQkEB4JpgUOGAQyPZIUUh3mCFYxtimASI4EXESeCL4IZVQEBiR8BAQE X-IronPort-AV: E=Sophos;i="5.17,588,1437429600"; d="scan'208";a="148614673" Received: from mxout1.mail.janestreet.com ([38.105.200.112]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2015 23:13:32 +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 1ZfaJ8-0002yY-Sj for caml-list@inria.fr; Fri, 25 Sep 2015 17:13:30 -0400 X-JS-Flow: external Received: by tot-qpr-mailcore1 with JS-mailcore (0.1) (envelope-from ) id BWBbjx-AAAEid-S7; 2015-09-25 17:13:21.606363-04:00 Received: from mail-wi0-f171.google.com ([209.85.212.171]) by mxgoog1.mail.janestreet.com with esmtps (UNKNOWN:AES128-GCM-SHA256:128) (Exim 4.72) (envelope-from ) id 1ZfaIz-0003ef-CM for caml-list@inria.fr; Fri, 25 Sep 2015 17:13:21 -0400 Received: by wicfx3 with SMTP id fx3so37535852wic.1 for ; Fri, 25 Sep 2015 14:13:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=B1GlzTDx14k8NK8Or3QGGwYXWzk0qvq3xB3bpWIwjAY=; b=aFxSj2tjE7X6sqCb9mj4oocd3E8iVwOfr9r1u1xblL0Yw8R7xiAtw4Wocuwp5bS6t9 +drdtgduVBtpJW0OefWTtrTVtapAYfk14KbL6J5mjdyK45oeivfRzAsRWy1zIqYBtYf8 A6gvqruwmQYKMajPFRW+tcsl+PPVum5a04bVw= 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:from:date :message-id:subject:to:cc:content-type; bh=B1GlzTDx14k8NK8Or3QGGwYXWzk0qvq3xB3bpWIwjAY=; b=jGu3W6CXaFgPZX/uoAaHH6ydU8ZWUFPcnGLJs6SY5LZQtwVlNjcYJqXh2ZgqoCABDS mTPnPyncKeMbxNAemK5u5vVLSbq6hU03zX5feXw/evOxlRYzpvZJn2MGBEchDc0V4ZXB bsqzoclqXSJFhUq1O3MGHxEPHzFsuItdO9hHqmJ22btVo3o8vlEJBoGjd67HIfgKysBE rxofgzyYU7Jn26iEPTHBwGXeRnSKGrN9uYZk9VNTT8zlmQq7ccPmw551POtX00DySSPk nFeV8Md5FSJ93G6dIE7Ui2glQEz+K7T05QfzQBJVnRtsHwi4QBjlHlSw+qB7it0CjbSf e/+A== X-Gm-Message-State: ALoCoQkAv2PuVbA3pW885X7RhbSRgGk/oNCPbhmUZNWZWXwVzLM4A5SNxayeiY57EO23wY2C/EvhJve1uo4B1VWJ03hCf/hPWFfMRgDGVTe66KzfM53LrRWx9pMtQ2WTxryn0nt2QjvK X-Received: by 10.194.2.243 with SMTP id 19mr8127296wjx.140.1443215600678; Fri, 25 Sep 2015 14:13:20 -0700 (PDT) X-Received: by 10.194.2.243 with SMTP id 19mr8127286wjx.140.1443215600516; Fri, 25 Sep 2015 14:13:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.98.214 with HTTP; Fri, 25 Sep 2015 14:13:01 -0700 (PDT) In-Reply-To: <6c322406f51662321d5f320f2e4f4f78@whitequark.org> References: <6c322406f51662321d5f320f2e4f4f78@whitequark.org> From:Yaron Minsky Date: Fri, 25 Sep 2015 17:13:01 -0400 Message-ID: To:whitequark Cc:"caml-list@inria.fr" Content-Type: multipart/alternative; boundary=047d7b3a86bc34212f052098d178 X-JS-Processed-by: mailcore Subject: Re: [Caml-list] [ANN] ppx_deriving 3.0 --047d7b3a86bc34212f052098d178 Content-Type: text/plain; charset=UTF-8 Jeremie just air-dropped about 25k lines of PPX code on github and opam, so OCaml's PPX tools are finally out there. You can find them here: https://github.com/janestreet On Fri, Sep 25, 2015 at 5:00 PM, whitequark wrote: > Hello, > > I am glad to announce ppx_deriving 3.0. It brings two > major changes: hygiene and ppx_type_conv compatibility. > It is installable via opam[1]. > > First, hygiene. Earlier versions of ppx_deriving: > 1) assumed that all the modules that the deriver > requires are not shadowed with a different signature; > 2) included user-specified code such as from [@default] > attributes in a way that exposed deriver-internal > identifiers to such code. > > Now, ppx_deriving includes a mechanism for hygienic > unquoting[2], as well as a module[3] containing references > to most standard library modules under their proper names. > This allows it to coexist with e.g. `open Core.Std`. > > Second, ppx_type_conv compatibility. You probably don't > know it yet, but Jane Street has converted all their syntax > extensions to ppx, so now there's ppx_type_conv, ppx_sexp_conv, > etc. I've coordinated the development of ppx_deriving with > Jane Street, so now ppx_deriving and ppx_type_conv use > the same syntactic conventions. In fact, they share > the [@@deriving] syntax without any effort from the user! > > Furthermore, I have been looking at the sources of Jane Street's > ppx_core, ppx_driver, ppx_type_conv, etc and I find these > projects exceptionally well designed; further, they tackle some > important problems that ppx_deriving has explicitly left out of > scope, such as attribute hygiene. > > While these libraries have a somewhat larger API, I think anyone > writing a new deriver should consider using ppx_type_conv. > I cannot outright recommend that since I have not actually > tried it (yet?), but it sounds worthwhile. > > [1]: http://opam.ocaml.org/packages/ppx_deriving/ppx_deriving.3.0/ > [2]: https://whitequark.github.io/ppx_deriving/Ppx_deriving.html#2_Hygiene > [3]: https://whitequark.github.io/ppx_deriving/Ppx_deriving_runtime.html > > -- > whitequark > > -- > 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 > --047d7b3a86bc34212f052098d178 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Jeremie just air-dropped about 25k lines of PPX code on gi= thub and opam, so OCaml's PPX tools are finally out there.=C2=A0 You ca= n find them here:


On Fri, Sep 25, 2015 at 5:00 PM, whiteq= uark <whitequark@whitequark.org> wrote:
Hello,

I am glad to announce ppx_deriving 3.0. It brings two
major changes: hygiene and ppx_type_conv compatibility.
It is installable via opam[1].

First, hygiene. Earlier versions of ppx_deriving:
=C2=A0 1) assumed that all the modules that the deriver
=C2=A0 =C2=A0 =C2=A0requires are not shadowed with a different signature; =C2=A0 2) included user-specified code such as from [@default]
=C2=A0 =C2=A0 =C2=A0attributes in a way that exposed deriver-internal
=C2=A0 =C2=A0 =C2=A0identifiers to such code.

Now, ppx_deriving includes a mechanism for hygienic
unquoting[2], as well as a module[3] containing references
to most standard library modules under their proper names.
This allows it to coexist with e.g. `open Core.Std`.

Second, ppx_type_conv compatibility. You probably don't
know it yet, but Jane Street has converted all their syntax
extensions to ppx, so now there's ppx_type_conv, ppx_sexp_conv,
etc. I've coordinated the development of ppx_deriving with
Jane Street, so now ppx_deriving and ppx_type_conv use
the same syntactic conventions. In fact, they share
the [@@deriving] syntax without any effort from the user!

Furthermore, I have been looking at the sources of Jane Street's
ppx_core, ppx_driver, ppx_type_conv, etc and I find these
projects exceptionally well designed; further, they tackle some
important problems that ppx_deriving has explicitly left out of
scope, such as attribute hygiene.

While these libraries have a somewhat larger API, I think anyone
writing a new deriver should consider using ppx_type_conv.
I cannot outright recommend that since I have not actually
tried it (yet?), but it sounds worthwhile.

[1]: http://opam.ocaml.org/packages/ppx= _deriving/ppx_deriving.3.0/
[2]: https://whitequark.github.= io/ppx_deriving/Ppx_deriving.html#2_Hygiene
[3]: https://whitequark.github.io= /ppx_deriving/Ppx_deriving_runtime.html

--
whitequark

--
Caml-list mailing list.=C2=A0 Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocam= l_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

--047d7b3a86bc34212f052098d178--