mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-17 06:47:17 +00:00
Replace some switches with if-then-elses.
Estimated hours taken: 0.5 Branches: main compiler/cse_detection.m: compiler/module_qual.m: compiler/simplify.m: compiler/switch_detection.m: compiler/unused_args.m: Replace some switches with if-then-elses. Minor formatting improvements, break overlong lines etc.
This commit is contained in:
@@ -593,9 +593,13 @@ construct_common_unify(Var, hlds_goal(GoalExpr0, GoalInfo), !CseInfo,
|
||||
Unif0 = deconstruct(_, Consid, Args, Submodes, CanFail, CanCGC)
|
||||
->
|
||||
Unif = deconstruct(Var, Consid, Args, Submodes, CanFail, CanCGC),
|
||||
( RHS = rhs_functor(_, _, _) ->
|
||||
(
|
||||
RHS = rhs_functor(_, _, _),
|
||||
GoalExpr1 = unify(Var, RHS, Umode, Unif, Ucontext)
|
||||
;
|
||||
( RHS = rhs_var(_)
|
||||
; RHS = rhs_lambda_goal(_, _, _, _, _, _, _, _)
|
||||
),
|
||||
unexpected(this_file,
|
||||
"non-functor unify in construct_common_unify")
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user