synth_variable Some case
This commit is contained in:
parent
4492c9b3ea
commit
f44b7a585e
1 changed files with 6 additions and 1 deletions
|
@ -106,7 +106,12 @@ and synth_variable
|
|||
in
|
||||
match tlist with
|
||||
| None -> HopixTypes.instantiate_type_scheme ty []
|
||||
| Some _ -> failwith "Students! This is your job! (synth_variable | tlist | Some)"
|
||||
| Some tlist' ->
|
||||
(* Pas testé *)
|
||||
let atlist = List.map (fun t -> HopixTypes.internalize_ty tenv t) tlist' in
|
||||
(try HopixTypes.instantiate_type_scheme ty atlist with
|
||||
| HopixTypes.InvalidInstantiation { expected; given } ->
|
||||
invalid_instantiation id.position expected given)
|
||||
|
||||
and synth_tagged
|
||||
: HopixTypes.typing_environment -> constructor Position.located
|
||||
|
|
Reference in a new issue