diff options
author | Joey Hess <joey@kitenet.net> | 2011-12-15 18:11:42 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-12-15 18:19:36 -0400 |
commit | 95d2391f58ae240e7100f0d5488dd7246f71f3bb (patch) | |
tree | f33f21904ae7be4d40b70bab1e2a68fd4eef5526 /Logs/Remote.hs | |
parent | b7e0d39abbc9a09c21c6f0103ad6c9f4547f81fe (diff) |
more partial function removal
Left a few Prelude.head's in where it was checked not null and too hard to
remove, etc.
Diffstat (limited to 'Logs/Remote.hs')
-rw-r--r-- | Logs/Remote.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Logs/Remote.hs b/Logs/Remote.hs index 8d15f3151..d9b41d8c4 100644 --- a/Logs/Remote.hs +++ b/Logs/Remote.hs @@ -73,14 +73,13 @@ configUnEscape = unescape | c == '&' = entity rest | otherwise = c : unescape rest entity s = if ok - then chr (read num) : unescape rest + then chr (Prelude.read num) : unescape rest else '&' : unescape s where num = takeWhile isNumber s r = drop (length num) s rest = drop 1 r - ok = not (null num) && - not (null r) && head r == ';' + ok = not (null num) && take 1 r == ";" {- for quickcheck -} prop_idempotent_configEscape :: String -> Bool |