Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
POTTIER Francois
inferno
Commits
523431f1
Commit
523431f1
authored
Nov 04, 2020
by
POTTIER Francois
Browse files
Update the client.
parent
33c0e852
Changes
3
Hide whitespace changes
Inline
Side-by-side
client/Infer.ml
View file @
523431f1
...
...
@@ -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
...
...
client/Infer.mli
View file @
523431f1
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
client/test/CheckML.ml
View file @
523431f1
...
...
@@ -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
"
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment