Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Long module types and types need better line breaks #565

Closed
lpw25 opened this issue Jan 21, 2021 · 1 comment
Closed

Long module types and types need better line breaks #565

lpw25 opened this issue Jan 21, 2021 · 1 comment

Comments

@lpw25
Copy link
Contributor

lpw25 commented Jan 21, 2021

The line wrapping for long types and module types makes them very hard to read. Even types that aren't that large (e.g. here and here) are much harder to parse in the docs than they are in their sources.

@Julow
Copy link
Collaborator

Julow commented Jan 5, 2022

This is fixed with #782, which works for every type expressions:

val binary_search : 
  ?pos:int ->
  ?len:int ->
  'a t ->
  compare:( 'a -> 'key -> int ) ->
  [ `Last_strictly_less_than
  | `Last_less_than_or_equal_to
  | `Last_equal_to
  | `First_equal_to
  | `First_greater_than_or_equal_to
  | `First_strictly_greater_than ] ->
  'key ->
  int option

type ('a, 'key) f =
  ?pos:int ->
  ?len:int ->
  'a t ->
  compare:( 'a -> 'key -> int ) ->
  [ `Last_strictly_less_than
  | `Last_less_than_or_equal_to
  | `Last_equal_to
  | `First_equal_to
  | `First_greater_than_or_equal_to
  | `First_strictly_greater_than ] ->
  'key ->
  int option

type u =
  < foo : [ `foo | `bar | `baz ]
  ; bar : [ `foo | `bar | `baz ]
  ; baz : [ `foo | `bar | `baz ] >

The next step is to improve the rendering in the HTML backend of type declarations with comments in them: #614, #673

@Julow Julow closed this as completed Jan 5, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants