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

Reference to constructor in module #447

Closed
Julow opened this issue Jul 8, 2020 · 7 comments · Fixed by #933
Closed

Reference to constructor in module #447

Julow opened this issue Jul 8, 2020 · 7 comments · Fixed by #933

Comments

@Julow
Copy link
Collaborator

Julow commented Jul 8, 2020

With the new model, the reference M.Foo doesn't resolve but M.t.Foo does.

module M : sig
  type t = Foo
end

(** {!constructor:M.Foo} {!constructor:M.t.Foo} *)

In Paths_types, constructor parent should be parent or a new constructor_parent instead of datatype.

Also, the type for references allows extension and exception constructors in {!constructor:..} references but won't resolve them.

@jonludlam
Copy link
Member

Hmm, if we changed the identifier we wouldn't be able to link correctly as we wouldn't know which type the construct was in. I think the issue is probably that when we open the module containing the type declaration in Env.open_signature we should recurse into the type declarations at that point and add them to the env?

@Julow
Copy link
Collaborator Author

Julow commented Jul 8, 2020

Constructors (and fields) are already added to the env (in Env.add_type). It should be easy to add the corresponding TypeDecl to constructors in the env (add a third argument to Constructor in Component.Element).

The current issue is in signatures (Find) and Paths_types.

@jonludlam
Copy link
Member

I'm still not clear on what the issue is with Paths_types?

@Julow
Copy link
Collaborator Author

Julow commented Jul 8, 2020

We just need to allow "signature | datatype" parents in constructor references.

@jonludlam
Copy link
Member

Oh in the references! I was thinking of the identifiers :-)

@jonludlam jonludlam added this to the Replacing ocamldoc milestone Jul 23, 2020
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. The main purpose of this is to keep the issue tracker focused to what is actively being worked on, so that the amount and variety of open yet inactive issues does not overwhelm contributors.

An issue closed as stale is not rejected — further discussion is welcome in its closed state, and it can be resurrected at any time. odoc maintainers regularly check issues that were closed as stale in the past, to see if the time is right to reopen and work on them again. PRs addressing issues closed as stale are as welcome as PRs for open issues. They will be given the same review attention, and any other help.

@Julow
Copy link
Collaborator Author

Julow commented Aug 24, 2021

This is in the next milestone.

@Julow Julow reopened this Aug 24, 2021
panglesd added a commit to panglesd/odoc that referenced this issue Mar 2, 2023
Signed-off-by: Paul-Elliot <peada@free.fr>
Co-authored-by: Paul-Elliot <peada@free.fr>
panglesd added a commit to panglesd/odoc that referenced this issue Mar 30, 2023
Co-authored-by: Paul-Elliot <peada@free.fr>
Signed-off-by: Paul-Elliot <peada@free.fr>
panglesd added a commit to panglesd/odoc that referenced this issue Mar 30, 2023
Co-authored-by: Paul-Elliot <peada@free.fr>
Signed-off-by: Paul-Elliot <peada@free.fr>
panglesd added a commit to panglesd/odoc that referenced this issue Mar 30, 2023
Co-authored-by: Paul-Elliot <peada@free.fr>
Signed-off-by: Paul-Elliot <peada@free.fr>
panglesd added a commit to panglesd/odoc that referenced this issue Dec 6, 2023
Co-authored-by: Paul-Elliot <peada@free.fr>
Signed-off-by: Paul-Elliot <peada@free.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants