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 D64017EFCD for ; Sun, 26 Oct 2014 19:20:11 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of wurstgebaeck@googlemail.com) identity=pra; client-ip=209.85.213.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="wurstgebaeck@googlemail.com"; x-sender="wurstgebaeck@googlemail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of wurstgebaeck@googlemail.com designates 209.85.213.172 as permitted sender) identity=mailfrom; client-ip=209.85.213.172; receiver=mail2-smtp-roc.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 (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ig0-f172.google.com) identity=helo; client-ip=209.85.213.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="wurstgebaeck@googlemail.com"; x-sender="postmaster@mail-ig0-f172.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsYDADg6TVTRVdWslGdsb2JhbABcg2JYBIMCtX8Gk2qITgcWAREBAQEBBwsLCRIwhBsRHQEBOCUPAiYCJBIBBQEiGxcDiAkBAxINpy5uijt4hQMBBYdlCkANhkQaAgSBLIUIjVKBVJZUhxKMaodQGCmFLDwvAYJKAQEB X-IPAS-Result: AsYDADg6TVTRVdWslGdsb2JhbABcg2JYBIMCtX8Gk2qITgcWAREBAQEBBwsLCRIwhBsRHQEBOCUPAiYCJBIBBQEiGxcDiAkBAxINpy5uijt4hQMBBYdlCkANhkQaAgSBLIUIjVKBVJZUhxKMaodQGCmFLDwvAYJKAQEB X-IronPort-AV: E=Sophos;i="5.04,791,1406584800"; d="scan'208";a="103036415" Received: from mail-ig0-f172.google.com ([209.85.213.172]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 26 Oct 2014 19:20:11 +0100 Received: by mail-ig0-f172.google.com with SMTP id h15so3286094igd.11 for ; Sun, 26 Oct 2014 11:20:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Ydv0g9v43UzLDpU/9ttWbJh2DW92MRILDYrHCE7LqBQ=; b=mqs0lRh1yLKPGbf6eXoz9R/p+hqliO6tc73ISR9VG26eaLVaMFHZVCzpaNrbj9IUo0 iXm1WECNG0nKPLhGTqS1WH6LfqavPgkOYPnKFzCjqvSCgAMGA9YmGdz0O4c5yneU57I/ p0cHSq8ZRCQJdSSpi5VG4R9D5/iPb4lW2AQRTmxEEe/tXpv/l/RSAKpTgMs0Jo65mrA+ VFech7n0nQGSZVvqpf2BeEA5O5kIE6T2oTNvQmP7RivbneRfxzQZJW2+uJveip2erZUZ Ed8hsu4tGjYhUQbPBNcNBrksVY2DdRk8M80WQwp3sm1vyYTjXrwMstIMnA4TnzHGkUXI 0Txw== MIME-Version: 1.0 X-Received: by 10.50.41.34 with SMTP id c2mr16997398igl.5.1414347609721; Sun, 26 Oct 2014 11:20:09 -0700 (PDT) Received: by 10.107.148.77 with HTTP; Sun, 26 Oct 2014 11:20:09 -0700 (PDT) Date: Sun, 26 Oct 2014 19:20:09 +0100 Message-ID: From: Jan Rehders To: caml-list Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Caml-list] Beta release of ppx_string_interpolate, and help needed with ocamlfind/opam Hi, To get familiar with ppx filters I made a simple filter to produce strings by interpolation like [%str =E2=80=9Cvalue of foobar is $(foobar)= =E2=80=9D]. It=E2=80=99s loosely based on Peter Zotov's getenv example but demonstrates= a few more things like fixing up source locations and emitting compilation errors. Find it at https://github.com/sheijk/ppx_string_interpolate Some open issues: =3D Packaging =3D opam/ocamlfind packaging. There are META and opam files plus ocamlfind based install/uninstall steps. I think I got this mostly right but currently it does not work. The problem is that after installation using opam ocamlfind won=E2=80=99t find my package. I followed the steps from https://opam.ocaml.org/doc/Packaging.html. After installation I see the META and ppx_string.native files in ~/.opam/4.02.1/lib/ppx_string_interpolate/.. but =E2=80=98ocamlfind list=E2= =80=99 won=E2=80=99t contain ppx_string_interpolate. I=E2=80=99m not sure how to i= nvestigate this as I can=E2=80=99t find too much documentation about the internals of ocamlfind/opam (like which files does it expect, where should they be, etc.). I tried to check with ppx_tools and sedlex to see what I=E2=80=99m missing but don=E2=80=99t see anything, either. So any hints what might be = the issue here would also be appreciated. =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 insi= de [%str ..] from ppx filters? Any feedback is appreciated (and thanks to the people in #ocaml who already provided some very valuable suggestions!). Cheers, Jan