package GT

  1. Overview
  2. Docs
Generic programming with extensible transformations

Install

Dune Dependency

Authors

Maintainers

Sources

0.5.0.tar.gz
sha256=3f26c69a215066b42c6edde2ea4cd4516bdc9a01482b64355d3adf87ed85e179
sha512=7a5236618124f370aa373483255bd3efeb5c251005efa7d43aadb6be968df310b5f312b8066245544cfdf9972a7944f0ff2448bd09cb8a8e0bb5f8b1f9b5340b

doc/GT.common/GTCommon/Plugin_intf/index.html

Module GTCommon.Plugin_intfSource

Base class type that all trait should follow.

For single type declaration

type ('a, 'b, ...) typ = ...

plugin generate a plugin class called traitnname_typ_t and a transformation function called traitname_t.

Generated transformation functions can make use of inherited attribute for type parameter (which is being generated by method typ_g#inh_of_param) or simply ignore it. For example, transformation function for type parameter 'a can have types either 'a -> 'sa (see plugins Show and Gmap as examples) or 'ia -> 'a -> 'sa.

Sourcetype plugin_args = (Ppxlib.longident * Ppxlib.expression) list

A type that stores additional arguments passed to each plugin.

Sourceclass virtual ['loc, 'exp, 'typ, 'type_arg, 'ce, 'ctf, 'cf, 'str, 'sign, 'pat] typ_g : object ... end

Base class type for all plugins.

Sourcemodule Make (AstHelpers : GTHELPERS_sig.S) : sig ... end

Functor that takes AST construction functions for a specific backend and constructs a plugin object.

Sourcemodule type MAKE = functor (AstHelpers : GTHELPERS_sig.S) -> sig ... end
OCaml

Innovation. Community. Security.