Skip to content

Output for object types is completely unstructured #668

New issue

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

Closed
impossiblynew opened this issue May 4, 2021 · 1 comment
Closed

Output for object types is completely unstructured #668

impossiblynew opened this issue May 4, 2021 · 1 comment

Comments

@impossiblynew
Copy link

The output for object types is completely unstructured. This is mostly fine for simple object types, but for larger ones it sometimes ends up looking worse than the format of the original interface!
For example:

type t = <
  method1 : string; (** does x *)
  method2 : int -> unit; (** does y *)
  method3 : string -> int list;
  method4 : int -> int -> int -> string;
  method5 : string -> string -> string;
  >

becomes
image

Furthermore, it is impossible to add documentation comments to the methods of an object type directly. This is really unfortunate for modules that hide their classes in their interface and instead expose the object type and functions for constructing the object, especially considering #525.

@jonludlam
Copy link
Member

We have the same problem for all large types - they're not formatted well at all right now. This is being tracked here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants