1
- ## ppx_irmin
1
+ ## ` ppx_irmin `
2
2
3
3
PPX extension for automatically generating Irmin type representations.
4
4
@@ -32,16 +32,16 @@ let tree_t leaf_t =
32
32
Type representations can also be derived inline using the ` [%typ: <core-type>] `
33
33
extension point.
34
34
35
- ### Installation and usage
35
+ ### Installation and Usage
36
36
37
37
` ppx_irmin ` may be installed via [ opam] ( https://opam.ocaml.org/ ) :
38
38
39
39
```
40
40
opam install ppx_irmin
41
41
```
42
42
43
- If you're using the [ dune ] ( https://github.com/ocaml/dune ) build system, add the
44
- following field to your ` library ` , ` executable ` or ` test ` stanza:
43
+ If you're using the [ Dune ] ( https://github.com/ocaml/dune ) build system, add the
44
+ following field to your ` library ` , ` executable ` , or ` test ` stanza:
45
45
46
46
```
47
47
(preprocess (pps ppx_irmin))
@@ -54,8 +54,8 @@ automatically derive an Irmin type representation with the same name.
54
54
55
55
` ppx_irmin ` supports all of the type combinators exposed in the
56
56
[ Irmin.Type] ( https://docs.mirage.io/irmin/Irmin/Type/index.html ) module (basic
57
- types, records, variants (plain and closed polymorphic), recursive types etc.).
58
- Types with parameters will result in parameterised representations (i.e. type
57
+ types, records, variants (plain and closed polymorphic), recursive types, etc.).
58
+ Types with parameters will result in parameterised representations (i.e., type
59
59
` 'a t ` is generated a representation of type ` 'a Type.t -> 'a t Type.t ` ).
60
60
61
61
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" }]
69
69
val foo_t = Mylib.Types.unit
70
70
```
71
71
72
- This argument can also be passed as a command-line option (i.e. `--lib
72
+ This argument can also be passed as a command-line option (i.e., `--lib
73
73
Mylib.Types` , with ` --lib ''` interpreted as the current module).
74
74
75
- #### Naming scheme
75
+ #### Naming Scheme
76
76
77
77
The generated type representation will be called ` <type-name>_t ` , unless the
78
78
type-name is ` t ` , in which case the representation is simply ` t ` . This
@@ -107,7 +107,7 @@ type t = unit [@nobuiltin] [@@deriving irmin]
107
107
let t = unit_t (* not [Irmin.Type.unit] *)
108
108
```
109
109
110
- #### Signature type definitions
110
+ #### Signature Type Definitions
111
111
112
112
The ` ppx_irmin ` deriver can also be used in signatures to expose the
113
113
auto-generated value:
0 commit comments