message: combine all match branches into one
diff: @@ -281,7 +281,7 @@ impl<'interner, 'arena, 'env> Context<'interner, 'arena, 'env> {
  core::Const::Ref(number) => self.check_number_literal(number),
  },
  core::Term::ConstMatch(_span, head_expr, branches, default_expr) => {
  - if let Some((then_expr, else_expr)) = match_if_then_else(branches, default_expr) {
  + if let Some((then_expr, else_expr)) = match_if_then_else(branches, *default_expr) {
  let cond_expr = self.check(head_expr);
  let then_expr = self.check(then_expr);
  let else_expr = self.check(else_expr);
  @@ -600,7 +600,7 @@ impl<'interner, 'arena, 'env> Context<'interner, 'arena, 'env> {
  core::Const::Ref(number) => self.synth_number_literal(number, core::Prim::RefType),
  },
  core::Term::ConstMatch(_span, head_expr, branches, default_expr) => {
  - if let Some((then_expr, else_expr)) = match_if_then_else(branches, default_expr) {
  + if let Some((then_expr, else_expr)) = match_if_then_else(branches, *default_expr) {
  let cond_expr = self.check(head_expr);
  let then_expr = self.synth(then_expr);
  let else_expr = self.synth(else_expr);
  @@ -730,17 +730,13 @@ impl<'interner, 'arena, 'env> Context<'interner, 'arena, 'env> {
  fn match_if_then_else<'arena>(
  branches: &'arena [(Const, core::Term<'arena>)],
  - default_expr: &'arena Option<&core::Term<'arena>>,
  + default_expr: Option<&'arena core::Term<'arena>>,
  ) -> Option<(&'arena core::Term<'arena>, &'arena core::Term<'arena>)> {
  match (branches, default_expr) {
  - ([(Const::Bool(true), then_expr), (Const::Bool(false), else_expr)], None) => {
  - Some((then_expr, else_expr))
  - }
  - ([(Const::Bool(false), else_expr), (Const::Bool(true), then_expr)], None) => {
  - Some((then_expr, else_expr))
  - }
  - ([(Const::Bool(true), then_expr)], Some(else_expr)) => Some((then_expr, else_expr)),
  - ([(Const::Bool(false), else_expr)], Some(then_expr)) => Some((then_expr, else_expr)),
  + ([(Const::Bool(true), then_expr), (Const::Bool(false), else_expr)], None)
  + | ([(Const::Bool(false), else_expr), (Const::Bool(true), then_expr)], None)
  + | ([(Const::Bool(true), then_expr)], Some(else_expr))
  + | ([(Const::Bool(false), else_expr)], Some(then_expr)) => Some((then_expr, else_expr)),
  _ => None,
  }
  }
  