Perk.UtilsVarious utilities.
val add_parameter_to_func : Ast.perktype -> Ast.perktype -> Ast.perktypeUtility function to add a parameter (i.e., self) to a type, iff it is a functional
val add_parameter_to_func_only : Ast.perktype -> Ast.perktype -> Ast.perktypeUtility function to add a parameter (i.e., self) to a type, iff it is a function
val add_parameter_to_func_2 : Ast.perktype -> Ast.perktype -> Ast.perktypeUtility function to add a parameter (i.e., self) to a type, iff it is a function
val void_type : Ast.perktypeval int_type : Ast.perktypeval float_type : Ast.perktypeval char_type : Ast.perktypeval bool_type : Ast.perktypeval void_pointer : Ast.perktypeval self_type : Ast.perkident -> Ast.perktypeval func_of_lambda_void : Ast.perktype -> Ast.perktypeTransorms a lambda to a function
val functype_of_lambdatype : Ast.perktype -> Ast.perktypeTransforms a function type to a lambda type.
val lambdatype_of_func : Ast.perktype -> Ast.perktypeTransforms a lambda type to a function type.
val lambdatype_of_func_with_self : Ast.perktype -> Ast.perktype -> Ast.perktypeTransforms a function type with a self argument to a lambda type
val lambda_expr_of_func_expr_with_self :
Ast.expr_a ->
Ast.perktype ->
Ast.perktype ->
Ast.expr_aTransforms a function expression with a self argument to a lambda expression
val lambda_expr_of_func_expr : Ast.expr_a -> Ast.perktype -> Ast.expr_aTransforms a function expression to a lambda expression.
val lambda_def_of_func_def : Ast.perkdef -> Ast.perkdefTransforms a function definition to a lambda definition
val lambda_def_of_func_def_ : Ast.perkdef -> Ast.perkdefval discard_type_aq : Ast.perktype -> Ast.perktype_partialDiscards attributes and qualifiers of a type.
val lambda_of_func : Ast.perkfundef -> Ast.expr_tTranforms a function definition to a lambda definition
val decl_of_deforfun :
Ast.deforfun_a ->
Ast.perktype_attribute list * Ast.perkdeclTransform a variable or function definition to a declaration.
val decl_of_declorfun : Ast.declorfun_a -> Ast.perkdeclTransform a variable or function declaration to a declaration.
val funtype_of_perkfundef : Ast.perkfundef -> Ast.perktypeGiven a function definition, returns its function type.
val get_member_functions : Ast.deforfun_a list -> Ast.perkident listGiven a list of annotated variable or function definitions, returns the identifiers of the defined functions
val add_attrs_to_deforfun :
Ast.perktype_attribute list ->
Ast.deforfun_a ->
Ast.deforfun_a