File tree 4 files changed +24
-0
lines changed
4 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 20
20
21
21
- Remove unnecessary require and import statements when using dynamic imports. https://github.com/rescript-lang/rescript-compiler/pull/6232
22
22
- Fix option unboxing logic in the presence of untagged variants. https://github.com/rescript-lang/rescript-compiler/pull/6233
23
+ - Fix printing of local module with type. https://github.com/rescript-lang/rescript-compiler/issues/6212
23
24
24
25
#### :nail_care : Polish
25
26
Original file line number Diff line number Diff line change @@ -4965,6 +4965,15 @@ and printExpressionBlock ~state ~braces expr cmtTbl =
4965
4965
let doc = Doc. text modName.txt in
4966
4966
printComments doc cmtTbl modName.loc
4967
4967
in
4968
+ let name, modExpr =
4969
+ match modExpr.pmod_desc with
4970
+ | Pmod_constraint (modExpr , modType ) ->
4971
+ let name =
4972
+ Doc. concat [name; Doc. text " : " ; printModType ~state modType cmtTbl]
4973
+ in
4974
+ (name, modExpr)
4975
+ | _ -> (name, modExpr)
4976
+ in
4968
4977
let letModuleDoc =
4969
4978
Doc. concat
4970
4979
[
Original file line number Diff line number Diff line change @@ -15,3 +15,10 @@ module Empty = {/* test */}
15
15
module EmptyModule = {
16
16
/* TODO: management on vacation */
17
17
}
18
+
19
+ module type T = {}
20
+
21
+ let g = {
22
+ module M: T = {}
23
+ 0
24
+ }
Original file line number Diff line number Diff line change @@ -15,3 +15,10 @@ module Empty = {/* test */}
15
15
module EmptyModule = {
16
16
/* TODO: management on vacation */
17
17
}
18
+
19
+ module type T = {}
20
+
21
+ let g = {
22
+ module M : T = {}
23
+ 0
24
+ }
You can’t perform that action at this time.
0 commit comments