Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file GTHELPERS_sig.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296(*
* Generic Transformers PPX syntax extension.
* Copyright (C) 2016-2021
* Dmitrii Kosarev aka Kakadu
* St.Petersburg State University, JetBrains Research
*)(** Signature of AST building functions that are required to support a new backend *)moduletypeS=sigtypeloctypeclass_structuretypecasetypeclass_declarationtypelab_decltypemodule_declarationtypemodule_type_declarationtypetype_argvalloc_from_caml:Ppxlib.location->locvalnoloc:locvalnamed_type_arg:loc:loc->string->type_argvaltyp_arg_of_core_type:Ppxlib.core_type->type_arg(** for Pat *)modulerecPat:sigtypetvalany:loc:loc->tvalunit:loc:loc->tvalvar:loc:loc->string->tvalaccess2:loc:loc->string->string->tvalalias:loc:loc->t->string->tvalsprintf:loc:loc->('a,unit,string,t)format4->'avalof_longident:loc:loc->Ppxlib.longident->tvalconstr:loc:loc->string->tlist->tvalconstr_record:loc:loc->string->(string*t)list->tvalconstraint_:loc:loc->t->Typ.t->tvalvariant:loc:loc->string->tlist->tvaltuple:loc:loc->tlist->tvalrecord:loc:loc->(Ppxlib.longident*t)list->tvalrecord1:loc:loc->Ppxlib.longident->t(* #lident *)valtype_:loc:loc->Ppxlib.longident->tendandExp:sigtypetvalfrom_caml:Ppxlib.expression->tvalident:loc:loc->string->tvalof_longident:loc:loc->Ppxlib.longident->tvalsprintf:loc:loc->('a,unit,string,t)format4->'avalaccess:loc:loc->string->string->tvalunit:loc:loc->tvalint_const:loc:loc->int->tvalstring_const:loc:loc->string->tvalrecord:loc:loc->(Ppxlib.longident*t)list->tvalrecord1:loc:loc->Ppxlib.longident->t->tvalapp:loc:loc->t->t->tvalapp_lab:loc:loc->t->string->t->tvalapp_list:loc:loc->t->tlist->t(* TODO: rename this to `field` or something *)valacc:loc:loc->t->Ppxlib.longident->tvalfield:loc:loc->t->Ppxlib.longident->t(* val function_: loc:loc -> (Pat.t * t) list -> t *)valfun_:loc:loc->Pat.t->t->tvalfun_list:loc:loc->Pat.tlist->t->tvalfun_list_l:loc:loc->(string*Exp.t)list->t->tvalmatch_:loc:loc->t->caselist->tvalobject_:loc:loc->class_structure->tvalrecord:loc:loc->(Ppxlib.longident*t)list->tvalsend:loc:loc->t->string->tvalnew_:loc:loc->Ppxlib.longident->tvalvariant:loc:loc->string->tlist->tvalconstruct:loc:loc->Ppxlib.longident->tlist->tvaltuple:loc:loc->tlist->tvallet_one:loc:loc->?rec_:bool->Pat.t->t->t->tvallet_:loc:loc->?rec_:bool->(Pat.t*t)list->t->tvalassert_false:loc:loc->tvalobjmagic_unit:loc:loc->tvalfailwith_:loc:loc->string->tvaltrue_:loc:loc->tvalfalse_:loc:loc->tvallist:loc:loc->tlist->t(* val new_type: loc:loc -> string -> t -> t *)valconstraint_:loc:loc->t->Typ.t->tvalattribute:Ppxlib.attribute->t->tendandTyp:sigtypetvalfrom_caml:Ppxlib.core_type->tvaluse_tdecl:Ppxlib.type_declaration->tvalof_type_arg:loc:loc->type_arg->tvalof_longident:loc:loc->Ppxlib.longident->tvalaccess2:loc:loc->string->string->tvalsprintf:loc:loc->('a,unit,string,t)format4->'avalident:loc:loc->string->tvalvar:loc:loc->string->tvalany:loc:loc->tvalunit:loc:loc->tvalstring:loc:loc->tvalconstr:loc:loc->Ppxlib.longident->tlist->tvalpair:loc:loc->t->t->tvaltuple:loc:loc->tlist->tvalclass_:loc:loc->Ppxlib.longident->tlist->tvalobject_:loc:loc->Ppxlib.closed_flag->(string*t)list->tvalarrow:loc:loc->t->t->tvalchain_arrow:loc:loc->tlist->tvalvariant:loc:loc->?is_open:bool->Ppxlib.row_fieldlist->tvalvariant_of_t:loc:loc->t->tvalalias:loc:loc->t->string->tvalpoly:loc:loc->stringlist->t->tvalmap:onvar:(string->toption)->t->t(* Inherit type using [> t ] with optional as annotation *)valopenize:loc:loc->?as_:string->t->tvalto_type_arg_exn:t->type_argvalto_type_arg:t->type_argoptionendandCf:sigtypetvalmethod_concrete:loc:loc->string->Exp.t->tvalmethod_virtual:loc:loc->string->Typ.t->tvalinherit_:loc:loc->?as_:stringoption->Cl.t->tvalconstraint_:loc:loc->Typ.t->Typ.t->tendandCty:sigtypetvalarrow:loc:loc->Typ.t->t->tvalconstr:loc:loc->Ppxlib.longident->Typ.tlist->tendandCtf:(* class_sig_item *)sigtypetvalinherit_:loc:loc->Cty.t->tvalmethod_:loc:loc->?virt:bool->string->Typ.t->tvalconstraint_:loc:loc->Typ.t->Typ.t->tendandStr:sigtypetvalof_tdecls:loc:loc->Ppxlib.type_declaration->tvalsingle_value:loc:loc->Pat.t->Exp.t->tvalvalues:loc:loc->?rec_flag:Ppxlib.rec_flag->Vb.tlist->tvalof_vb:loc:loc->?rec_flag:Ppxlib.rec_flag->Vb.t->tvalclass_single:loc:loc->name:string->?virt:bool->?wrap:(Cl.t->Cl.t)->params:type_arglist->Cf.tlist->tvaltdecl:loc:loc->name:string->params:stringlist->Typ.t->tvaltdecl_abstr:loc:loc->string->stringoptionlist->tvaltdecl_record:loc:loc->name:string->params:stringlist->lab_decllist->tvalof_class_declarations:loc:loc->class_declarationlist->t(* val functor1 : loc:loc -> string -> param:string -> Sig.t list -> t list -> t *)valsimple_gadt:loc:loc->name:string->params_count:int->(string*Typ.t)list->tvalmodule_:loc:loc->string->Me.t->tvalmodtype:loc:loc->module_type_declaration->tvalinclude_:loc:loc->Me.t->tendandSig:sigtypetvalof_tdecls:loc:loc->Ppxlib.type_declaration->tvalvalue:loc:loc->name:string->Typ.t->tvalclass_:loc:loc->name:string->params:type_arglist->?virt:bool->?wrap:(Cty.t->Cty.t)->Ctf.tlist->tvalfunctor1:loc:loc->string->param:string->tlist->tlist->tvalsimple_gadt:loc:loc->name:string->params_count:int->(string*Typ.t)list->tvaltdecl_abstr:loc:loc->string->stringoptionlist->tvalmodule_:loc:loc->module_declaration->tvalmodtype:loc:loc->module_type_declaration->tendandMe:sigtypetvalstructure:loc:loc->Str.tlist->tvalident:loc:loc->Longident.t->tvalapply:loc:loc->t->t->t(* val functor_ : loc:loc -> string -> Mt.t option -> t -> t *)endandMt:sigtypetvalident:loc:loc->Longident.t->tvalsignature:loc:loc->Sig.tlist->t(* val functor_: loc:loc -> string -> t option -> t -> t *)valwith_:loc:loc->t->WC.tlist->tendandWC:sigtypetvaltyp:loc:loc->params:stringlist->string->Typ.t->tendandCl:(* class_expr *)sigtypetvalfun_:loc:loc->Pat.t->t->tvalfun_list:loc:loc->Pat.tlist->t->tvalconstr:loc:loc->Longident.t->Typ.tlist->tvalapply:loc:loc->t->Exp.tlist->tvallet_:loc:loc->?flg:Ppxlib.rec_flag->Vb.tlist->t->tendandVb:sigtypetendvalclass_declaration:loc:loc->name:string->?virt:bool->?wrap:(Cl.t->Cl.t)->params:type_arglist->Cf.tlist->class_declarationvalvalue_binding:loc:loc->pat:Pat.t->expr:Exp.t->Vb.tvalcase:lhs:Pat.t->rhs:Exp.t->casevalclass_structure:self:Pat.t->fields:Cf.tlist->class_structurevallab_decl:loc:loc->string->bool->Typ.t->lab_declvalmodule_declaration:loc:loc->name:string->Mt.t->module_declarationvalmodule_type_declaration:loc:loc->name:string->Mt.toption->module_type_declarationvaluse_new_type:loc:loc->string->Exp.t->Exp.t(* if argument is polymorphic variant type then make it open *)valopenize_poly:loc:loc->Typ.t->Typ.t(* val closize_poly: Typ.t -> Typ.t *)valprepare_param_triples:loc:loc->extra:Typ.t->?inh:(loc:loc->string->Typ.t)->?syn:(loc:loc->string->Typ.t)->?default_inh:Typ.t->?default_syn:Typ.t->stringlist->Typ.tlistvaltyp_vars_of_typ:Typ.t->stringlistend