diff options
author | Joey Hess <joey@kitenet.net> | 2012-02-16 00:41:30 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-02-16 00:44:51 -0400 |
commit | a1e52f0ce5984058c737ed709fc5d4b6398e019a (patch) | |
tree | baaeb46b5eb5e7edb4a8a4ef80d6c1ab256bbcba /Utility | |
parent | e7aaa55c53fb54c6dd5a1a1aeb0955b05227676b (diff) |
hlint
Diffstat (limited to 'Utility')
-rw-r--r-- | Utility/Format.hs | 2 | ||||
-rw-r--r-- | Utility/Url.hs | 17 |
2 files changed, 9 insertions, 10 deletions
diff --git a/Utility/Format.hs b/Utility/Format.hs index 79e94ae96..1d96695ed 100644 --- a/Utility/Format.hs +++ b/Utility/Format.hs @@ -94,7 +94,7 @@ gen = filter (not . empty) . fuse [] . scan [] . decode_c | i < 0 = LeftJustified (-1 * i) | otherwise = RightJustified i novar v = "${" ++ reverse v - foundvar f v p cs = scan (Var (reverse v) p : f) cs + foundvar f v p = scan (Var (reverse v) p : f) empty :: Frag -> Bool empty (Const "") = True diff --git a/Utility/Url.hs b/Utility/Url.hs index dfdebaf06..8a43cf788 100644 --- a/Utility/Url.hs +++ b/Utility/Url.hs @@ -108,12 +108,11 @@ request url requesttype = go 5 url (3,0,x) | x /= 5 -> redir (n - 1) u rsp _ -> return rsp ignore = const $ return () - redir n u rsp = do - case retrieveHeaders HdrLocation rsp of - [] -> return rsp - (Header _ newu:_) -> - case parseURIReference newu of - Nothing -> return rsp - Just newURI -> go n newURI_abs - where - newURI_abs = fromMaybe newURI (newURI `relativeTo` u) + redir n u rsp = case retrieveHeaders HdrLocation rsp of + [] -> return rsp + (Header _ newu:_) -> + case parseURIReference newu of + Nothing -> return rsp + Just newURI -> go n newURI_abs + where + newURI_abs = fromMaybe newURI (newURI `relativeTo` u) |