Skip to content

Commit

Permalink
chore: Remove longer lines
Browse files Browse the repository at this point in the history
  • Loading branch information
xvw committed Apr 9, 2024
1 parent 99f9546 commit 4a77f67
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/analysis/destruct.ml
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,8 @@ let destruct_expression loc config source parents expr =
let refine_partial_match last_case_loc config source patterns =
let cases = List.map patterns ~f:(fun (pat, unmangling_tables) ->
(* Unmangling and prefixing *)
let pat = qualify_constructors ~unmangling_tables Printtyp.shorten_type_path pat in
let pat =
qualify_constructors ~unmangling_tables Printtyp.shorten_type_path pat in
(* Untyping and casing *)
let ppat = filter_pat_attr (Untypeast.untype_pattern pat) in
Ast_helper.Exp.case ppat placeholder
Expand All @@ -552,7 +553,8 @@ let refine_current_pattern patt config source parents generated_pattern =
let str = print_pretty ?punned_field config source (Pretty_pattern ppat) in
patt.Typedtree.pat_loc, str

let refine_and_generate_branches patt config source (patterns : Typedtree.pattern list) sub_patterns =
let refine_and_generate_branches patt config source
(patterns : Typedtree.pattern list) sub_patterns =
let rev_before, after, top_patt = find_branch patterns patt in
let new_branches =
List.map sub_patterns ~f:(fun by -> subst_patt patt ~by top_patt)
Expand Down Expand Up @@ -607,7 +609,12 @@ let destruct_pattern
in
let pss = List.map patterns ~f:(fun x -> [ x ]) in
let m, e_typ = get_match parents in
let pred = Typecore.partial_pred ~lev:Btype.generic_level m.Typedtree.exp_env e_typ in
let pred =
Typecore.partial_pred
~lev:Btype.generic_level
m.Typedtree.exp_env
e_typ
in
match Parmatch.complete_partial ~pred pss with
| [] ->
(* The match is already complete, we try to refine it *)
Expand Down

0 comments on commit 4a77f67

Please sign in to comment.