Skip to content

Remove some unused syntax error cases #7427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions compiler/frontend/bs_syntaxerr.ml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,12 @@ type error =
| Expect_string_literal
| Expect_int_or_string_or_json_literal
| Unhandled_poly_type
| Unregistered of string
| Invalid_underscore_type_in_external
| Invalid_bs_string_type
| Invalid_bs_int_type
| Invalid_bs_unwrap_type
| Conflict_ffi_attribute of string
| Not_supported_in_bs_deriving
| Canot_infer_arity_by_syntax
| Illegal_attribute
| Inconsistent_arity of int * int
(* we still rqeuire users to have explicit annotation to avoid
{[ (((int -> int) -> int) -> int )]}
*)
Expand All @@ -66,12 +62,6 @@ let pp_error fmt err =
syntax wise `_ option` for safety"
| Not_supported_directive_in_bs_return -> "Not supported return directive"
| Illegal_attribute -> "Illegal attributes"
| Canot_infer_arity_by_syntax ->
"Cannot infer the arity through the syntax, either [%@uncurry n] or \n\
write it in arrow syntax "
| Inconsistent_arity (arity, n) ->
Printf.sprintf "Inconsistent arity %d vs %d" arity n
| Not_supported_in_bs_deriving -> "not supported in deriving"
| Unsupported_predicates -> "unsupported predicates"
| Conflict_bs_bs_this_bs_meth ->
"%@this, %@bs, %@meth can not be applied at the same time"
Expand All @@ -82,7 +72,6 @@ let pp_error fmt err =
| Expect_int_or_string_or_json_literal ->
"expect int, string literal or json literal {json|text here|json} "
| Unhandled_poly_type -> "Unhandled poly type"
| Unregistered str -> "Unregistered " ^ str
| Invalid_underscore_type_in_external ->
"_ is not allowed in combination with external optional type"
| Invalid_bs_string_type -> "Not a valid type for %@string"
Expand Down
4 changes: 0 additions & 4 deletions compiler/frontend/bs_syntaxerr.mli
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,12 @@ type error =
| Expect_string_literal
| Expect_int_or_string_or_json_literal
| Unhandled_poly_type
| Unregistered of string
| Invalid_underscore_type_in_external
| Invalid_bs_string_type
| Invalid_bs_int_type
| Invalid_bs_unwrap_type
| Conflict_ffi_attribute of string
| Not_supported_in_bs_deriving
| Canot_infer_arity_by_syntax
| Illegal_attribute
| Inconsistent_arity of int * int
(* we still rqeuire users to have explicit annotation to avoid
{[ (((int -> int) -> int) -> int )]}
*)
Expand Down
Loading