 
   defp change_impl_for([], protocol, _info, _types, is_protocol, acc) do
     if is_protocol do
-      { :ok, protocol, Enum.reverse(acc) }
+      { :ok, { protocol, Enum.reverse(acc) } }
     else
       { :error, :not_a_protocol }
     end

  end

  # Finally compile the module and emit its bytecode.
  defp compile({ :ok, protocol, code }) do
    opts = if Code.compiler_options[:debug_info], do: [:debug_info], else: []
    { :ok, ^protocol, binary, _warnings } = :compile.forms(code, [:return|opts])
    { :ok, binary }
  end

  defp compile(other) do
    other
  end
end


  # Change the debug information to the optimized
  # impl_for/1 dispatch version.
  defp change_debug_info({ protocol, any, code }, types) do
    types   = if any, do: types, else: List.delete(types, Any)
    records = types -- Protocol.builtin
    builtin = Protocol.builtin -- (Protocol.builtin -- types)
