From b37962dee2ad980ec38acc8bbb7871cf06fd6a1b Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 5 Dec 2023 11:38:31 +0100 Subject: [PATCH] oops --- flap/src/hopix/hopixTypechecker.ml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/flap/src/hopix/hopixTypechecker.ml b/flap/src/hopix/hopixTypechecker.ml index b2c399c..d4cd9d9 100644 --- a/flap/src/hopix/hopixTypechecker.ml +++ b/flap/src/hopix/hopixTypechecker.ml @@ -219,11 +219,11 @@ and synth_ifthenelse fun tenv ecase eif eelse -> (* Pas testé !! *) let ecasety = synth_expression tenv ecase in - check_equal_types ecase.position ~expected:ecasety ~given:HopixTypes.hbool; + check_equal_types ecase.position ~expected:HopixTypes.hbool ~given:ecasety; let eifty = synth_expression tenv eif in - check_equal_types eif.position ~expected:eifty ~given:HopixTypes.hunit; + check_equal_types eif.position ~expected:HopixTypes.hunit ~given:eifty; let eelsety = synth_expression tenv eelse in - check_equal_types eelse.position ~expected:eelsety ~given:HopixTypes.hunit; + check_equal_types eelse.position ~expected:HopixTypes.hunit ~given:eelsety; HopixTypes.hunit and synth_while @@ -232,9 +232,9 @@ and synth_while = fun tenv ecase c -> let ecasety = synth_expression tenv ecase in - check_equal_types ecase.position ~expected:ecasety ~given:HopixTypes.hbool; + check_equal_types ecase.position ~expected:HopixTypes.hbool ~given:ecasety; let exprty = synth_expression tenv c in - check_equal_types c.position ~expected:exprty ~given:HopixTypes.hunit; + check_equal_types c.position ~expected:HopixTypes.hunit ~given:exprty; HopixTypes.hunit and synth_for @@ -244,9 +244,9 @@ and synth_for = fun tenv id estart eend expr -> let estart_ty = synth_expression tenv estart in - check_equal_types estart.position ~expected:estart_ty ~given:HopixTypes.hint; + check_equal_types estart.position ~expected:HopixTypes.hint ~given:estart_ty; let eend_ty = synth_expression tenv eend in - check_equal_types eend.position ~expected:eend_ty ~given:HopixTypes.hint; + check_equal_types eend.position ~expected:HopixTypes.hint ~given:eend_ty; let tenv' = HopixTypes.bind_value id.value @@ -254,7 +254,7 @@ and synth_for tenv in let e_ty = synth_expression tenv' expr in - check_equal_types expr.position ~expected:e_ty ~given:HopixTypes.hunit; + check_equal_types expr.position ~expected:HopixTypes.hunit ~given:e_ty; HopixTypes.hunit and check_expression