Skip to content

Commit e771ce5

Browse files
committed
Fix longident formatter
And run build to generate changes to the other sources.
1 parent 55395d4 commit e771ce5

File tree

4 files changed

+30
-14
lines changed

4 files changed

+30
-14
lines changed

jscomp/super_errors/super_typetexp.ml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ let report_error env ppf = function
114114
@]@,\
115115
- @[Constructors and modules are both capitalized.@ Did you want the latter?@ Then instead of @{<dim>let foo = Bar@}, try @{<info>module Foo = Bar@}.@]\
116116
@]"
117-
longident lid lid lid;
117+
longident lid
118+
longident lid
119+
longident lid;
118120
Typetexp.spellcheck ppf fold_constructors env lid
119121
| Unbound_label lid ->
120122
(* modified *)
@@ -124,7 +126,9 @@ let report_error env ppf = function
124126
@[- Prefixing it with said module name:@ @{<info>TheModule.%a@}@]@,\
125127
@[- Or specifying its type:@ @{<info>let theValue: TheModule.theType = {%a: VALUE}@}@]\
126128
@]"
127-
longident lid lid lid;
129+
longident lid
130+
longident lid
131+
longident lid;
128132
Typetexp.spellcheck ppf fold_labels env lid
129133
| anythingElse ->
130134
Typetexp.report_error env ppf anythingElse

lib/4.06.1/unstable/js_compiler.ml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -411935,21 +411935,25 @@ let report_error env ppf = function
411935411935
fprintf ppf "@[<v>\
411936411936
@{<info>The variant constructor %a can't be found.@}@,@,\
411937411937
@[<v 2>- If it's defined in another module or file, bring it into scope by:@,\
411938-
@[- Annotating it with said module name:@ @{<info>let food = MyModule.Apple@}@]@,\
411939-
@[- Or specifying its type:@ @{<info>let food: MyModule.fruit = Apple@}@]\
411938+
@[- Prefixing it with said module name:@ @{<info>TheModule.%a@}@]@,\
411939+
@[- Or specifying its type:@ @{<info>let theValue: TheModule.theType = %a@}@]\
411940411940
@]@,\
411941411941
- @[Constructors and modules are both capitalized.@ Did you want the latter?@ Then instead of @{<dim>let foo = Bar@}, try @{<info>module Foo = Bar@}.@]\
411942411942
@]"
411943+
longident lid
411944+
longident lid
411943411945
longident lid;
411944411946
Typetexp.spellcheck ppf fold_constructors env lid
411945411947
| Unbound_label lid ->
411946411948
(* modified *)
411947411949
fprintf ppf "@[<v>\
411948411950
@{<info>The record field %a can't be found.@}@,@,\
411949411951
If it's defined in another module or file, bring it into scope by:@,\
411950-
@[- Annotating it with said module name:@ @{<info>let baby = {MyModule.age: 3}@}@]@,\
411951-
@[- Or specifying its type:@ @{<info>let baby: MyModule.person = {age: 3}@}@]\
411952+
@[- Prefixing it with said module name:@ @{<info>TheModule.%a@}@]@,\
411953+
@[- Or specifying its type:@ @{<info>let theValue: TheModule.theType = {%a: VALUE}@}@]\
411952411954
@]"
411955+
longident lid
411956+
longident lid
411953411957
longident lid;
411954411958
Typetexp.spellcheck ppf fold_labels env lid
411955411959
| anythingElse ->

lib/4.06.1/unstable/js_refmt_compiler.ml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -572031,21 +572031,25 @@ let report_error env ppf = function
572031572031
fprintf ppf "@[<v>\
572032572032
@{<info>The variant constructor %a can't be found.@}@,@,\
572033572033
@[<v 2>- If it's defined in another module or file, bring it into scope by:@,\
572034-
@[- Annotating it with said module name:@ @{<info>let food = MyModule.Apple@}@]@,\
572035-
@[- Or specifying its type:@ @{<info>let food: MyModule.fruit = Apple@}@]\
572034+
@[- Prefixing it with said module name:@ @{<info>TheModule.%a@}@]@,\
572035+
@[- Or specifying its type:@ @{<info>let theValue: TheModule.theType = %a@}@]\
572036572036
@]@,\
572037572037
- @[Constructors and modules are both capitalized.@ Did you want the latter?@ Then instead of @{<dim>let foo = Bar@}, try @{<info>module Foo = Bar@}.@]\
572038572038
@]"
572039+
longident lid
572040+
longident lid
572039572041
longident lid;
572040572042
Typetexp.spellcheck ppf fold_constructors env lid
572041572043
| Unbound_label lid ->
572042572044
(* modified *)
572043572045
fprintf ppf "@[<v>\
572044572046
@{<info>The record field %a can't be found.@}@,@,\
572045572047
If it's defined in another module or file, bring it into scope by:@,\
572046-
@[- Annotating it with said module name:@ @{<info>let baby = {MyModule.age: 3}@}@]@,\
572047-
@[- Or specifying its type:@ @{<info>let baby: MyModule.person = {age: 3}@}@]\
572048+
@[- Prefixing it with said module name:@ @{<info>TheModule.%a@}@]@,\
572049+
@[- Or specifying its type:@ @{<info>let theValue: TheModule.theType = {%a: VALUE}@}@]\
572048572050
@]"
572051+
longident lid
572052+
longident lid
572049572053
longident lid;
572050572054
Typetexp.spellcheck ppf fold_labels env lid
572051572055
| anythingElse ->

lib/4.06.1/whole_compiler.ml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -419253,21 +419253,25 @@ let report_error env ppf = function
419253419253
fprintf ppf "@[<v>\
419254419254
@{<info>The variant constructor %a can't be found.@}@,@,\
419255419255
@[<v 2>- If it's defined in another module or file, bring it into scope by:@,\
419256-
@[- Annotating it with said module name:@ @{<info>let food = MyModule.Apple@}@]@,\
419257-
@[- Or specifying its type:@ @{<info>let food: MyModule.fruit = Apple@}@]\
419256+
@[- Prefixing it with said module name:@ @{<info>TheModule.%a@}@]@,\
419257+
@[- Or specifying its type:@ @{<info>let theValue: TheModule.theType = %a@}@]\
419258419258
@]@,\
419259419259
- @[Constructors and modules are both capitalized.@ Did you want the latter?@ Then instead of @{<dim>let foo = Bar@}, try @{<info>module Foo = Bar@}.@]\
419260419260
@]"
419261+
longident lid
419262+
longident lid
419261419263
longident lid;
419262419264
Typetexp.spellcheck ppf fold_constructors env lid
419263419265
| Unbound_label lid ->
419264419266
(* modified *)
419265419267
fprintf ppf "@[<v>\
419266419268
@{<info>The record field %a can't be found.@}@,@,\
419267419269
If it's defined in another module or file, bring it into scope by:@,\
419268-
@[- Annotating it with said module name:@ @{<info>let baby = {MyModule.age: 3}@}@]@,\
419269-
@[- Or specifying its type:@ @{<info>let baby: MyModule.person = {age: 3}@}@]\
419270+
@[- Prefixing it with said module name:@ @{<info>TheModule.%a@}@]@,\
419271+
@[- Or specifying its type:@ @{<info>let theValue: TheModule.theType = {%a: VALUE}@}@]\
419270419272
@]"
419273+
longident lid
419274+
longident lid
419271419275
longident lid;
419272419276
Typetexp.spellcheck ppf fold_labels env lid
419273419277
| anythingElse ->

0 commit comments

Comments
 (0)