anchor.diff:  
   %% -- verifiers -----------------------------------------------------
   
  -format_verifier_topcase(Indent, Defs, MsgVar) ->
  -    IndStr = indent(Indent+4, ""),
  -    ElseCase = "_ -> mk_type_error(not_a_known_message, Msg, [])",
  -    ["case ", MsgVar, " of\n",
  -     IndStr,
  -     string:join([f("#~p{} -> ~p(~s, [~p])",
  -                    [MsgName, mk_fn(v_msg_, MsgName), MsgVar, MsgName])
  -                  || {{msg, MsgName}, _MsgDef} <- Defs] ++ [ElseCase],
  -                 ";\n"++IndStr),
  -     "\n",
  -     indent(Indent, "end")].
  +format_verifiers_top_function(Defs) ->
  +    gpb_codegen:format_fn(
  +      verify_msg,
  +      fun(Msg) ->
  +              case Msg of
  +                  '<msg-cases>' -> verify_it;
  +                  _ -> mk_type_error(not_a_known_message, Msg, [])
  +              end
  +      end,
  +      [splice_clauses(
  +         '<msg-cases>',
  +         [gpb_codegen:case_clause(
  +            case dummy of '<msg-match>' -> '<verify-msg>'(Msg, ['<MsgName>'])
  +            end,
  +            [replace_tree('<msg-match>', record_match(MsgName, [])),
  +             replace_term('<verify-msg>', mk_fn(v_msg_, MsgName)),
  +             replace_term('<MsgName>', MsgName)])
  +          || {{msg, MsgName}, _MsgDef} <- Defs])]).
   
   format_verifiers(Defs, AnRes, _Opts) ->
       [format_msg_verifiers(Defs, AnRes),
  
positive.code:        "\n",
         f("~s~n", [format_msg_merge_code(Defs, AnRes)]),
         "\n",
         f("verify_msg(Msg) ->~n" %% Option to use gpb:verify_msg??
           "    ~s.~n", [format_verifier_topcase(4, Defs, "Msg")]),
         "\n",
         f("~s~n", [format_verifiers(Defs, AnRes, Opts)]),
         "\n",
  
negative.code: f(F)   -> f(F,[]).
  f(F,A) -> io_lib:format(F,A).
  
  flatten_iolist(IoList) ->
      binary_to_list(iolist_to_binary(IoList)).
  
  