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 F0A927EFCD for ; Tue, 28 Oct 2014 00:36:55 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of wurstgebaeck@googlemail.com) identity=pra; client-ip=209.85.223.174; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="wurstgebaeck@googlemail.com"; x-sender="wurstgebaeck@googlemail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of wurstgebaeck@googlemail.com designates 209.85.223.174 as permitted sender) identity=mailfrom; client-ip=209.85.223.174; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="wurstgebaeck@googlemail.com"; x-sender="wurstgebaeck@googlemail.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-ie0-f174.google.com) identity=helo; client-ip=209.85.223.174; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="wurstgebaeck@googlemail.com"; x-sender="postmaster@mail-ie0-f174.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Au8DADTWTlTRVd+ulGdsb2JhbABchDoEgwK2ZQabNwKBEQcWAREBAQEBBwsLCRIwhAMBAQQSER0BATcBDwsLDQICJgICIhIBBQEcBhMiiAkBAxKqO26KO3iFAwEFiGkKQA2GOAEBAQEBBQEBAQEYBoEshQiKAwEBHDMHgneBVJ1mjGqHUBgpgzEgFoFFPC+BD4E8AQEB X-IPAS-Result: Au8DADTWTlTRVd+ulGdsb2JhbABchDoEgwK2ZQabNwKBEQcWAREBAQEBBwsLCRIwhAMBAQQSER0BATcBDwsLDQICJgICIhIBBQEcBhMiiAkBAxKqO26KO3iFAwEFiGkKQA2GOAEBAQEBBQEBAQEYBoEshQiKAwEBHDMHgneBVJ1mjGqHUBgpgzEgFoFFPC+BD4E8AQEB X-IronPort-AV: E=Sophos;i="5.04,798,1406584800"; d="scan'208";a="84961847" Received: from mail-ie0-f174.google.com ([209.85.223.174]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 28 Oct 2014 00:36:54 +0100 Received: by mail-ie0-f174.google.com with SMTP id x19so5478944ier.33 for ; Mon, 27 Oct 2014 16:36:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=uyTwNA4JbMjX5CbbP7Rx+R/unTX7ibkxKrdmJ8JDeKU=; b=VytyUA92VdsrpiQPozHaMaaVMDrloCMKFpGh23ifHdXgjnglaKBxBeBH1in856GtR1 QJekqLzmeRaNWePQJs7tZhpkuU8fkoubEKmhvavSKipmTrrwuAc/8eRuvyKYErs0xCjX uyiDbo9Kq6rsJPSH2PsispIb3Fg5cQMqziDl922+ggIlPkGNldUWlUu04F89peKj4UV5 qprtmshc1bAFeKnlQwS+/DWTDAWQQZzZzQsEeS/lQMnDuEQC4tqTV4ypSKEMYIX+s+7c zu0EXR3J2uwZ3OBGD0pcZGsrM4mKgKt919uLH+3qCiCza4xaopnXmGinnGgn4lresLeI dAhw== MIME-Version: 1.0 X-Received: by 10.42.167.1 with SMTP id q1mr500280icy.48.1414453013396; Mon, 27 Oct 2014 16:36:53 -0700 (PDT) Received: by 10.107.148.77 with HTTP; Mon, 27 Oct 2014 16:36:53 -0700 (PDT) In-Reply-To: <544E6C43.6090201@frisch.fr> References: <544E6C43.6090201@frisch.fr> Date: Tue, 28 Oct 2014 00:36:53 +0100 Message-ID: From: Jan Rehders To: Alain Frisch Cc: caml-list Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] Beta release of ppx_string_interpolate, and help needed with ocamlfind/opam Alain: yes, for the new string literals this issue does not exist (and they are already supported). But I'd like to keep support for regular strings, too. I guess I could also simply expand something like {istr|...|istr} but I think transforming anything that isn't in "my" annotations is a bad idea. Btw: anyone tried to use this with opam? I still couldn't get ocamlfind to find the package after installation (see first mail). On Mon, Oct 27, 2014 at 5:01 PM, Alain Frisch wrote: > On 10/26/2014 07:20 PM, Jan Rehders wrote: >> >> =3D Using \ instead of $ =3D >> Using Swift style \(foo) instead of $(foo) would be nice but will >> produce warnings from the lexer which I can't suppress w/o suppressing >> all warnings about invalid escape sequences. Also this requires doing >> this from the makefile so every user would have to do it. Is there >> some API I=E2=80=99ve missed to suppress specific warnings on the code i= nside >> [%str ..] from ppx filters? > > > You might want to use the new syntax for string literals: > > {| .... |} > > or: > > {id| .... |id} > > (for an arbitrary id). Contrary to regular string literals, OCaml doesn't > apply any lexing convention to the string contents: what you have in the > Parsetree is exactly the sequence of bytes from the source file. This > allows you to use you own conventions: > > \(foo) > > Also, you can map in an exact way between from an index in the string to a > location in the source code (in a regular string, you cannot distinguish > \065 from A in the Parsetree, which makes this exact mapping impossible). > > > Combined with an extension node, this would give: > > [%str{| blabla \(x) blabla |}] > > -- Alain