@@ -81,21 +81,20 @@ let rec shape_of_module_path env : _ -> Shape.t option =
8181 | `Identifier (id , _ ) ->
8282 shape_of_id env (id :> Odoc_model.Paths.Identifier.NonSrc.t )
8383
84- let shape_of_value_path env :
85- Odoc_model.Paths.Path.Value. t -> Shape. t option =
84+ let shape_of_kind_path env kind :
85+ _ -> Shape. t option =
8686 let proj parent kind name =
8787 let item = Shape.Item. make name kind in
8888 match shape_of_module_path env parent with
8989 | Some shape -> Some (Shape. proj shape item)
9090 | None -> None
9191 in
92- fun ( path : Odoc_model.Paths.Path.Value.t ) ->
92+ fun path ->
9393 match path with
9494 | `Resolved _ -> None
95- | `Dot (parent , name ) -> proj parent Kind. Value name
95+ | `Dot (parent , name ) -> proj parent kind name
9696 | `Identifier (id , _ ) -> shape_of_id env (id :> Odoc_model.Paths.Identifier.NonSrc.t )
9797
98-
9998module MkId = Identifier. Mk
10099
101100let unit_of_uid uid =
@@ -151,25 +150,24 @@ let lookup_def :
151150 | None -> None
152151 | Some query -> lookup_shape env query
153152
154- let lookup_value_path :
155- Env. t ->
156- Path.Value. t ->
157- Identifier.SourceLocation. t option
158- = fun env path ->
159- match shape_of_value_path env path with
153+ let lookup_module_path = fun env path ->
154+ match shape_of_module_path env path with
160155 | None -> None
161156 | Some query -> lookup_shape env query
162157
163-
164- let lookup_module_path :
165- Env. t ->
166- Path.Module. t ->
167- Identifier.SourceLocation. t option
168- = fun env path ->
169- match shape_of_module_path env path with
158+ let lookup_kind_path = fun kind env path ->
159+ match shape_of_kind_path env kind path with
170160 | None -> None
171161 | Some query -> lookup_shape env query
172162
163+ let lookup_value_path = lookup_kind_path Kind. Value
164+
165+ let lookup_type_path = lookup_kind_path Kind. Type
166+
167+ let lookup_module_type_path = lookup_kind_path Kind. Module_type
168+
169+ let lookup_class_type_path = lookup_kind_path Kind. Class_type
170+
173171#else
174172
175173type t = unit
@@ -180,4 +178,10 @@ let lookup_value_path _ _id = None
180178
181179let lookup_module_path _ _id = None
182180
181+ let lookup_type_path _ _id = None
182+
183+ let lookup_module_type_path _ _id = None
184+
185+ let lookup_class_type_path _ _id = None
186+
183187#endif
0 commit comments