We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This issue is a partial response to #482. A recursive function f of type t is annotated as
f
t
let rec f x : t = ...
which makes it look as if f x has type t. The easiest fix here so to instead have
f x
let rec (f : t) x = ...
This is what should be implemented instead of the current solutions.
In case t is of the form t1 -> t2 we could write let rec f (x : t1) : t2 = ..., but not when t is of the form mlforall a , ....
t1 -> t2
let rec f (x : t1) : t2 = ...
mlforall a , ...
OCaml allows let rec f : t = fun x -> ... but that relies on examining the syntactic form of the right-hand side, which we prefer to avoid.
let rec f : t = fun x -> ...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This issue is a partial response to #482. A recursive function
f
of typet
is annotated aswhich makes it look as if
f x
has typet
. The easiest fix here so to instead haveThis is what should be implemented instead of the current solutions.
Alrernatives
In case
t
is of the formt1 -> t2
we could writelet rec f (x : t1) : t2 = ...
, but not whent
is of the formmlforall a , ...
.OCaml allows
let rec f : t = fun x -> ...
but that relies on examining the syntactic form of the right-hand side, which we prefer to avoid.The text was updated successfully, but these errors were encountered: