From 7fd85fa4581a5dfc5a01172f2e4a7eb4775a3993 Mon Sep 17 00:00:00 2001 From: Christine Rose Date: Wed, 18 Sep 2024 23:15:04 -0700 Subject: [PATCH] Line edits for README_PPX.md --- README_PPX.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README_PPX.md b/README_PPX.md index cb023c9e243..0c8496026f7 100644 --- a/README_PPX.md +++ b/README_PPX.md @@ -1,4 +1,4 @@ -## ppx_irmin +## `ppx_irmin` PPX extension for automatically generating Irmin type representations. @@ -32,7 +32,7 @@ let tree_t leaf_t = Type representations can also be derived inline using the `[%typ: ]` extension point. -### Installation and usage +### Installation and Usage `ppx_irmin` may be installed via [opam](https://opam.ocaml.org/): @@ -40,8 +40,8 @@ extension point. opam install ppx_irmin ``` -If you're using the [dune](https://github.com/ocaml/dune) build system, add the -following field to your `library`, `executable` or `test` stanza: +If you're using the [Dune](https://github.com/ocaml/dune) build system, add the +following field to your `library`, `executable`, or `test` stanza: ``` (preprocess (pps ppx_irmin)) @@ -54,8 +54,8 @@ automatically derive an Irmin type representation with the same name. `ppx_irmin` supports all of the type combinators exposed in the [Irmin.Type](https://docs.mirage.io/irmin/Irmin/Type/index.html) module (basic -types, records, variants (plain and closed polymorphic), recursive types etc.). -Types with parameters will result in parameterised representations (i.e. type +types, records, variants (plain and closed polymorphic), recursive types, etc.). +Types with parameters will result in parameterised representations (i.e., type `'a t` is generated a representation of type `'a Type.t -> 'a t Type.t`). To supply base representations from a module other than `Irmin.Type` (such as @@ -69,10 +69,10 @@ type foo = unit [@@deriving irmin { lib = Some "Mylib.Types" }] val foo_t = Mylib.Types.unit ``` -This argument can also be passed as a command-line option (i.e. `--lib +This argument can also be passed as a command-line option (i.e., `--lib Mylib.Types`, with `--lib ''` interpreted as the current module). -#### Naming scheme +#### Naming Scheme The generated type representation will be called `_t`, unless the type-name is `t`, in which case the representation is simply `t`. This @@ -107,7 +107,7 @@ type t = unit [@nobuiltin] [@@deriving irmin] let t = unit_t (* not [Irmin.Type.unit] *) ``` -#### Signature type definitions +#### Signature Type Definitions The `ppx_irmin` deriver can also be used in signatures to expose the auto-generated value: