package catala

  1. Overview
  2. Docs

Reference interpreter for the default calculus

module Pos = Utils.Pos
module Errors = Utils.Errors
module Cli = Utils.Cli
module A = Ast

Helpers

val is_empty_error : A.expr Pos.marked -> bool
val empty_thunked_term : Ast.expr Pos.marked

Evaluation

val evaluate_operator : A.operator Pos.marked -> A.expr Pos.marked list -> A.expr Pos.marked
val evaluate_expr : A.expr Pos.marked -> A.expr Pos.marked

API

val interpret_program : Ast.expr Pos.marked -> (Ast.Var.t * Ast.expr Pos.marked) list

Interpret a program. This function expects an expression typed as a function whose argument are all thunked. The function is executed by providing for each argument a thunked empty default.

OCaml

Innovation. Community. Security.