Merge branch 'jalon3' of gaufre.informatique.univ-paris-diderot.fr:Anri/compilation-m1-2023 into jalon3

This commit is contained in:
Nicolas PENELOUX 2023-12-04 18:56:35 +01:00
commit 581185838d

View file

@ -158,6 +158,7 @@ and synth_sequence
: HopixTypes.typing_environment -> expression Position.located list -> HopixTypes.aty : HopixTypes.typing_environment -> expression Position.located list -> HopixTypes.aty
= =
fun tenv elist -> fun tenv elist ->
<<<<<<< HEAD
match elist with match elist with
| [] -> failwith "erreur sequence" | [] -> failwith "erreur sequence"
| [x] -> synth_expression tenv x | [x] -> synth_expression tenv x
@ -167,6 +168,15 @@ and synth_sequence
check_equal_types x.position HopixTypes.hunit x_type check_equal_types x.position HopixTypes.hunit x_type
; synth_sequence tenv l) ; 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;
synth_sequence tenv l
>>>>>>> a4910af26df56be5421c82c370bfcb6cdafae1fd
and synth_define and synth_define
: HopixTypes.typing_environment -> value_definition -> expression Position.located : HopixTypes.typing_environment -> value_definition -> expression Position.located