This issue is a partial response to #482. A recursive function f of type t is annotated as
which makes it look as if f x has type t. The easiest fix here so to instead have
This is what should be implemented instead of the current solutions.
Alrernatives
-
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 , ....
-
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.
This issue is a partial response to #482. A recursive function
fof typetis annotated aswhich makes it look as if
f xhas typet. The easiest fix here so to instead haveThis is what should be implemented instead of the current solutions.
Alrernatives
In case
tis of the formt1 -> t2we could writelet rec f (x : t1) : t2 = ..., but not whentis 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.