anchor.diff:                  let when_opt, f_when = match when_opt with
                       | None -> None, E_PURE
                       | Some w -> 
  -                        let w, f_w, t_w = synth_exp env w in
  +                        let w, f_w, t_w = synth_term env w in
                           let w = maybe_coerce env w t_w ml_bool_ty in
                           Some w, f_w in
  -                let mlbranch, f_branch, t_branch = synth_exp env branch in
  +                let mlbranch, f_branch, t_branch = synth_term env branch in
                   //Printf.printf "Extracted %s to %A\n" (Print.exp_to_string branch) mlbranch;
                   p |> List.map (fun (p, wopt) -> 
                       let when_clause = conjoin_opt wopt when_opt in
  
positive.code:             else e in
      (e, f, ty)
  
  let maybe_coerce (g:env) e ty (expect:mlty) : mlexpr  =
      let ty = eraseTypeDeep g ty in
      match type_leq_c g (Some e) ty expect with 
  
negative.code:     fail t.pos (Util.format3 "for expression %s, Expected effect %s; got effect %s" (Print.term_to_string t) (eff_to_string f0) (eff_to_string f1))
  
  (********************************************************************************************)
  (* Basic syntactic opeartions on a term                                                     *)
  (********************************************************************************************)
  let is_constructor t = match (SS.compress t).n with
      | Tm_fvar ({fv_qual=Some Data_ctor})
  