Opus 4.6 fixes or suppresses a bunch of warnings#4098
Open
Opus 4.6 fixes or suppresses a bunch of warnings#4098
Conversation
gebner
requested changes
Feb 6, 2026
| reduce (List.flatten docs) | ||
| (* -------------------------------------------------------------------- *) | ||
| let doc_of_mlmodule_r (fsharp : bool) (mod : mlmodule) : doc = | ||
| let rec p_sig (mod : mlmodule) = |
Contributor
There was a problem hiding this comment.
Removing unused code is one way of fixing a warning. 😄
| //NS: this assertion has been failing for a while in debug mode; not sure why | ||
| assert (task = fst (snd (List.hd !repl_stack))); | ||
| let current_task = fst (snd (List.hd !repl_stack)) in | ||
| assert (task = current_task); |
Contributor
There was a problem hiding this comment.
This adds useless code at runtime. Assert is a no-op in ML mode, lifting the code outside of the assert extracts it to OCaml and executes it at runtime.
| | Op (op_plus, [t1 ; t2]) -> | ||
| assert (Ident.string_of_id op_plus = "+") ; | ||
| let op_str = Ident.string_of_id op_plus in | ||
| assert (op_str = "+") ; |
| | Var max_lid -> | ||
| assert (Ident.string_of_lid max_lid = "max") ; | ||
| let lid_str = Ident.string_of_lid max_lid in | ||
| assert (lid_str = "max") ; |
| let generalize' env (is_rec:bool) (lecs:list (lbname&term&comp)) : (list (lbname&univ_names&term&comp&list binder)) = | ||
| assert (List.for_all (fun (l, _, _) -> Inr? l) lecs); //only generalize top-level lets | ||
| let all_top = List.for_all (fun (l, _, _) -> Inr? l) lecs in | ||
| assert all_top; //only generalize top-level lets |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.