40/111 ???
This commit is contained in:
parent
c41d137715
commit
3237406430
1 changed files with 6 additions and 2 deletions
|
@ -41,7 +41,9 @@ let check_type_scheme
|
|||
-> HopixTypes.aty_scheme * HopixTypes.typing_environment
|
||||
=
|
||||
fun env pos (ForallTy (ts, ty)) ->
|
||||
failwith "Students! This is your job! (check_type_scheme)"
|
||||
let ts = List.map Position.value ts in
|
||||
let env = HopixTypes.bind_type_variables pos env ts in
|
||||
(HopixTypes.Scheme (ts, HopixTypes.internalize_ty env ty), env)
|
||||
;;
|
||||
|
||||
let synth_literal : HopixAST.literal -> HopixTypes.aty =
|
||||
|
@ -212,7 +214,9 @@ and check_value_definition
|
|||
(match ty with
|
||||
| None -> failwith "Type missing."
|
||||
| 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
|
||||
HopixTypes.bind_value (Position.value id) tys env)
|
||||
| RecFunctions _ ->
|
||||
(* Je crois que c'est galère et donc c'est pas grave si on arrive pas
|
||||
à faire les fonctions récursives *)
|
||||
|
|
Reference in a new issue