Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007693OCamlocamldocpublic2017-12-20 20:512018-06-05 16:49
Reporterygrek 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version4.05.0 
Target VersionFixed in Version 
Summary0007693: ocamldoc: loses parameter descriptions without even warning
DescriptionIt seems that `@param id` only works for named arguments, this is not mentioned in the manual afaics. It means when function has unnamed arguments then @param declarations are just ignored, also if named parameter doesn't match @param name the latter is ignored too. I would expect at least a warning when @param is ignored and I would better suggest to never drop user-supplied documentation even if it seems wrong to ocamldoc.
Steps To Reproduce$ cat a.ml

(** @param x argument to increment*)
let unnamed x = x + 1

(** @param x argument to increment *)
let named ~x = x + 1

(** @param x argument to increment *)
let misnamed ~y = y + 1

module type X = sig

(** [f1 x]
  @param x argument to increment
  @return result
*)
val f1 : int -> int

(** [f2 ~x]
  @param x argument to increment
  @return result
*)
val f2 : x:int -> int

(** [f3 ~x]
  @param x argument to increment
  @return result
*)
val f3 : y:int -> int

end

$ ocamldoc a.ml -html
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2017-12-20 20:51 ygrek New Issue
2018-06-05 16:49 doligez Status new => acknowledged


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker