     for {match, action} <- routes do
       quote do
         def route(unquote(match), unquote(state)) do
+          # Should this verify_implementation for the action/middlewares
+          # Perhaps Stack.new should do it
           Raxx.Stack.new(unquote(middlewares), {unquote(action), unquote(state)})
         end
       end

          ]
        end
      end
  """

  @callback route(Raxx.Request.t(), term) :: Raxx.Stack.t()

  @doc false
  defmacro __using__(actions) when is_list(actions) do
    routes =
      for {match, controller} <- actions do
        {resolved_module, []} = Module.eval_quoted(__CALLER__, controller)

defmodule Raxx.Router do
  @moduledoc """
  Routing for Raxx applications.

  Routes are defined as a match and an action module.
  Standard Elixir pattern matching is used to apply the match to an incoming request.
  An action module another implementation of `Raxx.Server`

  Sections group routes that all have the same middleware.
  Middleware in a section maybe defined as a list,
  this is useful when all configuration is known at compile-time.
  Alternativly an arity 1 function can be used.
  This can be used when middleware require runtime configuration.
  The argument passed to this function is server initial state.

  ## Examples

      defmodule MyRouter do
        use Raxx.Router

        section [{Raxx.Logger, level: :debug}], [
