@@ -18,15 +18,16 @@ let rec shape_of_id env :
18
18
| None -> None
19
19
in
20
20
fun id ->
21
+ if Identifier. is_internal id then None else
21
22
match id.iv with
22
23
| `Root (_ , name ) -> begin
23
- match Env. lookup_unit (ModuleName. to_string name) env with
24
+ match Env. lookup_unit (ModuleName. to_string_unsafe name) env with
24
25
| Some (Env. Found unit ) -> (
25
26
match unit .shape_info with | Some (shape , _ ) -> Some shape | None -> None )
26
27
| _ -> None
27
28
end
28
29
| `Module (parent , name ) ->
29
- proj parent Kind. Module (ModuleName. to_string name)
30
+ proj parent Kind. Module (ModuleName. to_string_unsafe name)
30
31
| `Result parent ->
31
32
(* Apply the functor to an empty signature. This doesn't seem to cause
32
33
any problem, as the shape would stop resolve on an item inside the
@@ -35,18 +36,18 @@ let rec shape_of_id env :
35
36
>> = fun parent ->
36
37
Some (Shape. app parent ~arg: (Shape. str Shape.Item.Map. empty))
37
38
| `ModuleType (parent , name ) ->
38
- proj parent Kind. Module_type (ModuleTypeName. to_string name)
39
- | `Type (parent , name ) -> proj parent Kind. Type (TypeName. to_string name)
40
- | `Value (parent , name ) -> proj parent Kind. Value (ValueName. to_string name)
39
+ proj parent Kind. Module_type (ModuleTypeName. to_string_unsafe name)
40
+ | `Type (parent , name ) -> proj parent Kind. Type (TypeName. to_string_unsafe name)
41
+ | `Value (parent , name ) -> proj parent Kind. Value (ValueName. to_string_unsafe name)
41
42
| `Extension (parent , name ) ->
42
43
proj parent Kind. Extension_constructor (ExtensionName. to_string name)
43
44
| `ExtensionDecl (parent , name , _ ) ->
44
45
proj parent Kind. Extension_constructor (ExtensionName. to_string name)
45
46
| `Exception (parent , name ) ->
46
47
proj parent Kind. Extension_constructor (ExceptionName. to_string name)
47
- | `Class (parent , name ) -> proj parent Kind. Class (ClassName. to_string name)
48
+ | `Class (parent , name ) -> proj parent Kind. Class (ClassName. to_string_unsafe name)
48
49
| `ClassType (parent , name ) ->
49
- proj parent Kind. Class_type (ClassTypeName. to_string name)
50
+ proj parent Kind. Class_type (ClassTypeName. to_string_unsafe name)
50
51
| `Page _ | `LeafPage _ | `Label _ | `CoreType _ | `CoreException _
51
52
| `Constructor _ | `Field _ | `Method _ | `InstanceVariable _ | `Parameter _
52
53
->
0 commit comments