     change_impl_for(code, protocol, builtin, records, false, [])
   end
 
-  defp change_debug_info(other, _types), do: other
-
   defp change_impl_for([{ :attribute, line, :protocol, _ }|t], protocol, builtin, records, _, acc) do
     attr = [fallback_to_any: Any in builtin, consolidated: true]
     change_impl_for(t, protocol, builtin, records, true,

  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


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