Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pedrobslisboa/ppx-by-example
This repository contains examples to help on understanding what are and how to write PPXs in OCaml.
https://github.com/pedrobslisboa/ppx-by-example
ocaml ppx ppxlib reasonml
Last synced: 3 months ago
JSON representation
This repository contains examples to help on understanding what are and how to write PPXs in OCaml.
- Host: GitHub
- URL: https://github.com/pedrobslisboa/ppx-by-example
- Owner: pedrobslisboa
- Created: 2024-07-06T14:14:17.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-09-16T13:57:58.000Z (4 months ago)
- Last Synced: 2024-09-30T06:24:22.506Z (4 months ago)
- Topics: ocaml, ppx, ppxlib, reasonml
- Language: Makefile
- Homepage:
- Size: 4.25 MB
- Stars: 32
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## PPX by examples
:warning: **This repository is a work in progress.** :warning:
This repository contains examples to help on understanding what are and how to write PPXs in OCaml and for it we are going to use PPXLib.
On my ppx learning journey, I'm having some difficulties to find examples and explanations about how to write a PPX. So, I decided to create this repository to help others that are in the same situation as me, and also push me into learning more about it.
So as I said, I'm learning, and I'm not an expert on the subject. If you find any mistake or have any suggestion, please open an issue or a pull request. I'll be glad to receive your feedback.
## Content
- [AST](./examples/1%20-%20AST/README.md)
- [Building an AST](./examples/1%20-%20AST/a%20-%20Building%20AST/README.md)
- [Destructing an AST](./examples/1%20-%20AST/b%20-%20Destructing%20AST/README.md)
- [Writing a PPX](./examples/2%20-%20Writing%20PPXs/README.md)
- [Context-free transformations](./examples/2%20-%20Writing%20PPXs/a%20-%20Context%20Free/README.md)
- [Global transformations](./examples/2%20-%20Writing%20PPXs/b%20-%20Global/README.md)
- Testing a PPX (wip)## References
- [Ocaml Metaprogramming Docs](https://ocaml.org/docs/metaprogramming)
- [PPXLib documentation](https://ocaml-ppx.github.io/ppxlib/ppxlib/index.html)
- [The needed introduction to writing a ppx](https://www.youtube.com/live/dMoRMqQ6GLs?feature=shared&t=4251)
- [An introduction to OCaml PPX ecosystem
](https://tarides.com/blog/2019-05-09-an-introduction-to-ocaml-ppx-ecosystem/)