fmt
This commit is contained in:
parent
3237406430
commit
a01eba04e3
1 changed files with 4 additions and 4 deletions
|
@ -41,9 +41,9 @@ let check_type_scheme
|
||||||
-> HopixTypes.aty_scheme * HopixTypes.typing_environment
|
-> HopixTypes.aty_scheme * HopixTypes.typing_environment
|
||||||
=
|
=
|
||||||
fun env pos (ForallTy (ts, ty)) ->
|
fun env pos (ForallTy (ts, ty)) ->
|
||||||
let ts = List.map Position.value ts in
|
let ts = List.map Position.value ts in
|
||||||
let env = HopixTypes.bind_type_variables pos env ts in
|
let env = HopixTypes.bind_type_variables pos env ts in
|
||||||
(HopixTypes.Scheme (ts, HopixTypes.internalize_ty env ty), env)
|
HopixTypes.Scheme (ts, HopixTypes.internalize_ty env ty), env
|
||||||
;;
|
;;
|
||||||
|
|
||||||
let synth_literal : HopixAST.literal -> HopixTypes.aty =
|
let synth_literal : HopixAST.literal -> HopixTypes.aty =
|
||||||
|
@ -215,7 +215,7 @@ and check_value_definition
|
||||||
| None -> failwith "Type missing."
|
| None -> failwith "Type missing."
|
||||||
| Some ty' ->
|
| Some ty' ->
|
||||||
(*failwith "Students! This is your job! (check_value_definition | SimpleValue)"*)
|
(*failwith "Students! This is your job! (check_value_definition | SimpleValue)"*)
|
||||||
let tys,_ = Position.located_pos (check_type_scheme env) ty' in
|
let tys, _ = Position.located_pos (check_type_scheme env) ty' in
|
||||||
HopixTypes.bind_value (Position.value id) tys env)
|
HopixTypes.bind_value (Position.value id) tys env)
|
||||||
| RecFunctions _ ->
|
| RecFunctions _ ->
|
||||||
(* Je crois que c'est galère et donc c'est pas grave si on arrive pas
|
(* Je crois que c'est galère et donc c'est pas grave si on arrive pas
|
||||||
|
|
Reference in a new issue