You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the Gospel type-checker on a file foo.mli containing:
(*@ open Sequence *)(*@ function f (s : 'a sequence) : integer = length empty empty *)
will display the following error message:
$ deq gospel check foo.mli
File "foo.mli", line 3, characters 45-51:
3 | (*@ functionf (s :'a sequence) : integer = length empty empty *) ^^^^^^Error: This term has type integer but a term was expected of type'a657 sequence ->'a658.
In contrast, running ocamlc on the corresponding foo.ml file containing:
letfx=List.length x x
will display the more informative messages:
λ ocamlc foo.ml
File "foo.ml", line 1, characters 10-25:
1 |let f x = List.length x x
^^^^^^^^^^^^^^^
Error: The functionList.length has type'a list -> int It is applied to too many argumentsFile "foo.ml", line 1, characters 24-25:1 | let f x = List.length x x ^ This extra argument is not expected.
The text was updated successfully, but these errors were encountered:
Running the Gospel type-checker on a file
foo.mli
containing:will display the following error message:
In contrast, running
ocamlc
on the correspondingfoo.ml
file containing:will display the more informative messages:
The text was updated successfully, but these errors were encountered: