From 28f303ee5130c11705d0c22e30e3f3ed01869e74 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 5 Dec 2023 00:06:30 +0100 Subject: [PATCH] failwith --- flap/src/hopix/hopixTypechecker.ml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/flap/src/hopix/hopixTypechecker.ml b/flap/src/hopix/hopixTypechecker.ml index bf4ccde..6d64811 100644 --- a/flap/src/hopix/hopixTypechecker.ml +++ b/flap/src/hopix/hopixTypechecker.ml @@ -106,7 +106,7 @@ and synth_variable in match tlist with | None -> HopixTypes.instantiate_type_scheme ty [] - | Some _ -> failwith "Students! This is your job! (synth_variable tlist not None)" + | Some _ -> failwith "Students! This is your job! (synth_variable | tlist | None)" and synth_tagged : HopixTypes.typing_environment -> constructor Position.located @@ -119,7 +119,6 @@ and synth_apply -> expression Position.located -> HopixTypes.aty = fun tenv f x -> - (*failwith "Students! This is your job! (synth_apply)"*) let f_type = synth_expression tenv f in match f_type with | HopixTypes.ATyArrow (expected, droit) -> @@ -228,7 +227,7 @@ and check_expression = fun env (Position.{ value = e; position = pos } as exp) expected -> match e with - | Fun df -> failwith "Students! This is your job! Fun check" + | Fun df -> failwith "Students! This is your job! (check_expression | Fun)" | _ -> let given = synth_expression env exp in check_equal_types pos ~expected ~given @@ -242,7 +241,6 @@ and check_value_definition (match ty with | None -> failwith "A type is missing." | Some ty' -> - (*failwith "Students! This is your job! (check_value_definition | SimpleValue)"*) let tys, tenv = Position.located_pos (check_type_scheme env) ty' in check_expression tenv ex (HopixTypes.instantiate_type_scheme tys []); HopixTypes.bind_value (Position.value id) tys env)