Skip to content

Commit cfd949a

Browse files
panglesdjonludlam
authored andcommitted
Occurrences: Review comments
- Remove now unused is_internal_rec. It was added for non-persistent values, but this has been delayed to another PR - Remove TODO comment on Classes when building the environment: classes cannot contain items that are contained in our current set of occurrence kinds (values, modules, module types, ...) Signed-off-by: Paul-Elliot <[email protected]>
1 parent 4cd9361 commit cfd949a

File tree

2 files changed

+2
-32
lines changed

2 files changed

+2
-32
lines changed

src/model/paths.ml

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -91,36 +91,6 @@ module Identifier = struct
9191
| `SourceLocationInternal _ | `AssetFile _ ->
9292
false
9393

94-
let rec is_internal_rec : t -> bool =
95-
fun x ->
96-
is_internal x
97-
||
98-
match x.iv with
99-
| `Root (_, name) -> ModuleName.is_internal name
100-
| `Page (_, _) -> false
101-
| `LeafPage (_, _) -> false
102-
| `Module (parent, _) -> is_internal_rec (parent :> t)
103-
| `Parameter (parent, _) -> is_internal_rec (parent :> t)
104-
| `Result x -> is_internal_rec (x :> t)
105-
| `ModuleType (parent, _) -> is_internal_rec (parent :> t)
106-
| `Type (parent, _) -> is_internal_rec (parent :> t)
107-
| `CoreType name -> TypeName.is_internal name
108-
| `Constructor (parent, _) -> is_internal (parent :> t)
109-
| `Field (parent, _) -> is_internal (parent :> t)
110-
| `Extension (parent, _) -> is_internal (parent :> t)
111-
| `ExtensionDecl (parent, _, _) -> is_internal (parent :> t)
112-
| `Exception (parent, _) -> is_internal (parent :> t)
113-
| `CoreException _ -> false
114-
| `Value (parent, _) -> is_internal_rec (parent :> t)
115-
| `Class (parent, _) -> is_internal_rec (parent :> t)
116-
| `ClassType (parent, _) -> is_internal_rec (parent :> t)
117-
| `Method (parent, _) -> is_internal (parent :> t)
118-
| `InstanceVariable (parent, _) -> is_internal (parent :> t)
119-
| `Label (parent, _) -> is_internal (parent :> t)
120-
| `SourceDir _ | `SourceLocationMod _ | `SourceLocation _ | `SourcePage _
121-
| `SourceLocationInternal _ | `AssetFile _ ->
122-
false
123-
12494
let name : [< t_pv ] id -> string = fun n -> name_aux (n :> t)
12595

12696
let rec full_name_aux : t -> string list =
@@ -701,7 +671,7 @@ module Path = struct
701671
| `Identifier { iv = `Module (_, m); _ }
702672
when Names.ModuleName.is_internal m ->
703673
true
704-
| `Identifier i -> Identifier.is_internal_rec i
674+
| `Identifier _ -> false
705675
| `Canonical (_, `Resolved _) -> false
706676
| `Canonical (x, _) ->
707677
(not weak_canonical_test) && inner (x : module_ :> any)

src/xref2/link.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ module Build_env = struct
481481
| Comment _ -> env
482482
| TypExt _ -> env
483483
| Exception _ -> env
484-
| Class _ -> env (* TODO *)
484+
| Class _ -> env
485485
| ClassType _ -> env
486486
| Include i -> include_ env i
487487
| Open _ -> env)

0 commit comments

Comments
 (0)