Skip to content

Commit 18ddbc8

Browse files
committed
Strengthen _all_ modules
Not just the ones that weren't already aliases
1 parent d929f7c commit 18ddbc8

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/xref2/strengthen.ml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,15 @@ let rec signature :
2525
List.fold_left
2626
(fun (items, s) item ->
2727
match item with
28-
| Module (id, r, m) -> (
28+
| Module (id, r, m) ->
2929
let name = Ident.Name.module_ id in
3030
let canonical =
3131
match canonical with
3232
| Some p -> Some (`Dot (p, name))
3333
| None -> None
3434
in
35-
match module_ ?canonical (`Dot (prefix, name)) (get m) with
36-
| None -> (item :: items, s)
37-
| Some m' -> (Module (id, r, put (fun () -> m')) :: items, id :: s))
35+
let m' = module_ ?canonical (`Dot (prefix, name)) (get m) in
36+
(Module (id, r, put (fun () -> m')) :: items, id :: s)
3837
| ModuleType (id, mt) ->
3938
( ModuleType
4039
( id,
@@ -70,11 +69,8 @@ and module_ :
7069
?canonical:Cpath.module_ ->
7170
Cpath.module_ ->
7271
Component.Module.t ->
73-
Component.Module.t option =
74-
fun ?canonical prefix m ->
75-
match m.type_ with
76-
| Alias _ -> None
77-
| ModuleType _ -> Some { m with canonical; type_ = Alias (prefix, None) }
72+
Component.Module.t =
73+
fun ?canonical prefix m -> { m with canonical; type_ = Alias (prefix, None) }
7874

7975
(* nuke the expansion as this could otherwise lead to inconsistencies - e.g. 'AlreadyASig' *)
8076
and module_type :

0 commit comments

Comments
 (0)