package ppxlib

  1. Overview
  2. Docs
Standard infrastructure for ppx rewriters

Install

Dune Dependency

Authors

Maintainers

Sources

ppxlib-0.35.0.tbz
sha256=d9d959fc9f84260487e45684dc741898a92fc5506b61a7f5cac65d21832db925
sha512=e428b1e3b89261c7efdaa18016264d1afbf067cb9b0d41124b04796c2487ac7ca8ee9a24a60d56f20d1774cb44aaa9ecf1512f17455812ba8d62d4ef93616ee7

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_500.Parsetree.expression) list -> 'output_ast
OCaml

Innovation. Community. Security.