From a4ea0f62d285d045a8557aac6c016dba591c226c Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 4 Dec 2023 23:50:29 +0100 Subject: [PATCH] synth_define --- flap/src/hopix/hopixTypechecker.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flap/src/hopix/hopixTypechecker.ml b/flap/src/hopix/hopixTypechecker.ml index 5abe051..bf4ccde 100644 --- a/flap/src/hopix/hopixTypechecker.ml +++ b/flap/src/hopix/hopixTypechecker.ml @@ -177,7 +177,9 @@ and synth_define : HopixTypes.typing_environment -> value_definition -> expression Position.located -> HopixTypes.aty = - fun tenv vdef expr -> failwith "Students! This is your job! (synth_define)" + fun tenv vdef expr -> + let tenv = check_value_definition tenv vdef in + synth_expression tenv expr and synth_ref : HopixTypes.typing_environment -> expression Position.located -> HopixTypes.aty