From e091ae9860bf50fd8915e5534429815aea61201b Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 21 Nov 2023 17:17:43 +0100 Subject: [PATCH 1/2] =?UTF-8?q?coup=C3=A9=20en=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flap/src/hopix/hopixTypechecker.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flap/src/hopix/hopixTypechecker.ml b/flap/src/hopix/hopixTypechecker.ml index 31b7489..4d53376 100644 --- a/flap/src/hopix/hopixTypechecker.ml +++ b/flap/src/hopix/hopixTypechecker.ml @@ -81,7 +81,11 @@ and check_value_definition : HopixTypes.typing_environment -> HopixAST.value_definition -> HopixTypes.typing_environment = - fun env def -> failwith "Students! This is your job! (check_value_definition)" + fun env -> function + | SimpleValue _ -> + failwith "Students! This is your job! (check_value_definition | SimpleValue)" + | RecFunctions _ -> + failwith "Students! This is your job! (check_value_definition | RecFunctions)" ;; let check_definition env = function From acd881c0dd51529a11929a7e8abb27d101b9297f Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 21 Nov 2023 17:33:12 +0100 Subject: [PATCH 2/2] mm --- flap/src/hopix/hopixTypechecker.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flap/src/hopix/hopixTypechecker.ml b/flap/src/hopix/hopixTypechecker.ml index 4d53376..e3b5f71 100644 --- a/flap/src/hopix/hopixTypechecker.ml +++ b/flap/src/hopix/hopixTypechecker.ml @@ -82,10 +82,13 @@ and check_value_definition -> HopixTypes.typing_environment = fun env -> function - | SimpleValue _ -> + | SimpleValue (id, Some ty, ex) -> failwith "Students! This is your job! (check_value_definition | SimpleValue)" | RecFunctions _ -> + (* Je crois que c'est galère et donc c'est pas grave si on arrive pas + à faire les fonctions récursives *) failwith "Students! This is your job! (check_value_definition | RecFunctions)" + | _ -> failwith "Students! This is your job!" ;; let check_definition env = function