From da6e4547a85ff8dbf4847d65d809a3d2176db9fb Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 20 Nov 2023 04:54:40 +0100 Subject: [PATCH] debug --- flap/src/hopix/hopixTypechecker.ml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/flap/src/hopix/hopixTypechecker.ml b/flap/src/hopix/hopixTypechecker.ml index df5a494..31b7489 100644 --- a/flap/src/hopix/hopixTypechecker.ml +++ b/flap/src/hopix/hopixTypechecker.ml @@ -30,7 +30,8 @@ let check_equal_types pos ~expected ~given = let rec check_pattern_linearity : identifier list -> pattern Position.located -> identifier list = - fun vars Position.{ value; position } -> failwith "Students! This is your job!" + fun vars Position.{ value; position } -> + failwith "Students! This is your job! (check_pattern_linearity)" ;; (** Type-checking code *) @@ -39,11 +40,12 @@ let check_type_scheme : HopixTypes.typing_environment -> Position.t -> HopixAST.type_scheme -> HopixTypes.aty_scheme * HopixTypes.typing_environment = - fun env pos (ForallTy (ts, ty)) -> failwith "Students! This is your job!" + fun env pos (ForallTy (ts, ty)) -> + failwith "Students! This is your job! (check_type_scheme)" ;; let synth_literal : HopixAST.literal -> HopixTypes.aty = - fun l -> failwith "Students! This is your job!" + fun l -> failwith "Students! This is your job! (synth_literal)" ;; let rec check_pattern @@ -51,33 +53,35 @@ let rec check_pattern -> HopixTypes.typing_environment = fun env Position.({ value = p; position = pos } as pat) expected -> - failwith "Students! This is your job!" + failwith "Students! This is your job! (check_pattern)" and synth_pattern : HopixTypes.typing_environment -> HopixAST.pattern Position.located -> HopixTypes.aty * HopixTypes.typing_environment = - fun env Position.{ value = p; position = pos } -> failwith "Students! This is your job!" + fun env Position.{ value = p; position = pos } -> + failwith "Students! This is your job! (synth_pattern)" ;; let rec synth_expression : HopixTypes.typing_environment -> HopixAST.expression Position.located -> HopixTypes.aty = - fun env Position.{ value = e; position = pos } -> failwith "Students! This is your job!" + fun env Position.{ value = e; position = pos } -> + failwith "Students! This is your job! (synth_expression)" and check_expression : HopixTypes.typing_environment -> HopixAST.expression Position.located -> HopixTypes.aty -> unit = fun env (Position.{ value = e; position = pos } as exp) expected -> - failwith "Students! This is your job!" + failwith "Students! This is your job! (check_expression)" and check_value_definition : HopixTypes.typing_environment -> HopixAST.value_definition -> HopixTypes.typing_environment = - fun env def -> failwith "Students! This is your job!" + fun env def -> failwith "Students! This is your job! (check_value_definition)" ;; let check_definition env = function