diff --git a/flap/src/hopix/hopixTypechecker.ml b/flap/src/hopix/hopixTypechecker.ml index debc113..9b5e0e5 100644 --- a/flap/src/hopix/hopixTypechecker.ml +++ b/flap/src/hopix/hopixTypechecker.ml @@ -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