anchor.diff:        // When resugaring it will be just a normal (explicitly bound) variable.
         begin match string_to_op v.ppname.idText with
          | Some (op, _) -> mk (A.PatOp (Ident.mk_ident (op, v.ppname.idRange)))
  -       | None ->
  -         let var_used_in_branch = Util.set_mem v branch_bv in
  -         mk (if not var_used_in_branch then A.PatWild
  -             else A.PatVar (bv_as_unique_ident v, to_arg_qual imp_opt))
  +       | None -> resugar_bv_as_pat' v (to_arg_qual imp_opt) branch_bv None
         end
   
       | Pat_wild _ -> mk (A.PatWild)
   
       | Pat_dot_term (bv, term) ->
         (* TODO : this should never be resugared unless in a comment *)
  -      let pat = mk (A.PatVar(bv_as_unique_ident bv, Some A.Implicit)) in
  -      if Options.print_bound_var_types() then
  -        mk (A.PatAscribed(pat, resugar_term term))
  -      else
  -        pat
  +      resugar_bv_as_pat' bv (Some A.Implicit) branch_bv (Some term)
     in
     aux p None
   
  
positive.code:         A.mk_binder (A.Annotated (bv_as_unique_ident x, e)) r A.Type_level imp
    end
  
  and resugar_bv_as_pat (x:S.bv) qual: option<A.pattern> =
    let mk a = A.mk_pattern a (S.range_of_bv x) in
    match (SS.compress x.sort).n with
    //| Tm_type U_unknown
    | Tm_unknown ->
      let i = String.compare x.ppname.idText I.reserved_prefix in
      if i = 0 then
        Some (mk (A.PatWild))
      else
        BU.bind_opt (resugar_arg_qual qual) (fun aq -> Some (mk (A.PatVar(bv_as_unique_ident x, aq))))
    | _ ->
      BU.bind_opt (resugar_arg_qual qual)
        begin fun aq ->
          let pat = mk (A.PatVar(bv_as_unique_ident x, aq)) in
          if Options.print_bound_var_types() then
            Some (mk (A.PatAscribed(pat, resugar_term x.sort)))
          else
            Some pat
        end
  
  and resugar_pat (p:S.pat) (branch_bv: set<bv>) : A.pattern =
    (* We lose information when desugar PatAscribed to able to resugar it back *)
  
negative.code:       let args = map2 fields args |> List.rev in
        mk (A.PatRecord(args))
  
      | Pat_cons (fv, args) ->
        resugar_plain_pat_cons fv args
  
  