anchor.diff:  %        [[Type0 ++ TypeSuffix] | AccIn]
   %    end,
   %    lists:foldl(FoldFun, Type0, TypePath).
  -    Head = lists:foldl (fun (TypeSuffix, AccIn) ->
  +    Head = lists:foldl(fun (TypeSuffix, AccIn) ->
   			 [list_to_tuple([Type | TypeSuffix]) | AccIn]
   		 end,
   		 [],
  -		 sublists (TypePath0)),
  +		 sublists(TypePath0)),
       all_possible_type_paths(Type, Tail, [Head | Acc]).
   
   %% @hidden
  -find_type ([], _KnownTypes) ->
  +find_type([], _KnownTypes) ->
       false;
   find_type([Type | TailTypes], KnownTypes) when is_list(Type) ->
       find_type([list_to_tuple(Type) | TailTypes], KnownTypes);
  -find_type ([Type | TailTypes], KnownTypes) ->
  +find_type([Type | TailTypes], KnownTypes) ->
       FilterFun = fun(KnownType) ->
           lists:member(Type, element(1, KnownType))
       end,
  
positive.code:             lists:reverse(MidExtendOut)
      end,
      Type = type_path_to_type(TypePath),
      resolve_types (Tail, AllPaths, Enums, [{Type, lists:reverse (FieldsOut), ExtendedOut } | Acc]);
  resolve_types ([], _, _, Acc) ->
      Acc.
  
  %% @hidden
  
negative.code: %%--------------------------------------------------------------------
  -spec generate_source(ProtoFile :: string() | atom(), Options :: list()) ->
  			     ok | {error, _}.
  generate_source(ProtoFile,Options) when is_atom(ProtoFile) ->
      generate_source(atom_to_list(ProtoFile) ++ ".proto", Options);
  generate_source(ProtoFile,Options) when is_list(ProtoFile) ->
      Basename = filename:basename(ProtoFile, ".proto") ++ "_pb",
      {ok,String} = parse_file(ProtoFile),
      {ok,FirstParsed} = parse_string(String),
      ImportPaths = ["./", "src/" | proplists:get_value(imports_dir, Options, [])],
      Parsed = parse_imports(FirstParsed, ImportPaths),
      Collected = collect_full_messages(Parsed),
      Messages = resolve_types(Collected#collected.msg,Collected#collected.enum),
      output_source(Basename, Messages, Collected#collected.enum, Options).
  
  %% @hidden
  parse_imports(Parsed, Path) ->
  