package ppx_demo

  1. Overview
  2. Docs
PPX that exposes the source code string of an expression/module structure.

Install

Dune Dependency

Authors

Maintainers

Sources

ppx_demo-v0.16.0.tar.gz
sha256=6abef5c073772cef7d37fba6bbfd76b1ac32e0ad94976a63f91762bcaf783507

Description

PPX that exposes the source code string of an expression/module structure.

Published: 14 Jun 2023

README

ppx_demo

This is a preprocessor that expands an arbitrary expression into a tuple containing the source code for the expression along with the expression itself. Look at the tests of for some examples.

You might want this ppx if you have a program which acts as documentation. For example, the Bonsai devs have a collection of examples that demonstrate how to use various UI components. Viewing those examples in a browser shows the result of the code, but not the code itself, which means that if someone wants to see how much code a particular example takes, they need to navigate in their text editor to the example's source file. This ppx makes it possible to easily include source for an example directly within the example itself.

Dependencies (6)

  1. ppxlib >= "0.28.0"
  2. dune >= "2.0.0"
  3. ppx_jane >= "v0.16" & < "v0.17"
  4. dedent >= "v0.16" & < "v0.17"
  5. core >= "v0.16" & < "v0.17"
  6. ocaml >= "4.14.0"

Dev Dependencies

None

Used by

None

Conflicts

None

OCaml

Innovation. Community. Security.