typo
This commit is contained in:
parent
581185838d
commit
ee1baae420
1 changed files with 5 additions and 17 deletions
|
@ -115,10 +115,10 @@ and synth_apply
|
||||||
(*failwith "Students! This is your job! (synth_apply)"*)
|
(*failwith "Students! This is your job! (synth_apply)"*)
|
||||||
let f_type = synth_expression tenv f in
|
let f_type = synth_expression tenv f in
|
||||||
match f_type with
|
match f_type with
|
||||||
| HopixTypes.ATyArrow (gauche, droit) ->
|
| HopixTypes.ATyArrow (expected, droit) ->
|
||||||
(* a' -> b' *)
|
(* a' -> b' *)
|
||||||
let x_type = synth_expression tenv x in
|
let given = synth_expression tenv x in
|
||||||
check_equal_types x.position gauche x_type;
|
check_equal_types x.position ~expected ~given;
|
||||||
droit
|
droit
|
||||||
| _ -> failwith ""
|
| _ -> failwith ""
|
||||||
|
|
||||||
|
@ -158,25 +158,13 @@ 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
|
|
||||||
| [] -> 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
|
match elist with
|
||||||
| [] -> failwith "erreur sequence"
|
| [] -> failwith "erreur sequence"
|
||||||
| [ x ] -> synth_expression tenv x
|
| [ x ] -> synth_expression tenv x
|
||||||
| x :: l ->
|
| x :: l ->
|
||||||
let x_type = synth_expression tenv x in
|
let given = synth_expression tenv x in
|
||||||
check_equal_types x.position HopixTypes.hunit x_type;
|
check_equal_types x.position ~expected:HopixTypes.hunit ~given;
|
||||||
synth_sequence tenv l
|
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
|
||||||
|
|
Reference in a new issue