package ppxlib

  1. Overview
  2. Docs
Standard infrastructure for ppx rewriters

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ppxlib-0.37.0.tbz
sha256=2e223837e7cecc3bc84a432432c0a72f4e1d5be9165c9c33772f156db85db0b3
sha512=78c62c6de7a641b950de9b4b744841c8823918c545046693e291077adfcd069a812094c11d8d51f792c0b5f340307d38f452ff0a92520df63ed17a3ca9922e2e

doc/ppxlib/Ppxlib/Deriving/Generator/index.html

Module Deriving.GeneratorSource

Sourcetype ('output_ast, 'input_ast) t
Sourceval make : ?attributes:Attribute.packed list -> ?deps:t list -> ?unused_code_warnings:bool -> ('f, 'output_ast) Args.t -> (loc:Location.t -> path:string -> 'input_ast -> 'f) -> ('output_ast, 'input_ast) t

make args gen creates a generator that can be passed to Deriving.add to generate an output AST from an input AST and generator arguments.

deps is a list of derivers that this generator depends on.

attributes is deprecated and unused. It is only kept for backward compatibility.

unused_code_warning controls whether unused code warnings (e.g. warnings 32 and 60) are enabled or suppressed in emitted code. Default is false, which suppresses the warnings.

Sourceval make_noarg : ?attributes:Attribute.packed list -> ?deps:t list -> ?unused_code_warnings:bool -> (loc:Location.t -> path:string -> 'input_ast -> 'output_ast) -> ('output_ast, 'input_ast) t

Same as make, but without arguments.

Sourcemodule V2 : sig ... end
Sourceval apply : ('output_ast, 'input_ast) t -> name:string -> ctxt:Expansion_context.Deriver.t -> 'input_ast -> (string * Astlib.Ast_502.Parsetree.expression) list -> 'output_ast