{"id":21447307,"url":"https://github.com/ml-in-barcelona/ppxlib-simple-example","last_synced_at":"2025-07-14T19:31:56.282Z","repository":{"id":53610047,"uuid":"311690650","full_name":"ml-in-barcelona/ppxlib-simple-example","owner":"ml-in-barcelona","description":"ppxlib simple example, minimal boilerplate to write a ppx. Using esy and alcotest for testing.","archived":false,"fork":false,"pushed_at":"2024-01-18T10:39:43.000Z","size":153,"stargazers_count":11,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-14T09:31:54.978Z","etag":null,"topics":["alcotest","ocaml","ppx","ppx-extension","ppxlib"],"latest_commit_sha":null,"homepage":"","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ml-in-barcelona.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-10T14:52:03.000Z","updated_at":"2024-01-07T21:38:33.000Z","dependencies_parsed_at":"2023-01-20T13:01:39.932Z","dependency_job_id":null,"html_url":"https://github.com/ml-in-barcelona/ppxlib-simple-example","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ml-in-barcelona%2Fppxlib-simple-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ml-in-barcelona%2Fppxlib-simple-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ml-in-barcelona%2Fppxlib-simple-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ml-in-barcelona%2Fppxlib-simple-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ml-in-barcelona","download_url":"https://codeload.github.com/ml-in-barcelona/ppxlib-simple-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225994828,"owners_count":17556830,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alcotest","ocaml","ppx","ppx-extension","ppxlib"],"created_at":"2024-11-23T03:09:39.110Z","updated_at":"2025-07-14T19:31:56.275Z","avatar_url":"https://github.com/ml-in-barcelona.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ppxlib-simple-example\n\nA simple ppx to examplify the initial setup of [ppxlib](https://github.com/ocaml-ppx/ppxlib/), part of the talk [**The needed introduction to writing a ppx**](https://youtu.be/dMoRMqQ6GLs?t=4184) given at [Reason STHLM Meetup](https://www.meetup.com/es-ES/ReasonSTHLM/)..\n\nIt uses [`opam`](https://opam.ocaml.org)\n- OCaml 5.2.0\n- dune 3.12\n- ppxlib 0.27\n\n## Installation\n\n```bash\nmake install\n```\n\n## Building\n\n```bash\nmake build # Builds the project, once\nmake dev # Watch the filesystem and re-builds the project on each change\n```\n\n## Testing\n\n```bash\nmake test # Runs snapshot tests\nmake test-watch # Watch the filesystem and re-runs the tests on each change\nmake test-update # Updates the snapshot tests\n```\n\n## Usage\n\nUsers of your ppx need to add the ppx name to their dune stanza:\n\n```lisp\n(preprocess\n  (pps ppx-simple-example))\n```\n\nAnd then you can use it in your code:\n\n```ocaml\nprint_endline [%yay]\n(* Transforms to *)\nprint_endline \"Hello future compiler engineer!\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fml-in-barcelona%2Fppxlib-simple-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fml-in-barcelona%2Fppxlib-simple-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fml-in-barcelona%2Fppxlib-simple-example/lists"}