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
It would be nice to attach an odoc comment to a function parameter rather than having to mention each parameter in the comment for the whole function. Something like:
(** Do the special thing. *)valdo_it :
(** What does the thing *)t ->
(** What the thing is done to *)target:t->
(** The special sauce to use *)sauce:Sauce.t->
unit
(There's already a wrinkle in that putting the arrows at the starts of lines would would probably cause the comments to attach to different parameters.)
The text was updated successfully, but these errors were encountered:
I had thought that the compiler already collected these, but looking at the parser it seems not. I think that the attachment rules consistent with the existing ones would have it as:
(** Do the special thing. *)valdo_it :
t -> (** What does the thing *)target:t-> (** What the thing is done to *)sauce:Sauce.t-> (** The special sauce to use *)unit
and also including support for:
(** Do the special thing. *)valdo_it :
t(** What does the thing *)
-> target:t(** What the thing is done to *)
-> sauce:Sauce.t(** The special sauce to use *)
-> unit
similar to how it's done for ; in records and object types.
The attachment rules are indeed "incomplete": they are only there for labelled/optional parameters.
But for those they are already there, and it would be nice if odoc propagated them already.
It would be nice to attach an odoc comment to a function parameter rather than having to mention each parameter in the comment for the whole function. Something like:
(There's already a wrinkle in that putting the arrows at the starts of lines would would probably cause the comments to attach to different parameters.)
The text was updated successfully, but these errors were encountered: