Skip to content

Commit ee6ae24

Browse files
committed
remove Belt prefix
1 parent 385ecc8 commit ee6ae24

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

compiler/ml/error_message_utils.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ let print_extra_type_clash_help ~extract_concrete_typedecl ~env loc ppf
155155
you cannot %s a float and an int without converting between the two.\n\n\
156156
\ Possible solutions:\n\
157157
\ - Ensure all values in this calculation has the type @{<info>%s@}. \
158-
You can convert between floats and ints via \
159-
@{<info>Belt.Float.toInt@} and @{<info>Belt.Int.fromFloat@}."
158+
You can convert between floats and ints via @{<info>Float.toInt@} and \
159+
@{<info>Int.fromFloat@}."
160160
operator_text
161161
(if for_float then "float" else "int"));
162162
match (is_constant, bottom_aliases) with
@@ -204,7 +204,7 @@ let print_extra_type_clash_help ~extract_concrete_typedecl ~env loc ppf
204204
"\n\n\
205205
\ Possible solutions:\n\
206206
\ - Unwrap the option to its underlying value using \
207-
`yourValue->Belt.Option.getWithDefault(someDefaultValue)`"
207+
`yourValue->Option.getOr(someDefaultValue)`"
208208
| Some ComparisonOperator, _ ->
209209
fprintf ppf "\n\n You can only compare things of the same type."
210210
| Some ArrayValue, _ ->

tests/build_tests/super_errors/expected/math_operator_float.res.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
Floats and ints have their own mathematical operators. This means you cannot add a float and an int without converting between the two.
1414

1515
Possible solutions:
16-
- Ensure all values in this calculation has the type float. You can convert between floats and ints via Belt.Float.toInt and Belt.Int.fromFloat.
16+
- Ensure all values in this calculation has the type float. You can convert between floats and ints via Float.toInt and Int.fromFloat.
1717
- Change the operator to +, which works on int
1818

1919
You can convert int to float with Int.toFloat.

tests/build_tests/super_errors/expected/primitives7.res.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
Floats and ints have their own mathematical operators. This means you cannot add a float and an int without converting between the two.
1414

1515
Possible solutions:
16-
- Ensure all values in this calculation has the type float. You can convert between floats and ints via Belt.Float.toInt and Belt.Int.fromFloat.
16+
- Ensure all values in this calculation has the type float. You can convert between floats and ints via Float.toInt and Int.fromFloat.
1717
- Change the operator to +, which works on int
1818

1919
You can convert int to float with Int.toFloat.

0 commit comments

Comments
 (0)