package GT
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=3f26c69a215066b42c6edde2ea4cd4516bdc9a01482b64355d3adf87ed85e179
sha512=7a5236618124f370aa373483255bd3efeb5c251005efa7d43aadb6be968df310b5f312b8066245544cfdf9972a7944f0ff2448bd09cb8a8e0bb5f8b1f9b5340b
doc/GT.common/GTCommon/Plugin_intf/class-typ_g/index.html
Class Plugin_intf.typ_gSource
Base class type for all plugins.
Is parametrized by output AST types for convenience. All plugins receive input data as OCaml AST and return pieces specific for backend.
Methods that are specific for a concrete plugin implementation
Name of a trait (and of plugin too). It is used for constructing new classes and * functions related to plugin.
method virtual inh_of_main : loc:'loc -> Ppxlib.type_declaration -> 'typInherited attribute for whole type declaration. Is is defined by plugin kind.
method virtual syn_of_main : loc:'loc ->
?in_class:bool ->
Ppxlib.type_declaration ->
'typSynthesized attribute for whole type declaration. Is is defined by plugin kind.
syn_of_param ~loc name constructs synthethized attribute for type paramter name.
method virtual inh_of_param : loc:'loc ->
Ppxlib.type_declaration ->
string ->
'typinh_of_param ~loc tdecl name constructs inherited attribute for type parameter name.
method virtual plugin_class_params : loc:'loc ->
Ppxlib.core_type list ->
typname:string ->
'typ listThe parameters that the plugin class will have in its definition. * Add 'extra manually if needed.
method virtual alias_inherit_type_params : loc:'loc ->
Ppxlib.type_declaration ->
Ppxlib.core_type list ->
'typ listArguments of inherit class field that will be generated using the types applied in the RHS of type definition.
method virtual extra_class_sig_members : Ppxlib.type_declaration -> 'ctf listAdds a few extra members to a plugin class. Could be some constraints that are difficult to add in place where type parameters are declared.
method virtual extra_class_str_members : Ppxlib.type_declaration -> 'cf listThe same as extra_class_sig_members but for structures.
Methods that are specific for all plugins and unlikely will need to be override
method virtual do_single_sig : loc:'loc ->
is_rec:bool ->
Ppxlib.type_declaration ->
'sign listGenerate signature items for single type definition.
method virtual do_single : loc:'loc ->
is_rec:bool ->
Ppxlib.type_declaration ->
'str listGenerate structure items for single type definition.
method virtual do_typ_gen : loc:'loc ->
mutual_decls:Ppxlib.type_declaration list ->
is_self_rec:(Ppxlib.core_type -> [ `Nonrecursive | `Nonregular | `Regular ]) ->
Ppxlib.type_declaration ->
Ppxlib.core_type ->
'expGenerate transformation expression from specified core_type.
method virtual make_trans_function_name : Ppxlib.type_declaration -> stringGenerate name for transformation function.
method virtual make_trans_function_typ : loc:'loc ->
Ppxlib.type_declaration ->
'typGenerate type of a transformation function.
method virtual do_mutuals : loc:'loc ->
is_rec:bool ->
Ppxlib.type_declaration list ->
'str listGenerate structure items for mutally recursive type declarations.
method virtual eta_and_exp : center:'exp -> Ppxlib.type_declaration -> 'expmethod virtual prepare_fa_args : 'a. loc:'loc ->
(loc:'loc -> flg:Ppxlib.rec_flag -> pat:'pat -> expr:'exp -> 'a -> 'a) ->
Ppxlib.type_declaration ->
'pat list * ('a -> 'a)method virtual make_final_trans_function_typ : loc:'loc ->
Ppxlib.type_declaration ->
'typ