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

correct usage example #716

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lubegasimon
Copy link
Collaborator

correct usage example in test/xref2/lib/common.cppo.ml

utop # open Odoc_xref2;;
utop # open Odoc_xref_test;;
utop # let test_data = "module type M = sig type t end module N : M type u = N.t";;
utop # let id, docs, sg = Common.model_of_string test_data;;
utop # let id, sg, docs = Common.model_of_string test_data;;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the last value in this triple is now the optional 'canonical' value - model_of_string ends up calling read_interface:

let read_interface root name intf =
  let id = `Root (root, Odoc_model.Names.ModuleName.make_std name) in
  let sg, canonical =
    read_signature Odoc_model.Semantics.Expect_canonical Env.empty id intf
  in
  (id, sg, (canonical :> Odoc_model.Paths.Path.Module.t option))

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, so we probably need to rename the variable from docs to canonical. (Sorry for the delay to respond)

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

Successfully merging this pull request may close these issues.

3 participants