failwith
This commit is contained in:
parent
a4ea0f62d2
commit
28f303ee51
1 changed files with 2 additions and 4 deletions
|
@ -106,7 +106,7 @@ and synth_variable
|
||||||
in
|
in
|
||||||
match tlist with
|
match tlist with
|
||||||
| None -> HopixTypes.instantiate_type_scheme ty []
|
| None -> HopixTypes.instantiate_type_scheme ty []
|
||||||
| Some _ -> failwith "Students! This is your job! (synth_variable tlist not None)"
|
| Some _ -> failwith "Students! This is your job! (synth_variable | tlist | None)"
|
||||||
|
|
||||||
and synth_tagged
|
and synth_tagged
|
||||||
: HopixTypes.typing_environment -> constructor Position.located
|
: HopixTypes.typing_environment -> constructor Position.located
|
||||||
|
@ -119,7 +119,6 @@ and synth_apply
|
||||||
-> expression Position.located -> HopixTypes.aty
|
-> expression Position.located -> HopixTypes.aty
|
||||||
=
|
=
|
||||||
fun tenv f x ->
|
fun tenv f x ->
|
||||||
(*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 (expected, droit) ->
|
| HopixTypes.ATyArrow (expected, droit) ->
|
||||||
|
@ -228,7 +227,7 @@ and check_expression
|
||||||
=
|
=
|
||||||
fun env (Position.{ value = e; position = pos } as exp) expected ->
|
fun env (Position.{ value = e; position = pos } as exp) expected ->
|
||||||
match e with
|
match e with
|
||||||
| Fun df -> failwith "Students! This is your job! Fun check"
|
| Fun df -> failwith "Students! This is your job! (check_expression | Fun)"
|
||||||
| _ ->
|
| _ ->
|
||||||
let given = synth_expression env exp in
|
let given = synth_expression env exp in
|
||||||
check_equal_types pos ~expected ~given
|
check_equal_types pos ~expected ~given
|
||||||
|
@ -242,7 +241,6 @@ and check_value_definition
|
||||||
(match ty with
|
(match ty with
|
||||||
| None -> failwith "A type is missing."
|
| None -> failwith "A type is missing."
|
||||||
| Some ty' ->
|
| Some ty' ->
|
||||||
(*failwith "Students! This is your job! (check_value_definition | SimpleValue)"*)
|
|
||||||
let tys, tenv = Position.located_pos (check_type_scheme env) ty' in
|
let tys, tenv = Position.located_pos (check_type_scheme env) ty' in
|
||||||
check_expression tenv ex (HopixTypes.instantiate_type_scheme tys []);
|
check_expression tenv ex (HopixTypes.instantiate_type_scheme tys []);
|
||||||
HopixTypes.bind_value (Position.value id) tys env)
|
HopixTypes.bind_value (Position.value id) tys env)
|
||||||
|
|
Reference in a new issue