Commit 523431f1 authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Update the client.

parent 33c0e852
......@@ -289,6 +289,7 @@ let rec hastype (t : ML.term) (w : variable) : F.nominal_term co
(* The top-level wrapper uses [let0]. It does not require an expected
type; it creates its own using [exist]. And it runs the solver. *)
type range = Solver.range
exception Unbound = Solver.Unbound
exception Unify = Solver.Unify
exception Cycle = Solver.Cycle
......
exception Unbound of string
exception Unify of F.nominal_type * F.nominal_type
exception Cycle of F.nominal_type
type range = Lexing.position * Lexing.position
exception Unbound of range * string
exception Unify of range * F.nominal_type * F.nominal_type
exception Cycle of range * F.nominal_type
val translate: ML.term -> F.nominal_term
......@@ -13,13 +13,13 @@ let translate t =
try
Some (Infer.translate t)
with
| Infer.Cycle ty ->
| Infer.Cycle (_range, ty) ->
if Config.verbose then begin
Printf.fprintf stdout "Type error: a cyclic type arose.\n";
print_type ty
end;
None
| Infer.Unify (ty1, ty2) ->
| Infer.Unify (_range, ty1, ty2) ->
if Config.verbose then begin
Printf.fprintf stdout "Type error: type mismatch.\n";
Printf.fprintf stdout "Type error: mismatch between the type:\n";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment