From 9d077bcbc1687e99fb782f72181ec4f5d85a7d42 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 5 Dec 2023 04:10:33 +0100 Subject: [PATCH] synth_read --- 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 c07e501..6cd68ff 100644 --- a/flap/src/hopix/hopixTypechecker.ml +++ b/flap/src/hopix/hopixTypechecker.ml @@ -202,7 +202,9 @@ and synth_assign and synth_read : HopixTypes.typing_environment -> expression Position.located -> HopixTypes.aty = - fun tenv ref -> failwith "Students! This is your job! (synth_read)" + fun tenv ref -> + let refty = synth_expression tenv ref in + HopixTypes.destruct_reference_type ref.position refty and synth_case : HopixTypes.typing_environment -> expression Position.located