From: Jan Rehders <wurstgebaeck@googlemail.com>
To: caml-list <caml-list@yquem.inria.fr>
Subject: [Caml-list] Beta release of ppx_string_interpolate, and help needed with ocamlfind/opam
Date: Sun, 26 Oct 2014 19:20:09 +0100 [thread overview]
Message-ID: <CAJwN6-0i1BBOQ1Z5Y0VTikhZeNpJF8q4OoAY05KtnLiL33zHWg@mail.gmail.com> (raw)
Hi,
To get familiar with ppx filters I made a simple filter to produce
strings by interpolation like [%str “value of foobar is $(foobar)”].
It’s 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:
= Packaging =
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’t 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 ‘ocamlfind list’
won’t contain ppx_string_interpolate. I’m not sure how to investigate
this as I can’t 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’m
missing but don’t see anything, either. So any hints what might be the
issue here would also be appreciated.
= Using \ instead of $ =
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’ve missed to suppress specific warnings on the code inside
[%str ..] from ppx filters?
Any feedback is appreciated (and thanks to the people in #ocaml who
already provided some very valuable suggestions!).
Cheers,
Jan
next reply other threads:[~2014-10-26 18:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-26 18:20 Jan Rehders [this message]
2014-10-27 16:01 ` Alain Frisch
2014-10-27 23:36 ` Jan Rehders
2014-10-28 8:18 ` Török Edwin
2014-10-28 9:13 ` Francois Berenger
2014-10-31 12:49 ` Jan Rehders
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJwN6-0i1BBOQ1Z5Y0VTikhZeNpJF8q4OoAY05KtnLiL33zHWg@mail.gmail.com \
--to=wurstgebaeck@googlemail.com \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox