package ppxlib

  1. Overview
  2. Docs
Standard infrastructure for ppx rewriters

Install

Dune Dependency

Authors

Maintainers

Sources

ppxlib-0.32.1.tbz
sha256=9dbad8bcb1c8b4f3df3f58bca60a5ed23d86531f0da34b4196c86bd585c09d7f
sha512=7b93b622b119478dde03adcf4993e73ea937c91c280e453ccee631c682d8589ecb31841f11d6a14966239954e22e000da8afbe25a0f089532c7210b698c52553

doc/ppxlib/Ppxlib/Deriving/index.html

Module Ppxlib.DerivingSource

Deriving code from type declarations.

Sourcemodule Args : sig ... end

Specification of generator arguments

Generator registration
Sourcetype t

Type of registered derivers

Sourcemodule Generator : sig ... end

Register a new deriving generator.

The various arguments are for the various items on which derivers can be attached in structure and signatures.

We distinguish exception from type_extension as exception E is not exactly the same as type exn += E. Indeed if the type exn is redefined, then type exn += E will add E to the new exn type while exception E will add E to the predefined exn type.

extension register an expander for extension with the name of the deriver. This is here mostly to support the ppx_deriving backend.

Sourceval add_alias : string -> ?str_type_decl:t list -> ?str_type_ext:t list -> ?str_exception:t list -> ?str_module_type_decl:t list -> ?sig_type_decl:t list -> ?sig_type_ext:t list -> ?sig_exception:t list -> ?sig_module_type_decl:t list -> t list -> t

add_alias name set add an alias. When the user write the alias, all the generator of set will be used instead. It is possible to override the set for any of the context by passing the specific set in the approriate optional argument of add_alias.

Sourceval ignore : t -> unit

Ignore a deriver. So that one can write: Deriving.add ... |> Deriving.ignore

OCaml

Innovation. Community. Security.