package ppxlib_jane
Module Jane_syntax.LayoutsSource
The ASTs for jkinds and other unboxed-types features
Source
type nonrec expression = | Lexp_constant of constant| Lexp_newtype of string Location.loc * Ppxlib_jane__.Jane_asttypes.const_jkind Location.loc * Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.expression
Source
type nonrec core_type = | Ltyp_var of {name : string option;jkind : Ppxlib_jane__.Jane_asttypes.const_jkind Location.loc;
}| Ltyp_poly of {bound_vars : (string Location.loc * Ppxlib_jane__.Jane_asttypes.const_jkind Location.loc option) list;inner_type : Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.core_type;
}| Ltyp_alias of {aliased_type : Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.core_type;name : string option;jkind : Ppxlib_jane__.Jane_asttypes.const_jkind Location.loc;
}
Source
type nonrec extension_constructor = | Lext_decl of (string Location.loc * Ppxlib_jane__.Jane_asttypes.const_jkind Location.loc option) list * Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.constructor_arguments * Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.core_type option
Source
val expr_of :
loc:Location.t ->
expression ->
Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.expressionSource
val pat_of :
loc:Location.t ->
pattern ->
Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.patternSource
val type_of :
loc:Location.t ->
core_type ->
Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.core_typeSource
val extension_constructor_of :
loc:Location.t ->
name:string Location.loc ->
?info:Docstrings.info ->
?docs:Docstrings.docs ->
extension_constructor ->
Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.extension_constructorSource
val constructor_declaration_of :
loc:Location.t ->
attrs:Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.attributes ->
info:Docstrings.info ->
vars_jkinds:
(string Location.loc
* Ppxlib_jane__.Jane_asttypes.const_jkind Location.loc option)
list ->
args:
Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.constructor_arguments ->
res:Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.core_type option ->
string Location.loc ->
Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.constructor_declarationSee also Ast_helper.Type.constructor, which is a direct inspiration for the interface here.
Source
val of_constructor_declaration :
Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.constructor_declaration ->
((string Location.loc
* Ppxlib_jane__.Jane_asttypes.const_jkind Location.loc option)
list
* Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.attributes)
optionExtract the jkinds from a constructor_declaration; returns leftover attributes along with the annotated variables. Unlike other pieces of jane-syntax, users of this function will still have to process the remaining pieces of the original constructor_declaration.
Source
val type_declaration_of :
loc:Location.t ->
attrs:Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.attributes ->
docs:Docstrings.docs ->
text:Docstrings.text option ->
params:
(Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.core_type
* (Ppxlib_jane__.Shadow_compiler_distribution.Asttypes.variance
* Ppxlib_jane__.Shadow_compiler_distribution.Asttypes.injectivity))
list ->
cstrs:
(Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.core_type
* Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.core_type
* Location.t)
list ->
kind:Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.type_kind ->
priv:Ppxlib_jane__.Shadow_compiler_distribution.Asttypes.private_flag ->
manifest:
Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.core_type option ->
jkind:Ppxlib_jane__.Jane_asttypes.const_jkind Location.loc option ->
string Location.loc ->
Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.type_declarationSee also Ast_helper.Type.mk, which is a direct inspiration for the interface here.
Source
val of_type_declaration :
Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.type_declaration ->
(Ppxlib_jane__.Jane_asttypes.const_jkind Location.loc
* Ppxlib_jane__.Shadow_compiler_distribution.Parsetree.attributes)
optionExtract the jkind annotation from a type_declaration; returns leftover attributes. Similar to of_constructor_declaration in the sense that users of this function will have to process the remaining pieces of the original type_declaration.