From ee1baae4202d2540e891925efb17db6a964cb476 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 4 Dec 2023 22:58:47 +0100 Subject: [PATCH] typo --- flap/src/hopix/hopixTypechecker.ml | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/flap/src/hopix/hopixTypechecker.ml b/flap/src/hopix/hopixTypechecker.ml index dc25c7a..2dc3989 100644 --- a/flap/src/hopix/hopixTypechecker.ml +++ b/flap/src/hopix/hopixTypechecker.ml @@ -115,10 +115,10 @@ and synth_apply (*failwith "Students! This is your job! (synth_apply)"*) let f_type = synth_expression tenv f in match f_type with - | HopixTypes.ATyArrow (gauche, droit) -> + | HopixTypes.ATyArrow (expected, droit) -> (* a' -> b' *) - let x_type = synth_expression tenv x in - check_equal_types x.position gauche x_type; + let given = synth_expression tenv x in + check_equal_types x.position ~expected ~given; droit | _ -> failwith "" @@ -158,25 +158,13 @@ and synth_sequence : HopixTypes.typing_environment -> expression Position.located list -> HopixTypes.aty = fun tenv elist -> -<<<<<<< HEAD - match elist with - | [] -> failwith "erreur sequence" - | [x] -> synth_expression tenv x - | x::l -> - ( - let x_type = synth_expression tenv x in - check_equal_types x.position HopixTypes.hunit x_type - ; synth_sequence tenv l) - -======= match elist with | [] -> failwith "erreur sequence" | [ x ] -> synth_expression tenv x | x :: l -> - let x_type = synth_expression tenv x in - check_equal_types x.position HopixTypes.hunit x_type; + let given = synth_expression tenv x in + check_equal_types x.position ~expected:HopixTypes.hunit ~given; synth_sequence tenv l ->>>>>>> a4910af26df56be5421c82c370bfcb6cdafae1fd and synth_define : HopixTypes.typing_environment -> value_definition -> expression Position.located