paurkedal / ppx_regexp

Matching Regular Expressions with OCaml Patterns
GNU Lesser General Public License v3.0
57 stars 3 forks source link

No implementation provided for Re_pcre #5

Closed boynux closed 5 years ago

boynux commented 5 years ago

I'm trying to use ppx_regexp, but I get this error when trying to compile my app. I already have "re" as a dependency, but not sure what else I'm missing.

ocaml: 4.04.2 opam: 1.2.2

output:

Error: No implementations provided for the following modules:
         Re_pcre referenced from dispatch.cmx

As a side note I'm very new to Ocaml, could be I'm missing something very basic. Thank you

paurkedal commented 5 years ago

Assuming you are using the latest version (0.4.x), you need re.perl.

Since you are now to OCaml, I would also recommend building with dune, since it will pick up the runtime dependency. To do so, create a file dune next to your source code with something like

(executable
  (name hello)
  (preprocess (pps ppx_regexp)))

and execute it with dune exec ./hello.exe.

boynux commented 5 years ago

Will give it a try and let you know. Thanks for the quick response. btw, this ppx helped me a lot to simplify my code logic!

boynux commented 5 years ago

I'll close this, adding re.perl solved the issue. Thanks for your support!