--- TODO -- need to include query string, and think about how to handle
+-- These take a view function and return a view function.
+-- Alternatively, take a view function and a request and return an IO
+-- (Maybe Response). This allows them to do both request
+-- pre-processing and response post-processing. They will be usually
+-- be used as \'decorators\' when defining routes.
+-- These are straightforward view functions which happen to work as a
+-- kind of pre-handler. They are installed using routes, usually
+-- before all the others. These usually do redirects, for example
+-- ** Response processors
+-- These take a response and the original request object, and return
+-- a possibly modified response. This can be useful for
+-- post-processing, or adding headers etc.
+-- | Returns a responseRedirect if the the request URI does not end
+-- with a slash. Should be installed before all other routes.
+-- need to include query string, and think about how to handle
addSlashRedirectProcessor view req =
let uri = requestUriRaw req