summaryrefslogtreecommitdiff
path: root/src/Contexts.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/Contexts.ml')
-rw-r--r--src/Contexts.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Contexts.ml b/src/Contexts.ml
index afa68272..dd7ca016 100644
--- a/src/Contexts.ml
+++ b/src/Contexts.ml
@@ -46,6 +46,9 @@ let lookup_type_var (ctx : eval_ctx) (vid : TypeVarId.id) : type_var =
let ctx_lookup_var (ctx : eval_ctx) (vid : VarId.id) : var =
VarId.Map.find vid ctx.vars
+let ctx_lookup_type_def (ctx : eval_ctx) (tid : TypeDefId.id) : type_def =
+ TypeDefId.nth ctx.type_context tid
+
(** Retrieve a variable's value in an environment *)
let env_lookup_var_value (env : env) (vid : VarId.id) : typed_value =
let check_ev (ev : env_value) : typed_value option =