caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Beta release of ppx_string_interpolate, and help needed with ocamlfind/opam
@ 2014-10-26 18:20 Jan Rehders
  2014-10-27 16:01 ` Alain Frisch
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Rehders @ 2014-10-26 18:20 UTC (permalink / raw)
  To: caml-list

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-10-31 12:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-26 18:20 [Caml-list] Beta release of ppx_string_interpolate, and help needed with ocamlfind/opam Jan Rehders
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).