-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Labels
Milestone
Description
This issue is a partial response to #482. A recursive function f
of type t
is annotated as
let rec f x : t = ...
which makes it look as if f x
has type t
. The easiest fix here so to instead have
let rec (f : t) x = ...
This 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.