package ppx_dream_eml
All checked builds passInstall
dune-project
Dependency
Authors
Maintainers
Sources
md5=ff3c93a02b418ae319918c0629dcb21f
sha512=503ef7735fe4421ea234b7d7d57845cbf3e016cb6f29838edad162c96fefdaac6512a1da34cfd0a432638171eba10dc6f556edaf8a610ffaf45fc73646592814
Description
ppx_dream_eml allows processing Dream's Embedded ML syntax inline without the need to create dune directives and separate files.
README
ppx_dream_eml
A very straightforward extension that allows you to write Dream's .eml templates directly in your OCaml code without the need to add directives to dune.
This also has the benefit of playing nice with your syntax highlighting and code editor, since the code produced will be valid OCaml.
The processing code is lifted directly from the Dream repository.
Usage
Add the ppx to your dune file:
...
(preprocess (pps ... ppx_dream_eml))
...And then use the eml extension in your OCaml code and write .eml templates as you normally would, except put the template part inside the extension:
let render message = {%eml|
<html>
<body>
<p>The message is <b><%s message %></b>!</p>
</body>
</html>
|}Known issues
Errors won't quite map to the right places in your eml. Could perhaps be fixed with a more complicated implementation.
Dependencies (5)
- camlp-streams
- dream
- ppxlib
-
dune
>= "3.11" - ocaml
Dev Dependencies (1)
-
odoc
with-doc
Optional Dependencies
None
Used by
None
Conflicts
None
Build status
Results of building ppx_dream_eml with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
| Version | OCaml 4.11 | OCaml 4.14 | OCaml 5.2 | OCaml 5.4 | OCaml 5.5 |
|---|---|---|---|---|---|
| 1.0 (this version) | good | good | good | good | good |
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure