It was hardcoded to spit out a module called "Routes", no matter where you wanted to put it. Since filenames and module names are linked, though, this got really grouchy when you put it anywhere other than a file called Routes.hs Better now.
Basically, make route generation optional. The primary motivation for this is so that path helpers can be placed into a second file that is CPP #include into your application, to avoid recursive dependencies at least until <http://hackage.haskell.org/trac/ghc/ticket/1409> is solved.
These are functions named `actionPath` that take all the arguments the route takes (so, the arguments of the action, minus the arguments to the routes because those are just global). It generates a `typeRestrict` function in the where clause of each path helper that never gets used, but which causes the type inference engine to restrict the argument types of the path helper to the types of the actual arguments to the action. The helpers return Network.URI.URI, a relative URI with an absolute path If your application does not live in the root of your domain, you may need to take the path prefix on. For absolute URIs you can use (Network.URI.relativeTo <baseuri> <pathhelper>)
N arguments can be passed to routes, and each of these arguments is then passed to all Application before they are applied to any arguments coming from the URI. This allows IORefs, network connections to databases, and other such things from IO to be passed to each action.