if (isSuffixOf "/" old_path) || (isSuffixOf "bigpage" old_path) then
-- It already had a trailing slash, or it's a 'bigpage' URL.
-- Trailing slashes after 'bigpage' don't work.
- url
+ url
else
show $ uri { uriPath = old_path ++ "/" }
where
+-- Bug here, doesn't work on unicode paths!
filename :: URL -> Maybe String
filename url =
case parse_result of
make_absolute_url :: URL -> Maybe URL
-make_absolute_url relative_url =
+make_absolute_url relative_url =
case parse_result of
Nothing -> Nothing
Just relative_uri ->