anchor.diff:                ; NBETerm.as_iarg (NBETerm.type_of ea) ])
       in
       let unembed_result (t:NBET.t) : option<__result<'a>> =
  -        None
  -        (* unembed e_result (readback cfg t) *)
  +        match t with
  +        | NBETerm.FV (fv, _, [_t; (a, _); (ps, _)]) when S.fv_eq_lid fv fstar_tactics_Success_lid ->
  +            BU.bind_opt (NBETerm.unembed ea a) (fun a ->
  +            BU.bind_opt (NBETerm.unembed e_proofstate_nbe ps) (fun ps ->
  +            Some (Success (a, ps))))
  +
  +        | NBETerm.FV (fv, _, [_t; (msg, _); (ps, _)]) when S.fv_eq_lid fv fstar_tactics_Failed_lid ->
  +            BU.bind_opt (NBETerm.unembed NBETerm.e_string msg) (fun msg ->
  +            BU.bind_opt (NBETerm.unembed e_proofstate_nbe ps) (fun ps ->
  +            Some (Failed (msg, ps))))
  +        | _ ->
  +            None
       in
       { NBETerm.em = embed_result
       ; NBETerm.un = unembed_result
  
positive.code:         failwith "e_guard_policy_nbe"
      in
      let unembed_guard_policy (t:NBET.t) : option<guard_policy> =
          None
      in
      { NBETerm.em = embed_guard_policy
      ; NBETerm.un = unembed_guard_policy
  
negative.code:         failwith "e_direction_nbe"
      in
      let unembed_direction (t:NBET.t) : option<direction> =
          match t with
          | NBETerm.FV (fv, _, []) when S.fv_eq_lid fv fstar_tactics_topdown_lid -> Some TopDown
          | NBETerm.FV (fv, _, []) when S.fv_eq_lid fv fstar_tactics_bottomup_lid -> Some BottomUp
          | _ ->
              Err.log_issue Range.dummyRange (Err.Warning_NotEmbedded, (BU.format1 "Not an embedded direction: %s" (NBETerm.t_to_string t)));
              None
      in
      { NBETerm.em = embed_direction
      ; NBETerm.un = unembed_direction
  