oops
This commit is contained in:
parent
d2db0dfc4f
commit
b37962dee2
1 changed files with 8 additions and 8 deletions
|
@ -219,11 +219,11 @@ and synth_ifthenelse
|
||||||
fun tenv ecase eif eelse ->
|
fun tenv ecase eif eelse ->
|
||||||
(* Pas testé !! *)
|
(* Pas testé !! *)
|
||||||
let ecasety = synth_expression tenv ecase in
|
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
|
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
|
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
|
HopixTypes.hunit
|
||||||
|
|
||||||
and synth_while
|
and synth_while
|
||||||
|
@ -232,9 +232,9 @@ and synth_while
|
||||||
=
|
=
|
||||||
fun tenv ecase c ->
|
fun tenv ecase c ->
|
||||||
let ecasety = synth_expression tenv ecase in
|
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
|
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
|
HopixTypes.hunit
|
||||||
|
|
||||||
and synth_for
|
and synth_for
|
||||||
|
@ -244,9 +244,9 @@ and synth_for
|
||||||
=
|
=
|
||||||
fun tenv id estart eend expr ->
|
fun tenv id estart eend expr ->
|
||||||
let estart_ty = synth_expression tenv estart in
|
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
|
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' =
|
let tenv' =
|
||||||
HopixTypes.bind_value
|
HopixTypes.bind_value
|
||||||
id.value
|
id.value
|
||||||
|
@ -254,7 +254,7 @@ and synth_for
|
||||||
tenv
|
tenv
|
||||||
in
|
in
|
||||||
let e_ty = synth_expression tenv' expr 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
|
HopixTypes.hunit
|
||||||
|
|
||||||
and check_expression
|
and check_expression
|
||||||
|
|
Reference in a new issue