.
This commit is contained in:
parent
756ede6179
commit
ab4f675239
1 changed files with 5 additions and 5 deletions
|
@ -128,7 +128,7 @@ and synth_tagged
|
|||
(fun x -> HopixTypes.internalize_ty tenv x)
|
||||
(match tlist with
|
||||
| Some t -> t
|
||||
| None -> HopixTypes.type_error cons.position "No types found")
|
||||
| None -> HopixTypes.type_error cons.position "No types found.")
|
||||
in
|
||||
let tcons =
|
||||
try HopixTypes.instantiate_type_scheme cons_scheme tys with
|
||||
|
@ -165,7 +165,7 @@ and synth_apply
|
|||
let given = synth_expression tenv x in
|
||||
check_equal_types x.position ~expected ~given;
|
||||
droit
|
||||
| _ -> HopixTypes.type_error f.position "Can't apply"
|
||||
| _ -> HopixTypes.type_error f.position "Can't apply."
|
||||
|
||||
and synth_record
|
||||
: HopixTypes.typing_environment
|
||||
|
@ -181,7 +181,7 @@ and synth_record
|
|||
let tlist' =
|
||||
match tlist with
|
||||
| Some tlist -> List.map (fun t -> HopixTypes.internalize_ty tenv t) tlist
|
||||
| None -> HopixTypes.type_error fl.position "No types found"
|
||||
| None -> HopixTypes.type_error fl.position "No types found."
|
||||
in
|
||||
(* Type checking *)
|
||||
List.iter
|
||||
|
@ -234,7 +234,7 @@ and synth_sequence
|
|||
=
|
||||
fun tenv elist ->
|
||||
match elist with
|
||||
| [] -> HopixTypes.type_error Position.dummy "Invalid sequence"
|
||||
| [] -> HopixTypes.type_error Position.dummy "Invalid sequence."
|
||||
| [ x ] -> synth_expression tenv x
|
||||
| x :: l ->
|
||||
let given = synth_expression tenv x in
|
||||
|
@ -339,7 +339,7 @@ and check_value_definition
|
|||
fun env -> function
|
||||
| SimpleValue (id, ty, ex) ->
|
||||
(match ty with
|
||||
| None -> HopixTypes.type_error ex.position "Type is missing"
|
||||
| None -> HopixTypes.type_error ex.position "Type is missing."
|
||||
| Some ty' ->
|
||||
let tys, tenv = Position.located_pos (check_type_scheme env) ty' in
|
||||
check_expression tenv ex (HopixTypes.instantiate_type_scheme tys []);
|
||||
|
|
Reference in a new issue