Skip to content
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

Functor types aren't written correctly when empty params #410

Closed
giltho opened this issue Feb 18, 2020 · 2 comments
Closed

Functor types aren't written correctly when empty params #410

giltho opened this issue Feb 18, 2020 · 2 comments
Labels
bug Something isn't working output

Comments

@giltho
Copy link
Contributor

giltho commented Feb 18, 2020

Hi !
This is a small thing but I have modules that have side-effect behaviours, and a functor to instantiate them.

module Make () = struct ... end

However, odoc doesn't seem to be handling that well for some reason :
image
It should be

module BasicIdentifier : functor () -> S_with_stringify with type t = int

Somehow the arrow disappears.
This doesn't happen if I add a dummy parameter

module BasicIdentifier : functor (Empty : sig end) -> S_with_stringify with type t = int

image

@giltho
Copy link
Contributor Author

giltho commented Feb 18, 2020

Unfortunately, I don't have time to understand the internals of odoc to fix this, but if someone has time and doesn't know how it works, my first instinct would be to look here where the behaviour of the Unit functor param is different

@jonludlam
Copy link
Member

@aantron aantron added bug Something isn't working output labels May 1, 2020
@jonludlam jonludlam added this to the Replacing ocamldoc milestone Jun 1, 2020
jonludlam added a commit to jonludlam/odoc that referenced this issue Jun 23, 2020
Was: functor () sig ... end
Now: functor () -> sig ... end

Fixes ocaml#410

Signed-off-by: Jon Ludlam <jon@recoil.org>
jonludlam added a commit to jonludlam/odoc that referenced this issue Jul 2, 2020
Was: functor () sig ... end
Now: functor () -> sig ... end

Fixes ocaml#410

Signed-off-by: Jon Ludlam <jon@recoil.org>
Drup added a commit to Drup/odoc that referenced this issue Jul 16, 2020
Only possible in the ML syntax:

    module F (X : Bar) : BAZ

Also adds a test for unit functors and fixes ocaml#410
Drup added a commit to Drup/odoc that referenced this issue Sep 25, 2020
Only possible in the ML syntax:

    module F (X : Bar) : BAZ

Also adds a test for unit functors and fixes ocaml#410
Drup added a commit to Drup/odoc that referenced this issue Oct 8, 2020
Only possible in the ML syntax:

    module F (X : Bar) : BAZ

Also adds a test for unit functors and fixes ocaml#410
jonludlam pushed a commit that referenced this issue Oct 8, 2020
Only possible in the ML syntax:

    module F (X : Bar) : BAZ

Also adds a test for unit functors and fixes #410
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working output
Projects
None yet
Development

No branches or pull requests

3 participants