summaryrefslogtreecommitdiff
path: root/Network/Pastis.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Network/Pastis.hs')
-rw-r--r--Network/Pastis.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Network/Pastis.hs b/Network/Pastis.hs
index 83a2fa9..982c5e7 100644
--- a/Network/Pastis.hs
+++ b/Network/Pastis.hs
@@ -3,7 +3,7 @@ module Network.Pastis (pastisURL) where
import Network.HTTP
import Network.URI
--- | Use pastisURL to shorten a URL.
+-- | Use pastisURL to shorten a URL. If an error occurs, the function returns 'url'.
pastisURL :: String -> IO String
pastisURL url = fmap (either (const url) rspBody) (simpleHTTP request) `catch` (return . const url)
where request = Request { rqURI = uri