package GT

  1. Overview
  2. Docs
Generic programming with extensible transformations

Install

Dune Dependency

Authors

Maintainers

Sources

GT-v0.5.3.tbz
sha256=55f8249e780b9a1891d9d4bb5bf2f4f7fdc619a06d9f6f04961afe193cbaaac4
sha512=3a9422aafb7a4d22c484d03950603e7f05c10512ddeb7675fe5dce73f0ef8f3537eabad1d5ebfb99c6b2e952a6203c793a1cd9d62d2863cef31616a4256b99d2

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.