Skip to content

Commit 1fd27ed

Browse files
committed
Update mdx tests to 5.3
1 parent b144155 commit 1fd27ed

File tree

3 files changed

+127
-63
lines changed

3 files changed

+127
-63
lines changed

src/xref2/paths.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -581,10 +581,14 @@ val sg : Odoc_model.Lang.Signature.t =
581581
ihash = 818126955;
582582
ikey =
583583
"r_Root.p"... (* string length 13; truncated *)},
584-
...);
585-
ihash = ...; ikey = ...};
586-
ihash = ...; ikey = ...},
587-
...);
584+
F);
585+
ihash = 748202139;
586+
ikey =
587+
"m_F.r_Ro"... (* string length 17; truncated *)};
588+
ihash = 709672416;
589+
ikey =
590+
"___resul"... (* string length 29; truncated *)},
591+
N);
588592
ihash = ...; ikey = ...};
589593
source_loc = ...; doc = ...; type_ = ...; canonical = ...;
590594
hidden = ...});

src/xref2/test.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ we look up `A` from the environment:
618618
let sg = get_ok @@ Tools.expansion_of_module env (Component.Delayed.get m) in
619619
Tools.prefix_signature (`Module p, sg);;
620620
Line 4, characters 38-40:
621-
Error: This expression has type Tools.expansion
621+
Error: The value sg has type Tools.expansion
622622
but an expression was expected of type Component.Signature.t
623623
```
624624

test/xref2/resolve/test.md

Lines changed: 118 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -527,14 +527,22 @@ Basic resolution 3, module type:
527527
Root);
528528
ihash = 818126955; ikey = "r_Root.p_None"},
529529
u);
530-
ihash = 15973539;
531-
ikey = "t_u.r_Root.p_"... (* string length 17; truncated *)};
530+
ihash = 15973539; ikey = "t_u.r_Root.p_None"};
532531
source_loc = None;
533532
doc = {Odoc_model__.Comment.elements = []; suppress_warnings = false};
534533
canonical = None;
535534
equation =
536535
{Odoc_model.Lang.TypeDecl.Equation.params = []; private_ = false;
537-
manifest = Some (Odoc_model.Lang.TypeExpr.Constr (...));
536+
manifest =
537+
Some
538+
(Odoc_model.Lang.TypeExpr.Constr
539+
(`Resolved
540+
(`Type
541+
(`Identifier
542+
{Odoc_model__Paths_types.iv = ...; ihash = ...;
543+
ikey = ...},
544+
...)),
545+
...));
538546
constraints = ...};
539547
representation = ...});
540548
...];
@@ -732,26 +740,32 @@ Basic resolution 4, module type:
732740
({Odoc_model__Paths_types.iv =
733741
`Module
734742
({Odoc_model__Paths_types.iv =
735-
`Root ...; ihash = ...;
736-
ikey = ...},
737-
...);
738-
ihash = ...; ikey = ...},
739-
...);
740-
ihash = ...; ikey = ...},
741-
...);
742-
ihash = ...; ikey = ...};
743-
source_loc = ...; doc = ...; canonical = ...;
744-
equation = ...; representation = ...});
745-
...];
746-
compiled = ...; removed = ...; doc = ...});
747-
canonical = ...; hidden = ...});
748-
...];
749-
compiled = ...; removed = ...; doc = ...});
750-
p_path = ...});
751-
canonical = ...; hidden = ...});
752-
...];
753-
compiled = ...; removed = ...; doc = ...};
754-
expansion = ...; linked = ...; source_loc = ...; canonical = ...}
743+
`Root
744+
(Some
745+
{Odoc_model__Paths_types.iv
746+
= `Page (None, ...);
747+
ihash = ...;
748+
ikey = ...},
749+
...);
750+
ihash = ...; ikey = ...},
751+
...);
752+
ihash = ...; ikey = ...},
753+
...);
754+
ihash = ...; ikey = ...},
755+
...);
756+
ihash = ...; ikey = ...};
757+
source_loc = ...; doc = ...; canonical = ...;
758+
equation = ...; representation = ...});
759+
...];
760+
compiled = ...; removed = ...; doc = ...});
761+
canonical = ...; hidden = ...});
762+
...];
763+
compiled = ...; removed = ...; doc = ...});
764+
p_path = ...});
765+
canonical = ...; hidden = ...});
766+
...];
767+
compiled = ...; removed = ...; doc = ...};
768+
expansion = ...; linked = ...; source_loc = ...; canonical = ...}
755769
```
756770

757771
This example is rather more interesting:
@@ -974,8 +988,7 @@ and then we can look up the type `t`.
974988
ikey = "m_B.mt_M.r_Root.p_None"},
975989
t);
976990
ihash = 484865120;
977-
ikey =
978-
"t_t.m_B.mt_M.r_Root.p_No"... (* string length 26; truncated *)};
991+
ikey = "t_t.m_B.mt_M.r_Root.p_None"};
979992
source_loc = None;
980993
doc =
981994
{Odoc_model__.Comment.elements = [];
@@ -991,13 +1004,21 @@ and then we can look up the type `t`.
9911004
doc =
9921005
{Odoc_model__.Comment.elements = [];
9931006
suppress_warnings = false}});
994-
p_path = `Resolved (`Identifier ...)});
995-
canonical = ...; hidden = ...});
996-
...];
997-
compiled = ...; removed = ...; doc = ...})};
998-
...];
999-
compiled = ...; removed = ...; doc = ...};
1000-
expansion = ...; linked = ...; source_loc = ...; canonical = ...}
1007+
p_path =
1008+
`Resolved
1009+
(`Identifier
1010+
{Odoc_model__Paths_types.iv =
1011+
`ModuleType
1012+
({Odoc_model__Paths_types.iv = ...;
1013+
ihash = ...; ikey = ...},
1014+
...);
1015+
ihash = ...; ikey = ...})});
1016+
canonical = ...; hidden = ...});
1017+
...];
1018+
compiled = ...; removed = ...; doc = ...})};
1019+
...];
1020+
compiled = ...; removed = ...; doc = ...};
1021+
expansion = ...; linked = ...; source_loc = ...; canonical = ...}
10011022
```
10021023

10031024
```ocaml
@@ -1188,7 +1209,17 @@ and then we can look up the type `t`.
11881209
{Odoc_model__Paths_types.iv =
11891210
`Type
11901211
({Odoc_model__Paths_types.iv =
1191-
`Module (...);
1212+
`Module
1213+
({Odoc_model__Paths_types.iv
1214+
=
1215+
`Module
1216+
({Odoc_model__Paths_types.iv
1217+
= ...;
1218+
ihash = ...;
1219+
ikey = ...},
1220+
...);
1221+
ihash = ...; ikey = ...},
1222+
...);
11921223
ihash = ...; ikey = ...},
11931224
...);
11941225
ihash = ...; ikey = ...};
@@ -1388,11 +1419,13 @@ Ensure a substitution is taken into account during resolution:
13881419
(Some
13891420
{Odoc_model__Paths_types.iv = `Page (None, None);
13901421
ihash = 236059787; ikey = "p_None"},
1391-
...);
1392-
ihash = ...; ikey = ...},
1393-
...);
1394-
ihash = ...; ikey = ...};
1395-
source_loc = ...; doc = ...; type_ = ...; canonical = ...;
1422+
Root);
1423+
ihash = 818126955;
1424+
ikey = "r_Root.p"... (* string length 13; truncated *)},
1425+
B);
1426+
ihash = 814134997;
1427+
ikey = "m_B.r_Ro"... (* string length 17; truncated *)};
1428+
source_loc = None; doc = ...; type_ = ...; canonical = ...;
13961429
hidden = ...});
13971430
...];
13981431
compiled = ...; removed = ...; doc = ...};
@@ -1578,11 +1611,13 @@ Ensure a destructive substitution is taken into account during resolution:
15781611
(Some
15791612
{Odoc_model__Paths_types.iv = `Page (None, None);
15801613
ihash = 236059787; ikey = "p_None"},
1581-
...);
1582-
ihash = ...; ikey = ...},
1583-
...);
1584-
ihash = ...; ikey = ...};
1585-
source_loc = ...; doc = ...; type_ = ...; canonical = ...;
1614+
Root);
1615+
ihash = 818126955;
1616+
ikey = "r_Root.p"... (* string length 13; truncated *)},
1617+
B);
1618+
ihash = 814134997;
1619+
ikey = "m_B.r_Ro"... (* string length 17; truncated *)};
1620+
source_loc = None; doc = ...; type_ = ...; canonical = ...;
15861621
hidden = ...});
15871622
...];
15881623
compiled = ...; removed = ...; doc = ...};
@@ -1743,10 +1778,14 @@ Resolve a module alias:
17431778
`Page (None, None);
17441779
ihash = 236059787; ikey = "p_None"},
17451780
Root);
1746-
ihash = ...; ikey = ...},
1747-
...);
1748-
ihash = ...; ikey = ...},
1749-
...)),
1781+
ihash = 818126955;
1782+
ikey =
1783+
"r_Root.p"... (* string length 13; truncated *)},
1784+
B);
1785+
ihash = 814134997;
1786+
ikey =
1787+
"m_B.r_Ro"... (* string length 17; truncated *)},
1788+
false)),
17501789
...)),
17511790
...));
17521791
constraints = ...};
@@ -1908,13 +1947,16 @@ Resolve a module alias:
19081947
Root);
19091948
ihash = 818126955;
19101949
ikey =
1911-
"r_Root.p"... (* string length 13; truncated *)},
1950+
"r_Root.p_No"... (* string length 13; truncated *)},
19121951
B);
19131952
ihash = 814134997;
19141953
ikey = "m_B.r_Ro"... (* string length 17; truncated *)},
19151954
false))),
19161955
None);
1917-
canonical = ...; hidden = ...});
1956+
canonical = None; hidden = false});
1957+
Odoc_model.Lang.Signature.Type (Odoc_model.Lang.Signature.Ordinary,
1958+
{Odoc_model.Lang.TypeDecl.id = ...; source_loc = ...; doc = ...;
1959+
canonical = ...; equation = ...; representation = ...});
19181960
...];
19191961
compiled = ...; removed = ...; doc = ...};
19201962
expansion = ...; linked = ...; source_loc = ...; canonical = ...}
@@ -2097,10 +2139,17 @@ Resolve a functor:
20972139
Root);
20982140
ihash = 818126955;
20992141
ikey =
2100-
"r_Root.p"... (* string length 13; truncated *)},
2142+
"r_Root.p_"... (* string length 13; truncated *)},
21012143
S);
2102-
ihash = 527535255; ikey = ...})}},
2103-
...));
2144+
ihash = 527535255;
2145+
ikey =
2146+
"mt_S.r_R"... (* string length 18; truncated *)})}},
2147+
Odoc_model.Lang.ModuleType.Functor
2148+
(Odoc_model.Lang.FunctorParameter.Named
2149+
{Odoc_model.Lang.FunctorParameter.id =
2150+
{Odoc_model__Paths_types.iv = ...; ihash = ...; ikey = ...};
2151+
expr = ...},
2152+
...)));
21042153
canonical = ...; hidden = ...});
21052154
...];
21062155
compiled = ...; removed = ...; doc = ...};
@@ -2307,10 +2356,18 @@ Resolve a functor:
23072356
Root);
23082357
ihash = 818126955;
23092358
ikey =
2310-
"r_Root.p"... (* string length 13; truncated *)},
2359+
"r_Root.p_"... (* string length 13; truncated *)},
23112360
S);
2312-
ihash = 527535255; ikey = ...})}},
2313-
...))};
2361+
ihash = 527535255;
2362+
ikey =
2363+
"mt_S.r_R"... (* string length 18; truncated *)})}},
2364+
Odoc_model.Lang.ModuleType.Path
2365+
{Odoc_model.Lang.ModuleType.p_expansion =
2366+
Some
2367+
(Odoc_model.Lang.ModuleType.Signature
2368+
{Odoc_model.Lang.Signature.items = [...]; compiled = ...;
2369+
removed = ...; doc = ...});
2370+
p_path = ...}))};
23142371
...];
23152372
compiled = ...; removed = ...; doc = ...};
23162373
expansion = ...; linked = ...; source_loc = ...; canonical = ...}
@@ -2524,14 +2581,17 @@ Functor app nightmare:
25242581
Type);
25252582
ihash = 359972898;
25262583
ikey =
2527-
"mt_Type.r_R"... (* string length 21; truncated *)})}},
2584+
"mt_Type.r_Root.p_N"... (* string length 21; truncated *)})}},
25282585
Odoc_model.Lang.ModuleType.Functor
25292586
(Odoc_model.Lang.FunctorParameter.Named
25302587
{Odoc_model.Lang.FunctorParameter.id =
25312588
{Odoc_model__Paths_types.iv =
25322589
`Parameter
2533-
({Odoc_model__Paths_types.iv = ...; ihash = ...;
2534-
ikey = ...},
2590+
({Odoc_model__Paths_types.iv =
2591+
`Result
2592+
{Odoc_model__Paths_types.iv = `Module (...);
2593+
ihash = ...; ikey = ...};
2594+
ihash = ...; ikey = ...},
25352595
...);
25362596
ihash = ...; ikey = ...};
25372597
expr = ...},

0 commit comments

Comments
 (0)