open Factotum_common type t = | Literal of Value.any | Variable of variable | Sequence of t list | Scope of { mode: scope_mode; bindings: (Binding.t * t) list; body: t list } | Lambda of { params: Binding.t list; body: t list } | Apply of { procedure: t; arguments: t list } | Prompt of { prompt: t; handler: t ; body: t list } | Cond of { tests: (t * t) list; otherwise: t } | Match of { discriminant: t ; patterns: (pattern * t) list; otherwise: t } and variable = | VarBound of Binding.t | VarFree of Symbol.t and pattern = | PatWildcard | PatLiteral of Value.canonical Value.t | PatCapture of Binding.t | PatCons of pattern * pattern_cdr | PatAnd of pattern * pattern | PatOr of pattern * pattern | PatNot of pattern and pattern_cdr = | PatCdrNil | PatCdrRest of Binding.t | PatCdrCons of pattern * pattern_cdr and scope_mode = | ScopeSequential | ScopeParallel | ScopeRecursive