+make_https :: URL -> URL
+make_https url =
+ case parse_result of
+ Nothing -> url -- Shrug?
+ Just uri ->
+ if http uri then
+ show $ uri { uriScheme = "https:" }
+ else
+ url -- Leave non-http URLs alone.
+ where
+ parse_result = parseURIReference url
+
+