                                                   `apply-middleware-sync)]
        (emit-fn
          `(fn rook-dispatcher# [~req]
-            (match (preparse-request ~req)
+            (match (request-route-spec ~req)
               ~@(mapcat
                   (fn [[method pathvec verb-fn-sym middleware]]
                     (let [method           (if (identical? method :all)

  (pp/write form :dispatch pp/code-dispatch)
  (prn))

(defn preparse-request
  "Takes a Ring request map and returns [method pathvec], where method
  is a request method keyword and pathvec is a vector of path
  segments.

                          apply-middleware req handler-sym handler-map)])
               handlers)]
       (fn rook-pattern-matching-dispatcher# [~req]
         (match (request-route-spec ~req)
           ~@(mapcat (fn [[route-spec handler-sym]]
                       (let [{:keys [route-params schema]}
                             (get handlers handler-sym)]
