anchor.diff:  teach_any_proc(_, _, []) ->
       {error, noproc}.
   
  -teach_ddoc(DDoc, {DDocId, _Rev}=DDocKey, #proc{ddoc_keys=Keys}=Proc) ->
  +teach_ddoc(DDoc, {DDocId, _Rev}=DDocKey, #proc_int{ddoc_keys=Keys}=Proc) ->
       % send ddoc over the wire
       % we only share the rev with the client we know to update code
       % but it only keeps the latest copy, per each ddoc, around.
  -    true = couch_query_servers:proc_prompt(Proc, [<<"ddoc">>, <<"new">>,
  -        DDocId, couch_doc:to_json_obj(DDoc, [])]),
  +    true = couch_query_servers:proc_prompt(
  +        export_proc(Proc),
  +        [<<"ddoc">>, <<"new">>, DDocId, couch_doc:to_json_obj(DDoc, [])]),
       % we should remove any other ddocs keys for this docid
       % because the query server overwrites without the rev
       Keys2 = [{D,R} || {D,R} <- Keys, D /= DDocId],
  
positive.code:     {ok, Proc#proc{ddoc_keys=[DDocKey|Keys2]}}.
  
  make_proc(Pid, Lang, Mod) ->
      Proc = #proc{
          lang = Lang,
          pid = Pid,
          prompt_fun = {Mod, prompt},
  
negative.code:     end;
  
  handle_info({'DOWN', Ref, _, _, _Reason}, State0) ->
      case ets:match_object(State0#state.tab, #proc_int{client=Ref, _='_'}) of
      [] ->
          {noreply, State0};
      [#proc_int{} = Proc] ->
          {noreply, return_proc(State0, Proc)}
      end;
  
  