this repo has no description

Paths to core types are resolved instead of unresolved

authored by

Paul-Elliot and committed by jon.recoil.org 20f28f59 47718fe8

+156 -179
+7 -7
src/document/generator.ml
··· 103 103 match path with 104 104 | `Identifier (id, _) -> 105 105 unresolved [ inline @@ Text (Identifier.name id) ] 106 - | `CoreType n -> 107 - O.elt [ inline @@ Text (Odoc_model.Names.TypeName.to_string n) ] 108 106 | `Substituted m -> from_path (m :> Path.t) 109 107 | `SubstitutedMT m -> from_path (m :> Path.t) 110 108 | `SubstitutedT m -> from_path (m :> Path.t) ··· 130 128 | `Resolved _ when Paths.Path.is_hidden path -> 131 129 let txt = Url.render_path path in 132 130 unresolved [ inline @@ Text txt ] 133 - | `Resolved rp -> 131 + | `Resolved rp -> ( 134 132 (* If the path is pointing to an opaque module or module type 135 133 there won't be a page generated - so we stop before; at 136 134 the parent page, and link instead to the anchor representing ··· 140 138 | `OpaqueModule _ | `OpaqueModuleType _ -> true 141 139 | _ -> false 142 140 in 143 - let id = Paths.Path.Resolved.identifier rp in 144 - let txt = Url.render_path path in 145 - let href = Url.from_identifier ~stop_before id in 146 - resolved href [ inline @@ Text txt ] 141 + let txt = [ inline @@ Text (Url.render_path path) ] in 142 + match Paths.Path.Resolved.identifier rp with 143 + | Some id -> 144 + let href = Url.from_identifier ~stop_before id in 145 + resolved href txt 146 + | None -> O.elt txt) 147 147 148 148 let dot prefix suffix = prefix ^ "." ^ suffix 149 149
+3 -8
src/document/url.ml
··· 7 7 let open Path.Resolved in 8 8 function 9 9 | `Identifier id -> Identifier.name id 10 + | `CoreType n -> TypeName.to_string n 10 11 | `OpaqueModule p -> render_resolved (p :> t) 11 12 | `OpaqueModuleType p -> render_resolved (p :> t) 12 13 | `Subst (_, p) -> render_resolved (p :> t) ··· 61 62 | `SubstitutedMT m -> render_path (m :> Path.t) 62 63 | `SubstitutedT m -> render_path (m :> Path.t) 63 64 | `SubstitutedCT m -> render_path (m :> Path.t) 64 - | `CoreType n -> TypeName.to_string n 65 65 in 66 66 67 67 render_path ··· 375 375 let polymorphic_variant ~type_ident elt = 376 376 let name_of_type_constr te = 377 377 match te with 378 - | Odoc_model.Lang.TypeExpr.Constr 379 - ((#Odoc_model.Paths.Path.NonCoreType.t as path), _) -> 380 - render_path 381 - (path 382 - : Odoc_model.Paths.Path.NonCoreType.t 383 - :> Odoc_model.Paths.Path.t) 384 - | Odoc_model.Lang.TypeExpr.Constr (`CoreType n, _) -> TypeName.to_string n 378 + | Odoc_model.Lang.TypeExpr.Constr (path, _) -> 379 + render_path (path :> Odoc_model.Paths.Path.t) 385 380 | _ -> 386 381 invalid_arg 387 382 "DocOckHtml.Url.Polymorphic_variant_decl.name_of_type_constr"
+3 -2
src/index/entry.ml
··· 2 2 open Odoc_model.Paths 3 3 4 4 type type_decl_entry = { 5 - canonical : Path.NonCoreType.t option; 5 + canonical : Path.Type.t option; 6 6 equation : TypeDecl.Equation.t; 7 7 representation : TypeDecl.Representation.t option; 8 8 } ··· 174 174 match exc.res with 175 175 | None -> 176 176 TypeExpr.Constr 177 - (`CoreType (Odoc_model.Names.TypeName.make_std "exn"), []) 177 + ( `Resolved (`CoreType (Odoc_model.Names.TypeName.make_std "exn")), 178 + [] ) 178 179 | Some x -> x 179 180 in 180 181 let kind = Exception { args = exc.args; res } in
+1 -1
src/index/entry.mli
··· 2 2 open Odoc_model.Paths 3 3 4 4 type type_decl_entry = { 5 - canonical : Path.NonCoreType.t option; 5 + canonical : Path.Type.t option; 6 6 equation : TypeDecl.Equation.t; 7 7 representation : TypeDecl.Representation.t option; 8 8 }
+1 -1
src/loader/doc_attr.ml
··· 266 266 | `Dot (parent, name) -> `Dot (conv_canonical_module parent, Names.ModuleName.make_std name) 267 267 | `Root name -> `Root (Names.ModuleName.make_std name) 268 268 269 - let conv_canonical_type : Odoc_model.Reference.path -> Paths.Path.NonCoreType.t option = function 269 + let conv_canonical_type : Odoc_model.Reference.path -> Paths.Path.Type.t option = function 270 270 | `Dot (parent, name) -> Some (`DotT (conv_canonical_module parent, Names.TypeName.make_std name)) 271 271 | _ -> None 272 272
+1 -2
src/loader/doc_attr.mli
··· 72 72 val read_location : Location.t -> Odoc_model.Location_.span 73 73 74 74 val conv_canonical_module : Odoc_model.Reference.path -> Paths.Path.Module.t 75 - val conv_canonical_type : 76 - Odoc_model.Reference.path -> Paths.Path.NonCoreType.t option 75 + val conv_canonical_type : Odoc_model.Reference.path -> Paths.Path.Type.t option 77 76 val conv_canonical_module_type : 78 77 Odoc_model.Reference.path -> Paths.Path.ModuleType.t option
+3 -1
src/loader/ident_env.cppo.ml
··· 681 681 with Not_found -> assert false 682 682 683 683 let read_type_ident env id = 684 - match find_type env id with Some id -> `Identifier (id , false) | None -> `CoreType (TypeName.of_ident id) 684 + match find_type env id with 685 + | Some id -> `Identifier (id , false) 686 + | None -> `Resolved (`CoreType (TypeName.of_ident id)) 685 687 686 688 let read_value_ident env id : Paths.Path.Value.t = 687 689 `Identifier (find_value_identifier env id, false)
+1 -1
src/model/lang.ml
··· 253 253 id : Identifier.Type.t; 254 254 source_loc : Identifier.SourceLocation.t option; 255 255 doc : Comment.docs; 256 - canonical : Path.NonCoreType.t option; 256 + canonical : Path.Type.t option; 257 257 equation : Equation.t; 258 258 representation : Representation.t option; 259 259 }
+28 -20
src/model/paths.ml
··· 656 656 | `ModuleType (_, m) when Names.ModuleTypeName.is_hidden m -> true 657 657 | `ModuleType (p, _) -> inner (p : module_ :> any) 658 658 | `Type (_, t) when Names.TypeName.is_hidden t -> true 659 + | `CoreType t -> Names.TypeName.is_hidden t 659 660 | `Type (p, _) -> inner (p : module_ :> any) 660 661 | `Value (_, t) when Names.ValueName.is_hidden t -> true 661 662 | `Value (p, _) -> inner (p : module_ :> any) ··· 685 686 and is_path_hidden : Paths_types.Path.any -> bool = 686 687 let open Paths_types.Path in 687 688 function 688 - | `CoreType _ -> false 689 689 | `Resolved r -> is_resolved_hidden ~weak_canonical_test:false r 690 690 | `Identifier (_, hidden) -> hidden 691 691 | `Substituted r -> is_path_hidden (r :> any) ··· 710 710 type t = Paths_types.Resolved_path.any 711 711 712 712 let rec parent_module_type_identifier : 713 - Paths_types.Resolved_path.module_type -> Identifier.Signature.t = 713 + Paths_types.Resolved_path.module_type -> Identifier.ModuleType.t = 714 714 function 715 - | `Identifier id -> 716 - (id : Identifier.ModuleType.t :> Identifier.Signature.t) 715 + | `Identifier id -> (id : Identifier.ModuleType.t) 717 716 | `ModuleType (m, n) -> 718 717 Identifier.Mk.module_type (parent_module_identifier m, n) 719 718 | `SubstT (m, _n) -> parent_module_type_identifier m ··· 730 729 Paths_types.Resolved_path.module_ -> Identifier.Signature.t = function 731 730 | `Identifier id -> 732 731 (id : Identifier.Path.Module.t :> Identifier.Signature.t) 733 - | `Subst (sub, _) -> parent_module_type_identifier sub 732 + | `Subst (sub, _) -> 733 + (parent_module_type_identifier sub :> Identifier.Signature.t) 734 734 | `Hidden p -> parent_module_identifier p 735 735 | `Module (m, n) -> Identifier.Mk.module_ (parent_module_identifier m, n) 736 736 | `Canonical (_, `Resolved p) -> parent_module_identifier p ··· 753 753 754 754 module ModuleType = struct 755 755 type t = Paths_types.Resolved_path.module_type 756 + 757 + let identifier : t -> Identifier.ModuleType.t = 758 + parent_module_type_identifier 756 759 end 757 760 758 761 module Type = struct ··· 767 770 type t = Paths_types.Resolved_path.class_type 768 771 end 769 772 770 - let rec identifier : t -> Identifier.t = function 771 - | `Identifier id -> id 773 + let rec identifier : t -> Identifier.t option = function 774 + | `Identifier id -> Some id 775 + | `CoreType _ -> None 772 776 | `Subst (sub, _) -> identifier (sub :> t) 773 777 | `Hidden p -> identifier (p :> t) 774 - | `Module (m, n) -> Identifier.Mk.module_ (parent_module_identifier m, n) 778 + | `Module (m, n) -> 779 + Some (Identifier.Mk.module_ (parent_module_identifier m, n)) 775 780 | `Canonical (_, `Resolved p) -> identifier (p :> t) 776 781 | `Canonical (p, _) -> identifier (p :> t) 777 782 | `Apply (m, _) -> identifier (m :> t) 778 - | `Type (m, n) -> Identifier.Mk.type_ (parent_module_identifier m, n) 779 - | `Value (m, n) -> Identifier.Mk.value (parent_module_identifier m, n) 783 + | `Type (m, n) -> 784 + Some (Identifier.Mk.type_ (parent_module_identifier m, n)) 785 + | `Value (m, n) -> 786 + Some (Identifier.Mk.value (parent_module_identifier m, n)) 780 787 | `ModuleType (m, n) -> 781 - Identifier.Mk.module_type (parent_module_identifier m, n) 782 - | `Class (m, n) -> Identifier.Mk.class_ (parent_module_identifier m, n) 788 + Some (Identifier.Mk.module_type (parent_module_identifier m, n)) 789 + | `Class (m, n) -> 790 + Some (Identifier.Mk.class_ (parent_module_identifier m, n)) 783 791 | `ClassType (m, n) -> 784 - Identifier.Mk.class_type (parent_module_identifier m, n) 792 + Some (Identifier.Mk.class_type (parent_module_identifier m, n)) 785 793 | `Alias (dest, `Resolved src) -> 786 794 if is_resolved_hidden ~weak_canonical_test:false (dest :> t) then 787 795 identifier (src :> t) ··· 814 822 type t = Paths_types.Path.module_type 815 823 end 816 824 817 - module NonCoreType = struct 818 - type t = Paths_types.Path.non_core_type 819 - end 820 - 821 825 module Type = struct 822 826 type t = Paths_types.Path.type_ 823 827 end ··· 843 847 type t = Paths_types.Resolved_fragment.signature 844 848 845 849 let rec sgidentifier : t -> Identifier.Signature.t = function 846 - | `Root (`ModuleType i) -> Path.Resolved.parent_module_type_identifier i 850 + | `Root (`ModuleType i) -> 851 + (Path.Resolved.parent_module_type_identifier i 852 + :> Identifier.Signature.t) 847 853 | `Root (`Module i) -> Path.Resolved.parent_module_identifier i 848 - | `Subst (s, _) -> Path.Resolved.parent_module_type_identifier s 854 + | `Subst (s, _) -> 855 + (Path.Resolved.parent_module_type_identifier s 856 + :> Identifier.Signature.t) 849 857 | `Alias (i, _) -> Path.Resolved.parent_module_identifier i 850 858 | `Module (m, n) -> Identifier.Mk.module_ (sgidentifier m, n) 851 859 | `OpaqueModule m -> sgidentifier (m :> t) ··· 868 876 let rec identifier : t -> Identifier.t = function 869 877 | `Root (`ModuleType _r) -> assert false 870 878 | `Root (`Module _r) -> assert false 871 - | `Subst (s, _) -> Path.Resolved.identifier (s :> Path.Resolved.t) 879 + | `Subst (s, _) -> (Path.Resolved.ModuleType.identifier s :> Identifier.t) 872 880 | `Alias (p, _) -> 873 881 (Path.Resolved.parent_module_identifier p :> Identifier.t) 874 882 | `Module (m, n) -> Identifier.Mk.module_ (Signature.sgidentifier m, n)
+2 -5
src/model/paths.mli
··· 389 389 390 390 type t = Paths_types.Resolved_path.any 391 391 392 - val identifier : t -> Identifier.t 392 + val identifier : t -> Identifier.t option 393 + (** If the path points to a core type, no identifier can be generated *) 393 394 394 395 val is_hidden : t -> bool 395 396 end ··· 406 407 407 408 module Type : sig 408 409 type t = Paths_types.Path.type_ 409 - end 410 - 411 - module NonCoreType : sig 412 - type t = Paths_types.Path.non_core_type 413 410 end 414 411 415 412 module Value : sig
+8 -10
src/model/paths_types.ml
··· 326 326 | `DotMT of module_ * ModuleTypeName.t ] 327 327 (** @canonical Odoc_model.Paths.Path.ModuleType.t *) 328 328 329 - type non_core_type = 329 + type type_ = 330 330 [ `Resolved of Resolved_path.type_ 331 - | `SubstitutedT of non_core_type 331 + | `SubstitutedT of type_ 332 332 | `Identifier of Identifier.path_type * bool 333 333 | `DotT of module_ * TypeName.t ] 334 - (** @canonical Odoc_model.Paths.Path.NonCoreType.t *) 335 - 336 - type type_ = [ non_core_type | `CoreType of TypeName.t ] 337 334 (** @canonical Odoc_model.Paths.Path.Type.t *) 338 335 339 336 type value = ··· 351 348 352 349 type any = 353 350 [ `Resolved of Resolved_path.any 354 - | `SubstitutedT of non_core_type 351 + | `SubstitutedT of type_ 355 352 | `SubstitutedMT of module_type 356 - | `CoreType of TypeName.t 357 353 | `Substituted of module_ 358 354 | `SubstitutedCT of class_type 359 355 | `Identifier of Identifier.path_any * bool ··· 405 401 [ `Identifier of Identifier.path_type 406 402 | `SubstitutedT of type_ 407 403 | `SubstitutedCT of class_type 408 - | `CanonicalType of type_ * Path.non_core_type 404 + | `CanonicalType of type_ * Path.type_ 409 405 | `Type of module_ * TypeName.t 410 406 | `Class of module_ * TypeName.t 411 - | `ClassType of module_ * TypeName.t ] 407 + | `ClassType of module_ * TypeName.t 408 + | `CoreType of TypeName.t ] 412 409 (** @canonical Odoc_model.Paths.Path.Resolved.Type.t *) 413 410 414 411 type any = ··· 435 432 | `ClassType of module_ * TypeName.t 436 433 | `Class of module_ * TypeName.t 437 434 | `Value of module_ * ValueName.t 438 - | `ClassType of module_ * TypeName.t ] 435 + | `ClassType of module_ * TypeName.t 436 + | `CoreType of TypeName.t ] 439 437 (** @canonical Odoc_model.Paths.Path.Resolved.t *) 440 438 end = 441 439 Resolved_path
+2 -2
src/model_desc/paths_desc.ml
··· 226 226 | `Substituted m -> C ("`Substituted", (m :> p), path) 227 227 | `SubstitutedMT m -> C ("`SubstitutedMT", (m :> p), path) 228 228 | `SubstitutedT m -> C ("`SubstitutedT", (m :> p), path) 229 - | `SubstitutedCT m -> C ("`SubstitutedCT", (m :> p), path) 230 - | `CoreType n -> C ("`CoreType", n, Names.typename)) 229 + | `SubstitutedCT m -> C ("`SubstitutedCT", (m :> p), path)) 231 230 232 231 and resolved_path : rp t = 233 232 Variant 234 233 (function 235 234 | `Identifier x -> C ("`Identifier", x, identifier) 235 + | `CoreType n -> C ("`CoreType", n, Names.typename) 236 236 | `Subst (x1, x2) -> 237 237 C 238 238 ( "`Subst",
+3 -1
src/occurrences/odoc_occurrences.ml
··· 5 5 let open Odoc_model.Paths.Path.Resolved in 6 6 let p = (p :> t) in 7 7 let id = identifier p in 8 - if (not (is_hidden p)) || include_hidden then Table.add tbl id 8 + match id with 9 + | Some id when (not (is_hidden p)) || include_hidden -> Table.add tbl id 10 + | _ -> () 9 11 in 10 12 let open Odoc_model.Lang in 11 13 List.iter
+7 -12
src/xref2/compile.ml
··· 15 15 fun env p -> 16 16 match p with 17 17 | `Resolved _ -> p 18 - | `CoreType _ as x -> x 19 - | #Paths.Path.NonCoreType.t as p -> ( 20 - let cp = Component.Of_Lang.(non_core_type_path (empty ()) p) in 18 + | _ -> ( 19 + let cp = Component.Of_Lang.(type_path (empty ()) p) in 21 20 match Tools.resolve_type_path env cp with 22 21 | Ok p' -> `Resolved Lang_of.(Path.resolved_type (empty ()) p') 23 22 | Error _ -> p) ··· 864 863 | Arrow (lbl, t1, t2) -> 865 864 Arrow (lbl, type_expression env parent t1, type_expression env parent t2) 866 865 | Tuple ts -> Tuple (List.map (type_expression env parent) ts) 867 - | Constr ((`CoreType _ as x), ts) -> 868 - let ts = List.map (type_expression env parent) ts in 869 - Constr (x, ts) 870 - | Constr ((#Odoc_model.Paths.Path.NonCoreType.t as path), ts') -> ( 871 - let cp = Component.Of_Lang.(non_core_type_path (empty ()) path) in 866 + | Constr (path, ts') -> ( 867 + let cp = Component.Of_Lang.(type_path (empty ()) path) in 872 868 let ts = List.map (type_expression env parent) ts' in 873 869 match Tools.resolve_type env cp with 874 - | Ok (cp, (`FType _ | `FClass _ | `FClassType _)) -> 870 + | Ok (cp, (`FType _ | `FClass _ | `FClassType _ | `CoreType _)) -> 875 871 let p = Lang_of.(Path.resolved_type (empty ()) cp) in 876 872 Constr (`Resolved p, ts) 877 873 | Ok (_cp, `FType_removed (_, x, _eq)) -> 878 874 (* Substitute type variables ? *) 879 875 Lang_of.(type_expr (empty ()) parent x) 880 876 | Error _e -> 881 - Constr 882 - ( (Lang_of.(Path.non_core_type (empty ()) cp) :> Paths.Path.Type.t), 883 - ts )) 877 + Constr ((Lang_of.(Path.type_ (empty ()) cp) :> Paths.Path.Type.t), ts) 878 + ) 884 879 | Polymorphic_variant v -> 885 880 Polymorphic_variant (type_expression_polyvar env parent v) 886 881 | Object o -> Object (type_expression_object env parent o)
+9 -23
src/xref2/component.ml
··· 270 270 type t = { 271 271 source_loc : Odoc_model.Paths.Identifier.SourceLocation.t option; 272 272 doc : CComment.docs; 273 - canonical : Odoc_model.Paths.Path.NonCoreType.t option; 273 + canonical : Odoc_model.Paths.Path.Type.t option; 274 274 equation : Equation.t; 275 275 representation : Representation.t option; 276 276 } ··· 429 429 | `Renamed of Ident.module_type ] 430 430 431 431 type subst_type = 432 - [ `Prefixed of Cpath.non_core_type * Cpath.Resolved.type_ 433 - | `Renamed of Ident.type_ ] 432 + [ `Prefixed of Cpath.type_ * Cpath.Resolved.type_ | `Renamed of Ident.type_ ] 434 433 435 434 type subst_class_type = 436 435 [ `Prefixed of Cpath.class_type * Cpath.Resolved.class_type ··· 1218 1217 config -> Format.formatter -> Cpath.Resolved.type_ -> unit = 1219 1218 fun c ppf p -> 1220 1219 match p with 1220 + | `CoreType n -> Format.fprintf ppf "%s" (TypeName.to_string n) 1221 1221 | `Local id -> ident_fmt c ppf id 1222 1222 | `Gpath p -> model_resolved_path c ppf (p :> rpath) 1223 1223 | `Substituted x -> wrap c "substituted" resolved_type_path ppf x ··· 1253 1253 else Format.fprintf ppf ">>%a<<" (resolved_module_type_path c) m 1254 1254 | `FragmentRoot -> Format.fprintf ppf "FragmentRoot" 1255 1255 1256 - and non_core_type_path : 1257 - config -> Format.formatter -> Cpath.non_core_type -> unit = 1256 + and type_path : config -> Format.formatter -> Cpath.type_ -> unit = 1258 1257 fun c ppf p -> 1259 1258 match p with 1260 1259 | `Resolved r -> wrap c "resolved" resolved_type_path ppf r 1261 1260 | `Identifier (id, b) -> 1262 1261 wrap2 c "identifier" model_identifier bool ppf (id :> id) b 1263 1262 | `Local (id, b) -> wrap2 c "local" ident_fmt bool ppf id b 1264 - | `Substituted s -> wrap c "substituted" non_core_type_path ppf s 1263 + | `Substituted s -> wrap c "substituted" type_path ppf s 1265 1264 | `DotT (m, s) -> 1266 1265 Format.fprintf ppf "%a.%a" (module_path c) m TypeName.fmt s 1267 1266 | `Class (p, t) -> ··· 1274 1273 Format.fprintf ppf "%a.%s" (resolved_parent_path c) p 1275 1274 (TypeName.to_string t) 1276 1275 1277 - and type_path : config -> Format.formatter -> Cpath.type_ -> unit = 1278 - fun c ppf p -> 1279 - match p with 1280 - | `CoreType x -> Format.fprintf ppf "%s" (TypeName.to_string x) 1281 - | #Cpath.non_core_type as x -> non_core_type_path c ppf x 1282 - 1283 1276 and value_path : config -> Format.formatter -> Cpath.value -> unit = 1284 1277 fun c ppf p -> 1285 1278 match p with ··· 1332 1325 in 1333 1326 1334 1327 match p with 1335 - | `CoreType n -> Format.fprintf ppf "%s" (TypeName.to_string n) 1336 1328 | `Resolved rp -> wrap c "resolved" model_resolved_path ppf rp 1337 1329 | `Identifier (id, b) -> 1338 1330 wrap2 c "identifier" model_identifier bool ppf (id :> id) b ··· 1359 1351 and model_resolved_path (c : config) ppf (p : rpath) = 1360 1352 let open Odoc_model.Paths.Path.Resolved in 1361 1353 match p with 1354 + | `CoreType x -> Format.fprintf ppf "%s" (TypeName.to_string x) 1362 1355 | `Identifier id -> Format.fprintf ppf "%a" (model_identifier c) (id :> id) 1363 1356 | `Module (parent, name) -> 1364 1357 Format.fprintf ppf "%a.%s" (model_resolved_path c) ··· 1959 1952 _ -> Odoc_model.Paths.Path.Resolved.Type.t -> Cpath.Resolved.type_ = 1960 1953 fun ident_map p -> 1961 1954 match p with 1955 + | `CoreType _ as c -> c 1962 1956 | `Identifier i -> ( 1963 1957 match identifier Maps.Path.Type.find ident_map.path_types i with 1964 1958 | `Local l -> `Local l ··· 2028 2022 | `Local i -> `Local (i, b)) 2029 2023 | `DotMT (path', x) -> `DotMT (module_path ident_map path', x) 2030 2024 2031 - and non_core_type_path : 2032 - _ -> Odoc_model.Paths.Path.NonCoreType.t -> Cpath.non_core_type = 2025 + and type_path : _ -> Odoc_model.Paths.Path.Type.t -> Cpath.type_ = 2033 2026 fun ident_map p -> 2034 2027 match p with 2035 2028 | `Resolved r -> `Resolved (resolved_type_path ident_map r) 2036 - | `SubstitutedT t -> `Substituted (non_core_type_path ident_map t) 2029 + | `SubstitutedT t -> `Substituted (type_path ident_map t) 2037 2030 | `Identifier (i, b) -> ( 2038 2031 match identifier Maps.Path.Type.find ident_map.path_types i with 2039 2032 | `Identifier i -> `Identifier (i, b) 2040 2033 | `Local i -> `Local (i, b)) 2041 2034 | `DotT (path', x) -> `DotT (module_path ident_map path', x) 2042 - 2043 - and type_path : _ -> Odoc_model.Paths.Path.Type.t -> Cpath.type_ = 2044 - fun ident_map p -> 2045 - match p with 2046 - | `CoreType x -> `CoreType x 2047 - | #Odoc_model.Paths.Path.NonCoreType.t as x -> 2048 - (non_core_type_path ident_map x :> Cpath.type_) 2049 2035 2050 2036 and value_path : _ -> Odoc_model.Paths.Path.Value.t -> Cpath.value = 2051 2037 fun ident_map p ->
+3 -5
src/xref2/component.mli
··· 259 259 type t = { 260 260 source_loc : Odoc_model.Paths.Identifier.SourceLocation.t option; 261 261 doc : CComment.docs; 262 - canonical : Odoc_model.Paths.Path.NonCoreType.t option; 262 + canonical : Odoc_model.Paths.Path.Type.t option; 263 263 equation : Equation.t; 264 264 representation : Representation.t option; 265 265 } ··· 407 407 | `Renamed of Ident.module_type ] 408 408 409 409 type subst_type = 410 - [ `Prefixed of Cpath.non_core_type * Cpath.Resolved.type_ 411 - | `Renamed of Ident.type_ ] 410 + [ `Prefixed of Cpath.type_ * Cpath.Resolved.type_ | `Renamed of Ident.type_ ] 412 411 413 412 type subst_class_type = 414 413 [ `Prefixed of Cpath.class_type * Cpath.Resolved.class_type ··· 689 688 val module_type_path : 690 689 map -> Odoc_model.Paths.Path.ModuleType.t -> Cpath.module_type 691 690 692 - val non_core_type_path : 693 - map -> Odoc_model.Paths.Path.NonCoreType.t -> Cpath.non_core_type 691 + val type_path : map -> Odoc_model.Paths.Path.Type.t -> Cpath.type_ 694 692 695 693 val value_path : map -> Odoc_model.Paths.Path.Value.t -> Cpath.value 696 694
+8 -9
src/xref2/cpath.ml
··· 31 31 [ `Local of Ident.type_ 32 32 | `Gpath of Path.Resolved.Type.t 33 33 | `Substituted of type_ 34 - | `CanonicalType of type_ * Path.NonCoreType.t 34 + | `CanonicalType of type_ * Path.Type.t 35 + | `CoreType of TypeName.t 35 36 | `Type of parent * TypeName.t 36 37 | `Class of parent * TypeName.t 37 38 | `ClassType of parent * TypeName.t ] ··· 68 69 | `DotMT of module_ * ModuleTypeName.t 69 70 | `ModuleType of Resolved.parent * ModuleTypeName.t ] 70 71 71 - and non_core_type = 72 + and type_ = 72 73 [ `Resolved of Resolved.type_ 73 - | `Substituted of non_core_type 74 + | `Substituted of type_ 74 75 | `Local of Ident.type_ * bool 75 76 | `Identifier of Odoc_model.Paths.Identifier.Path.Type.t * bool 76 77 | `DotT of module_ * TypeName.t 77 78 | `Type of Resolved.parent * TypeName.t 78 79 | `Class of Resolved.parent * TypeName.t 79 80 | `ClassType of Resolved.parent * TypeName.t ] 80 - 81 - type type_ = [ `CoreType of TypeName.t | non_core_type ] 82 81 83 82 and value = 84 83 [ `Resolved of Resolved.value ··· 127 126 128 127 and is_resolved_type_substituted : Resolved.type_ -> bool = function 129 128 | `Local _ -> false 129 + | `CoreType _ -> false 130 130 | `Substituted _ -> true 131 131 | `Gpath _ -> false 132 132 | `CanonicalType (t, _) -> is_resolved_type_substituted t ··· 158 158 | `ModuleType (a, _) -> is_resolved_parent_substituted a 159 159 160 160 let is_type_substituted : type_ -> bool = function 161 - | `CoreType _ -> false 162 161 | `Resolved a -> is_resolved_type_substituted a 163 162 | `Identifier _ -> false 164 163 | `Local _ -> false ··· 249 248 | `Identifier ({ iv = `Class (_, t); _ }, b) -> b || TypeName.is_hidden t 250 249 | `Local (_, b) -> b 251 250 | `Substituted p -> is_type_hidden (p :> type_) 252 - | `CoreType _ -> false 253 251 | `DotT (p, _) -> is_module_hidden p 254 252 | `Type (p, _) | `Class (p, _) | `ClassType (p, _) -> 255 253 is_resolved_parent_hidden ~weak_canonical_test:false p 256 254 257 255 and is_resolved_type_hidden : Resolved.type_ -> bool = function 256 + | `CoreType n -> TypeName.is_hidden n 258 257 | `Local _ -> false 259 258 | `Gpath p -> Odoc_model.Paths.Path.Resolved.(is_hidden (p :> t)) 260 259 | `Substituted p -> is_resolved_type_hidden p ··· 364 363 | `Module m -> unresolve_resolved_module_path m 365 364 | `FragmentRoot | `ModuleType _ -> assert false 366 365 367 - and unresolve_resolved_type_path : Resolved.type_ -> non_core_type = function 368 - | (`Gpath _ | `Local _) as p -> `Resolved p 366 + and unresolve_resolved_type_path : Resolved.type_ -> type_ = function 367 + | (`Gpath _ | `Local _ | `CoreType _) as p -> `Resolved p 369 368 | `Substituted x -> unresolve_resolved_type_path x 370 369 | `CanonicalType (t1, _) -> unresolve_resolved_type_path t1 371 370 | `Type (p, n) -> `DotT (unresolve_resolved_parent_path p, n)
+3 -1
src/xref2/find.ml
··· 7 7 8 8 type datatype = [ `FType of TypeName.t * TypeDecl.t ] 9 9 10 + type core_type = [ `CoreType of TypeName.t ] 11 + 10 12 type class_ = 11 13 [ `FClass of TypeName.t * Class.t | `FClassType of TypeName.t * ClassType.t ] 12 14 ··· 127 129 type careful_module_type = 128 130 [ module_type | `FModuleType_removed of ModuleType.expr ] 129 131 130 - type careful_type = [ type_ | removed_type ] 132 + type careful_type = [ type_ | removed_type | core_type ] 131 133 132 134 type careful_class = [ class_ | removed_type ] 133 135
+3 -1
src/xref2/find.mli
··· 113 113 type careful_module_type = 114 114 [ module_type | `FModuleType_removed of ModuleType.expr ] 115 115 116 - type careful_type = [ type_ | removed_type ] 116 + type core_type = [ `CoreType of TypeName.t ] 117 + 118 + type careful_type = [ type_ | removed_type | core_type ] 117 119 118 120 type careful_class = [ class_ | removed_type ] 119 121
+3 -9
src/xref2/lang_of.ml
··· 97 97 | `ModuleType (`Module p, n) -> `DotMT (`Resolved (resolved_module map p), n) 98 98 | `ModuleType (_, _) -> failwith "Probably shouldn't happen" 99 99 100 - and non_core_type map (p : Cpath.non_core_type) : 101 - Odoc_model.Paths.Path.NonCoreType.t = 100 + and type_ map (p : Cpath.type_) : Odoc_model.Paths.Path.Type.t = 102 101 match p with 103 - | `Substituted x -> `SubstitutedT (non_core_type map x) 102 + | `Substituted x -> `SubstitutedT (type_ map x) 104 103 | `Identifier 105 104 (({ iv = #Odoc_model.Paths.Identifier.Path.Type.t_pv; _ } as y), b) -> 106 105 `Identifier (y, b) ··· 111 110 | `Class (`Module p, n) -> `DotT (`Resolved (resolved_module map p), n) 112 111 | `ClassType (`Module p, n) -> `DotT (`Resolved (resolved_module map p), n) 113 112 | `Type _ | `Class _ | `ClassType _ -> failwith "Probably shouldn't happen" 114 - 115 - and type_ map (p : Cpath.type_) : Odoc_model.Paths.Path.Type.t = 116 - match p with 117 - | `CoreType x -> `CoreType x 118 - | #Cpath.non_core_type as v -> 119 - (non_core_type map v :> Odoc_model.Paths.Path.Type.t) 120 113 121 114 and class_type map (p : Cpath.class_type) : Odoc_model.Paths.Path.ClassType.t 122 115 = ··· 185 178 and resolved_type map (p : Cpath.Resolved.type_) : 186 179 Odoc_model.Paths.Path.Resolved.Type.t = 187 180 match p with 181 + | `CoreType _ as c -> c 188 182 | `Gpath y -> y 189 183 | `Local id -> `Identifier (Component.TypeMap.find id map.path_type) 190 184 | `CanonicalType (t1, t2) -> `CanonicalType (resolved_type map t1, t2)
+1 -1
src/xref2/lang_of.mli
··· 16 16 17 17 val module_type : maps -> Cpath.module_type -> Path.ModuleType.t 18 18 19 - val non_core_type : maps -> Cpath.non_core_type -> Path.NonCoreType.t 19 + val type_ : maps -> Cpath.type_ -> Path.Type.t 20 20 21 21 val class_type : maps -> Cpath.class_type -> Path.ClassType.t 22 22
+22 -24
src/xref2/link.ml
··· 74 74 let hidden_alias = Paths.Path.Resolved.is_hidden self 75 75 and self_canonical = 76 76 let i = Paths.Path.Resolved.identifier self in 77 - i = (target :> Paths.Identifier.t) 77 + i = Some (target :> Paths.Identifier.t) 78 78 in 79 + 79 80 self_canonical || hidden_alias 80 81 81 82 exception Loop ··· 93 94 fun p -> 94 95 let open Paths.Path.Resolved in 95 96 match p with 97 + | `CoreType _ -> false 96 98 | `Identifier _ -> false 97 99 | `Subst (x, y) -> should_reresolve (x :> t) || should_reresolve (y :> t) 98 100 | `Hidden p -> should_reresolve (p :> t) ··· 130 132 fun env p -> 131 133 if not (should_resolve (p :> Paths.Path.t)) then p 132 134 else 133 - match p with 134 - | `CoreType _ as x -> x 135 - | #Paths.Path.NonCoreType.t as p -> ( 136 - let cp = Component.Of_Lang.(non_core_type_path (empty ()) p) in 137 - match cp with 138 - | `Resolved p -> 139 - let result = Tools.reresolve_type env p in 135 + let cp = Component.Of_Lang.(type_path (empty ()) p) in 136 + match cp with 137 + | `Resolved p -> 138 + let result = Tools.reresolve_type env p in 139 + `Resolved Lang_of.(Path.resolved_type (empty ()) result) 140 + | _ -> ( 141 + match Tools.resolve_type_path env cp with 142 + | Ok p' -> 143 + let result = Tools.reresolve_type env p' in 140 144 `Resolved Lang_of.(Path.resolved_type (empty ()) result) 141 - | #Cpath.non_core_type as cp -> ( 142 - match Tools.resolve_type_path env cp with 143 - | Ok p' -> 144 - let result = Tools.reresolve_type env p' in 145 - `Resolved Lang_of.(Path.resolved_type (empty ()) result) 146 - | Error e -> 147 - Errors.report ~what:(`Type_path cp) ~tools_error:e `Lookup; 148 - p)) 145 + | Error e -> 146 + Errors.report ~what:(`Type_path cp) ~tools_error:e `Lookup; 147 + p) 149 148 150 149 let value_path : Env.t -> Paths.Path.Value.t -> Paths.Path.Value.t = 151 150 fun env p -> ··· 925 924 | Some (Constr (`Resolved path, params)) 926 925 when Paths.Path.Resolved.(is_hidden (path :> t)) 927 926 || Paths.Path.Resolved.(identifier (path :> t)) 928 - = (t.id :> Paths.Identifier.t) -> 927 + = Some (t.id :> Paths.Identifier.t) -> 929 928 Some (path, params) 930 929 | _ -> None 931 930 in ··· 953 952 with _ -> default.equation 954 953 in 955 954 { default with equation = type_decl_equation env parent equation } 956 - | Ok (`FClass _ | `FClassType _ | `FType_removed _) | Error _ -> default) 955 + | Ok (`FClass _ | `FClassType _ | `FType_removed _ | `CoreType _) 956 + | Error _ -> 957 + default) 957 958 | None -> default 958 959 959 960 and type_decl_equation env parent t = ··· 1047 1048 type_expression env parent visited t1, 1048 1049 type_expression env parent visited t2 ) 1049 1050 | Tuple ts -> Tuple (List.map (type_expression env parent visited) ts) 1050 - | Constr ((`CoreType _ as x), ts) -> 1051 - let ts = List.map (type_expression env parent visited) ts in 1052 - Constr (x, ts) 1053 - | Constr ((#Paths.Path.NonCoreType.t as path'), ts') -> ( 1051 + | Constr (path', ts') -> ( 1054 1052 let path = type_path env path' in 1055 1053 let ts = List.map (type_expression env parent visited) ts' in 1056 1054 if not (Paths.Path.is_hidden (path :> Paths.Path.t)) then Constr (path, ts) 1057 1055 else 1058 - let cp = Component.Of_Lang.(non_core_type_path (empty ()) path') in 1056 + let cp = Component.Of_Lang.(type_path (empty ()) path') in 1059 1057 match Tools.resolve_type env cp with 1060 1058 | Ok (cp', `FType (_, t)) -> 1061 1059 let cp' = Tools.reresolve_type env cp' in ··· 1090 1088 Constr (`Resolved p, ts)) 1091 1089 | _ -> Constr (`Resolved p, ts) 1092 1090 else Constr (`Resolved p, ts) 1093 - | Ok (cp', (`FClass _ | `FClassType _)) -> 1091 + | Ok (cp', (`FClass _ | `FClassType _ | `CoreType _)) -> 1094 1092 let p = Lang_of.(Path.resolved_type (empty ()) cp') in 1095 1093 Constr (`Resolved p, ts) 1096 1094 | Ok (_cp, `FType_removed (_, x, _eq)) ->
-1
src/xref2/shape_tools.cppo.ml
··· 105 105 | `SubstitutedCT t -> shape_of_kind_path env kind (t :> Odoc_model.Paths.Path.t) 106 106 | `Identifier (id, _) -> shape_of_id env (id :> Odoc_model.Paths.Identifier.NonSrc.t) 107 107 | `Substituted t -> shape_of_kind_path env kind (t :> Odoc_model.Paths.Path.t) 108 - | `CoreType _ 109 108 | `Forward _ 110 109 | `Dot _ 111 110 | `Root _
+7 -16
src/xref2/subst.ml
··· 43 43 module_type = ModuleTypeMap.add id (`Prefixed (p, rp)) t.module_type; 44 44 } 45 45 46 - let add_type : 47 - Ident.type_ -> Cpath.non_core_type -> Cpath.Resolved.type_ -> t -> t = 46 + let add_type : Ident.type_ -> Cpath.type_ -> Cpath.Resolved.type_ -> t -> t = 48 47 fun id p rp t -> 49 48 { t with type_ = TypeMap.add (id :> Ident.type_) (`Prefixed (p, rp)) t.type_ } 50 49 ··· 56 55 type_ = 57 56 TypeMap.add 58 57 (id :> Ident.type_) 59 - (`Prefixed ((p :> Cpath.non_core_type), (rp :> Cpath.Resolved.type_))) 58 + (`Prefixed ((p :> Cpath.type_), (rp :> Cpath.Resolved.type_))) 60 59 t.type_; 61 60 class_type = 62 61 TypeMap.add (id :> Ident.type_) (`Prefixed (p, rp)) t.class_type; ··· 70 69 type_ = 71 70 TypeMap.add 72 71 (id :> Ident.type_) 73 - (`Prefixed ((p :> Cpath.non_core_type), (rp :> Cpath.Resolved.type_))) 72 + (`Prefixed ((p :> Cpath.type_), (rp :> Cpath.Resolved.type_))) 74 73 t.type_; 75 74 class_type = 76 75 TypeMap.add (id :> Ident.type_) (`Prefixed (p, rp)) t.class_type; ··· 315 314 (Cpath.Resolved.type_, TypeExpr.t * TypeDecl.Equation.t) or_replaced = 316 315 fun s p -> 317 316 match p with 317 + | `CoreType _ as c -> Not_replaced c 318 318 | `Local id -> ( 319 319 if TypeMap.mem id s.type_replacement then 320 320 Replaced (TypeMap.find id s.type_replacement) ··· 334 334 | `ClassType (p, n) -> Not_replaced (`ClassType (resolved_parent_path s p, n)) 335 335 | `Class (p, n) -> Not_replaced (`Class (resolved_parent_path s p, n)) 336 336 337 - and non_core_type_path : 338 - t -> Cpath.non_core_type -> Cpath.non_core_type type_or_replaced = 337 + and type_path : t -> Cpath.type_ -> Cpath.type_ type_or_replaced = 339 338 fun s p -> 340 339 match p with 341 340 | `Resolved r -> ( 342 341 try resolved_type_path s r |> map_replaced (fun r -> `Resolved r) 343 342 with Invalidated -> 344 343 let path' = Cpath.unresolve_resolved_type_path r in 345 - non_core_type_path s path') 346 - | `Substituted p -> 347 - non_core_type_path s p |> map_replaced (fun r -> `Substituted r) 344 + type_path s path') 345 + | `Substituted p -> type_path s p |> map_replaced (fun r -> `Substituted r) 348 346 | `Local (id, b) -> ( 349 347 if TypeMap.mem id s.type_replacement then 350 348 Replaced (TypeMap.find id s.type_replacement) ··· 358 356 | `Type (p, n) -> Not_replaced (`Type (resolved_parent_path s p, n)) 359 357 | `Class (p, n) -> Not_replaced (`Class (resolved_parent_path s p, n)) 360 358 | `ClassType (p, n) -> Not_replaced (`ClassType (resolved_parent_path s p, n)) 361 - 362 - and type_path : t -> Cpath.type_ -> Cpath.type_ type_or_replaced = 363 - fun s p -> 364 - match p with 365 - | `CoreType x -> Not_replaced (`CoreType x) 366 - | #Cpath.non_core_type as x -> 367 - (non_core_type_path s x :> Cpath.type_ type_or_replaced) 368 359 369 360 and resolved_class_type_path : 370 361 t -> Cpath.Resolved.class_type -> Cpath.Resolved.class_type =
+1 -2
src/xref2/subst.mli
··· 15 15 val add_module_type : 16 16 Ident.module_type -> Cpath.module_type -> Cpath.Resolved.module_type -> t -> t 17 17 18 - val add_type : 19 - Ident.type_ -> Cpath.non_core_type -> Cpath.Resolved.type_ -> t -> t 18 + val add_type : Ident.type_ -> Cpath.type_ -> Cpath.Resolved.type_ -> t -> t 20 19 21 20 val add_class : 22 21 Ident.type_ -> Cpath.class_type -> Cpath.Resolved.class_type -> t -> t
+1 -1
src/xref2/test.md
··· 3260 3260 ihash = 1011043008; 3261 3261 ikey = "v_{x}6/shadowed/(XXXX).m_Foo3.r_Root.p_None"}; 3262 3262 source_loc = None; value = Odoc_model.Lang.Value.Abstract; doc = []; 3263 - type_ = Odoc_model.Lang.TypeExpr.Constr (`CoreType int, [])}; 3263 + type_ = Odoc_model.Lang.TypeExpr.Constr (`Resolved (`CoreType int), [])}; 3264 3264 Odoc_model.Lang.Signature.Value 3265 3265 {Odoc_model.Lang.Value.id = 3266 3266 {Odoc_model__Paths_types.iv =
+11 -4
src/xref2/tools.ml
··· 531 531 and handle_type_lookup env id p sg = 532 532 match Find.careful_type_in_sig sg id with 533 533 | Some (`FClass (name, _) as t) -> Ok (`Class (p, name), t) 534 + | Some (`CoreType _ as c) -> Ok (c, c) 534 535 | Some (`FClassType (name, _) as t) -> Ok (`ClassType (p, name), t) 535 536 | Some (`FType (name, _) as t) -> Ok (simplify_type env (`Type (p, name)), t) 536 537 | Some (`FType_removed (name, _, _) as t) -> Ok (`Type (p, name), t) ··· 740 741 | Some (`FType (name, t)) -> Ok (`FType (name, Subst.type_ sub t)) 741 742 | Some (`FType_removed (name, texpr, eq)) -> 742 743 Ok (`FType_removed (name, Subst.type_expr sub texpr, eq)) 744 + | Some (`CoreType _ as c) -> Ok c 743 745 | None -> Error `Find_failure 744 746 in 745 747 let res = 746 748 match p with 749 + | `CoreType _ as c -> Ok c 747 750 | `Identifier ({ iv = `Type _; _ } as i) -> 748 751 of_option ~error:(`Lookup_failureT i) 749 752 (Env.(lookup_by_id s_datatype) i env) ··· 836 839 handle_type_lookup env name p sg >>= fun (_, t') -> 837 840 let t = 838 841 match t' with 842 + | `CoreType _ as c -> c 839 843 | `FClass (name, c) -> `FClass (name, Subst.class_ sub c) 840 844 | `FClassType (name, ct) -> `FClassType (name, Subst.class_type sub ct) 841 845 | `FType (name, t) -> `FType (name, Subst.type_ sub t) ··· 846 850 in 847 851 let res = 848 852 match p with 853 + | `CoreType _ as c -> Ok c 849 854 | `Local id -> Error (`LocalType (env, id)) 850 855 | `Gpath p -> lookup_type_gpath env p 851 856 | `CanonicalType (t1, _) -> lookup_type env t1 ··· 998 1003 |> map_error (fun e -> `Parent (`Parent_module_type e)) 999 1004 >>= fun (p, m) -> Ok (`Substituted p, m) 1000 1005 1001 - and resolve_type : Env.t -> Cpath.non_core_type -> resolve_type_result = 1006 + and resolve_type : Env.t -> Cpath.type_ -> resolve_type_result = 1002 1007 fun env p -> 1003 1008 let result = 1004 1009 match p with ··· 1009 1014 handle_type_lookup env id parent parent_sig >>= fun (p', t') -> 1010 1015 let t = 1011 1016 match t' with 1017 + | `CoreType _ as c -> c 1012 1018 | `FClass (name, c) -> `FClass (name, Subst.class_ sub c) 1013 1019 | `FClassType (name, ct) -> `FClassType (name, Subst.class_type sub ct) 1014 1020 | `FType (name, t) -> `FType (name, Subst.type_ sub t) ··· 1046 1052 handle_type_lookup env id parent parent_sg >>= fun (p', t') -> 1047 1053 let t = 1048 1054 match t' with 1055 + | `CoreType _ as c -> c 1049 1056 | `FClass (name, c) -> `FClass (name, Subst.class_ sub c) 1050 1057 | `FClassType (name, ct) -> `FClassType (name, Subst.class_type sub ct) 1051 1058 | `FType (name, t) -> `FType (name, Subst.type_ sub t) ··· 1406 1413 | Some (rp, _) -> `Resolved Lang_of.(Path.resolved_module_type (empty ()) rp) 1407 1414 1408 1415 and handle_canonical_type env p2 = 1409 - let cp2 = Component.Of_Lang.(non_core_type_path (empty ()) p2) in 1416 + let cp2 = Component.Of_Lang.(type_path (empty ()) p2) in 1410 1417 let lang_of cpath = 1411 1418 (Lang_of.(Path.resolved_type (empty ()) cpath) 1412 1419 :> Odoc_model.Paths.Path.Resolved.t) ··· 1476 1483 fun env path -> 1477 1484 let result = 1478 1485 match path with 1479 - | `Gpath _ | `Local _ -> path 1486 + | `Gpath _ | `Local _ | `CoreType _ -> path 1480 1487 | `Substituted s -> `Substituted (reresolve_type env s) 1481 1488 | `CanonicalType (p1, p2) -> 1482 1489 `CanonicalType (reresolve_type env p1, handle_canonical_type env p2) ··· 2300 2307 match e with 2301 2308 | Signature s -> Some s 2302 2309 | Constr (p, _) -> ( 2303 - match resolve_type env (p :> Cpath.non_core_type) with 2310 + match resolve_type env (p :> Cpath.type_) with 2304 2311 | Ok (_, `FClass (_, c)) -> class_signature_of_class env c 2305 2312 | Ok (_, `FClassType (_, c)) -> class_signature_of_class_type env c 2306 2313 | _ -> None)
+2 -2
src/xref2/tools.mli
··· 98 98 99 99 val resolve_type : 100 100 Env.t -> 101 - Cpath.non_core_type -> 101 + Cpath.type_ -> 102 102 ( Cpath.Resolved.type_ * Find.careful_type, 103 103 simple_type_lookup_error ) 104 104 Result.result ··· 140 140 141 141 val resolve_type_path : 142 142 Env.t -> 143 - Cpath.non_core_type -> 143 + Cpath.type_ -> 144 144 (Cpath.Resolved.type_, simple_type_lookup_error) Result.result 145 145 146 146 val resolve_value_path :
+3 -1
test/xref2/classes.t/run.t
··· 136 136 { 137 137 "Constr": [ 138 138 { 139 - "`CoreType": "unit" 139 + "`Resolved": { 140 + "`CoreType": "unit" 141 + } 140 142 }, 141 143 [] 142 144 ]
+3 -1
test/xref2/deep_substitution.t/run.t
··· 46 46 "Some": { 47 47 "Constr": [ 48 48 { 49 - "`CoreType": "int" 49 + "`Resolved": { 50 + "`CoreType": "int" 51 + } 50 52 }, 51 53 [] 52 54 ]
+2 -1
test/xref2/lib/common.cppo.ml
··· 582 582 | `Hidden _ 583 583 | `SubstitutedT _ 584 584 | `SubstitutedMT _ 585 + | `CoreType _ 585 586 | `Substituted _ 586 587 | `SubstitutedCT _ 587 588 | `Canonical _ -> Format.fprintf ppf "unimplemented resolved_path" ··· 598 599 | `DotT (parent,s) -> Format.fprintf ppf "%a.%a" path (parent :> Odoc_model.Paths.Path.t) TypeName.fmt s 599 600 | `DotV (parent,s) -> Format.fprintf ppf "%a.%a" path (parent :> Odoc_model.Paths.Path.t) ValueName.fmt s 600 601 | `Apply (func,arg) -> Format.fprintf ppf "%a(%a)" path (func :> Odoc_model.Paths.Path.t) path (arg :> Odoc_model.Paths.Path.t) 601 - | `SubstitutedT _|`SubstitutedMT _|`Substituted _|`SubstitutedCT _ | `CoreType _ -> Format.fprintf ppf "Unimplemented path" 602 + | `SubstitutedT _|`SubstitutedMT _|`Substituted _|`SubstitutedCT _ -> Format.fprintf ppf "Unimplemented path" 602 603 603 604 and model_fragment ppf (f : Odoc_model.Paths.Fragment.t) = 604 605 match f with
+4 -4
test/xref2/subst/test.md
··· 141 141 module ComplexTypeExpr/19 : 142 142 sig 143 143 type t/28 144 - include r(Monad/21) with [resolved(root(Monad/21).t) = ([int * a] resolved(t/28) * [a * int] resolved(t/28))] 144 + include r(Monad/21) with [resolved(root(Monad/21).t) = ([resolved(int) * a] resolved(t/28) * [a * resolved(int)] resolved(t/28))] 145 145 (sig : 146 - val map/29 : (([int * a] resolved(t/28) * [a * int] resolved(t/28))) -> ((a) -> b) -> ([int * b] resolved(t/28) * [b * int] resolved(t/28)) 147 - val join/30 : (([int * ([int * a] resolved(t/28) * [a * int] resolved(t/28))] resolved(t/28) * [([int * a] resolved(t/28) * [a * int] resolved(t/28)) * int] resolved(t/28))) -> ([int * a] resolved(t/28) * [a * int] resolved(t/28)) 148 - (removed=type (a) t = (([int * a] local(t/28,false) * [a * int] local(t/28,false)))) 146 + val map/29 : (([resolved(int) * a] resolved(t/28) * [a * resolved(int)] resolved(t/28))) -> ((a) -> b) -> ([resolved(int) * b] resolved(t/28) * [b * resolved(int)] resolved(t/28)) 147 + val join/30 : (([resolved(int) * ([resolved(int) * a] resolved(t/28) * [a * resolved(int)] resolved(t/28))] resolved(t/28) * [([resolved(int) * a] resolved(t/28) * [a * resolved(int)] resolved(t/28)) * resolved(int)] resolved(t/28))) -> ([resolved(int) * a] resolved(t/28) * [a * resolved(int)] resolved(t/28)) 148 + (removed=type (a) t = (([resolved(int) * a] local(t/28,false) * [a * resolved(int)] local(t/28,false)))) 149 149 end) 150 150 end (canonical=None) 151 151 module Erase/18 :