   """
   defmacro channel(topic_pattern, module, opts \\ []) do
     quote bind_quoted: binding do
-      unless @socket_mount do
+      unless @phoenix_socket_mount do
         raise """
         You are trying to call `channel` outside of a `socket` block.
         Please move your channel definitions inside a `socket` block.
         """
       end
 
-      @channels {topic_pattern,
-                 Module.concat(@channel_alias, module),
-                 Dict.merge([via: @transports], opts)}
+      @phoenix_channels {topic_pattern,
+                         Module.concat(@channel_alias, module),
+                         Dict.merge([via: @transports], opts)}
     end
   end
 end

  defp prelude() do
    quote do
      Module.register_attribute __MODULE__, :phoenix_routes, accumulate: true
      Module.register_attribute __MODULE__, :channels, accumulate: true

      import Phoenix.Router
      import Plug.Conn

  @doc false
  defmacro __before_compile__(env) do
    routes   = env.module |> Module.get_attribute(:phoenix_routes) |> Enum.reverse
    chan_ast = env.module |> Module.get_attribute(:phoenix_channels) |> Helpers.defchannels

    Helpers.define(env, routes)

    quote do
      @doc false
      def __routes__, do: unquote(Macro.escape(routes))

      defp match(conn, _method, _path_info, _host) do
        raise NoRouteError, conn: conn, router: __MODULE__
