Module Shared_ast.Program

Transformations

val map_exprs : f:( 'expr1 -> 'expr2 Shared_ast__Definitions.boxed ) -> varf:( 'expr1 Var.t -> 'expr2 Var.t ) -> 'expr1 Shared_ast__Definitions.program -> 'expr2 Shared_ast__Definitions.program Bindlib.box
val fold_left_exprs : f:( 'a -> 'expr Shared_ast__Definitions.code_item -> 'a ) -> init:'a -> 'expr Shared_ast__Definitions.program -> 'a
val fold_right_exprs : f:( 'expr Shared_ast__Definitions.code_item -> 'a -> 'a ) -> init:'a -> 'expr Shared_ast__Definitions.program -> 'a
val get_scope_body : ( ( _ Shared_ast__Definitions.any, _ Shared_ast__Definitions.any, 't ) Shared_ast__Definitions.base_gexpr, 't Shared_ast__Definitions.mark ) Catala_utils.Mark.ed as 'e Shared_ast__Definitions.program -> Shared_ast__Definitions.ScopeName.t -> 'e Shared_ast__Definitions.scope_body
val untype : ( ( 'a Shared_ast__Definitions.any, 'a Shared_ast__Definitions.any, _ ) Shared_ast__Definitions.base_gexpr, _ Shared_ast__Definitions.mark ) Catala_utils.Mark.ed Shared_ast__Definitions.program -> ( ( 'a, 'a, Shared_ast__Definitions.untyped ) Shared_ast__Definitions.base_gexpr, Shared_ast__Definitions.untyped Shared_ast__Definitions.mark ) Catala_utils.Mark.ed Shared_ast__Definitions.program
val to_expr : ( ( _ Shared_ast__Definitions.any, _ Shared_ast__Definitions.any, _ ) Shared_ast__Definitions.base_gexpr, _ Shared_ast__Definitions.mark ) Catala_utils.Mark.ed as 'e Shared_ast__Definitions.program -> Shared_ast__Definitions.ScopeName.t -> 'e Shared_ast__Definitions.boxed

Usage: build_whole_program_expr program main_scope builds an expression corresponding to the main program and returning the main scope as a function.

val equal : ( ( 'a Shared_ast__Definitions.any, 'a Shared_ast__Definitions.any, _ ) Shared_ast__Definitions.base_gexpr, _ Shared_ast__Definitions.mark ) Catala_utils.Mark.ed as 'e Shared_ast__Definitions.program -> ( ( 'a Shared_ast__Definitions.any, 'a Shared_ast__Definitions.any, _ ) Shared_ast__Definitions.base_gexpr, _ Shared_ast__Definitions.mark ) Catala_utils.Mark.ed as 'e Shared_ast__Definitions.program -> bool