anchor.diff:          BU.format1 "lift_t tscheme %s is not an arrow with enough binders"
             (Print.tscheme_to_string lift_t)) (snd lift_t).pos in
   
  -  let args = (S.as_arg a)::((rest_bs |> List.map (fun _ -> S.as_arg S.unit_const))@[S.as_arg e]) in
  +  //reify the term
  +  //if the source effect does not have a repr (e.g. primitive) then we thunk it
  +  //in sync with how lifts are defined from such effects (with their thunked terms as arguments)
  +  let e_reified =
  +    match sub.source |> Env.get_effect_decl env |> (fun ed -> ed.repr) |> snd |> SS.compress with
  +    | { n = Tm_unknown } -> U.abs [S.null_binder S.t_unit] e None
  +    | _ -> reify_body env [Env.Inlining] e in
  +
  +  let args = (S.as_arg a)::((rest_bs |> List.map (fun _ -> S.as_arg S.unit_const))@[S.as_arg e_reified]) in
     mk (Tm_app (lift, args)) None e.pos
   
   let get_mlift_for_subeff env sub =
  
positive.code:     in
  
      ({ mlift_wp = sub.lift_wp |> must |> mk_mlift_wp;
         mlift_term = BU.map_opt sub.lift mk_mlift_term })
  
  let get_field_projector_name env datacon index =
    let _, t = Env.lookup_datacon env datacon in
  
negative.code: 
    then
      ({ mlift_wp = lift_tf_layered_effect sub.target (sub.lift_wp |> must);
         mlift_term = Some (lift_tf_layered_effect_term env sub) })
  
    else
      let mk_mlift_wp ts env c =
  