Skip to content

Commit

Permalink
Doc updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Kakadu committed Feb 10, 2017
1 parent a04fe2e commit 2549f76
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,22 @@ It is also possible to use `[@polyprinter]`. The difference is that for a type `

The function `fprintf` is locally defined in the printer.

By default all constructors are printed with prefix which is dot-separated filename and module path. For example
``` ocaml
(* A.ml *)
module X = struct type t = C [@@deriving show] end
```

This code will create printers which return the string `A.X.C` where `A` is a filename, `X` is a module path and `C` is a constructor name. To skip all module paths the one needs to derive show with `nofullpath` option (which equals to `false` by default)

``` ocaml
# module X = struct type t = C [@@deriving show { nofullpath = true }] end;;
...
# X.show (X.C);;
- : Ppx_deriving_runtime.string = "C"
```


Plugins: eq and ord
-------------------

Expand Down

0 comments on commit 2549f76

Please sign in to comment.