package catala

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Program declaration context helpers

val empty_ctx : Shared_ast__.Definitions.decl_ctx

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

Warning / todo: only compares program scopes at the moment

OCaml

Innovation. Community. Security.