Skip to content

Commit 401f26e

Browse files
lubegasimonjonludlam
authored andcommitted
a few modifications
Signed-off-by: lubegasimon <[email protected]>
1 parent 166860c commit 401f26e

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/model/ident_env.cppo.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ open Names
1919

2020
module Id = Paths.Identifier
2121
module P = Paths.Path
22-
open Typedtree
2322

2423
type type_ident = Paths.Identifier.Path.Type.t
2524

@@ -226,6 +225,7 @@ let extract_signature_tree_items sg =
226225
List.map extract_signature_tree_item sg.sig_items |> List.flatten
227226

228227
let rec read_pattern pat =
228+
let open Typedtree in
229229
match pat.pat_desc with
230230
| Tpat_var(id, _) -> [`Value(id, false)]
231231
| Tpat_alias(pat, id, _) -> `Value(id, false) :: read_pattern pat

src/model/names.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ module Name : Name = struct
5454

5555
let make_std s =
5656
let s = parenthesise s in
57-
if String.length s > 0 && s.[0] = '{' then raise (Invalid_argument s)
58-
else Std s
57+
Std s
5958

6059
let of_ident id = make_std (Ident.name id)
6160

src/xref2/test.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ by the module type `N`. However, `N` is not defined at the top level
372372
here, so it has a local identifier. We can see this by looking up module `M` from the environment:
373373

374374
```ocaml env=e1
375-
# let m = Env.(lookup_by_id s_module_type) (`ModuleType (Common.id, Odoc_model.Names.ModuleTypeName.of_string "M")) env;;
375+
# let m = Env.(lookup_by_id s_module_type) (`ModuleType (Common.id, Odoc_model.Names.ModuleTypeName.make_std "M")) env;;
376376
val m : Component.Element.module_type option =
377377
Some
378378
(`ModuleType
@@ -743,7 +743,7 @@ look up module `N` from within this and find its signature:
743743

744744
```ocaml env=e1
745745
# let m = get_ok @@ Tools.lookup_module ~mark_substituted:true env
746-
(`Module (`Module (`Identifier (Common.root_module "C")), ModuleName.of_string "N"));;
746+
(`Module (`Module (`Identifier (Common.root_module "C")), ModuleName.make_std "N"));;
747747
val m : Component.Module.t Component.Delayed.t =
748748
{Odoc_xref2.Component.Delayed.v =
749749
Some

0 commit comments

Comments
 (0)