diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-11-11 15:01:13 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-11-11 15:01:13 -0400 |
commit | 962e279e17c1f3cf3be49ffdfb5e7310711a220c (patch) | |
tree | d9953d9e57dea51c24ccaf4d7e64731010546f4f /Utility/Format.hs | |
parent | 7d7f93302c72cbe1a16598b0c90a49c10aaf3669 (diff) | |
download | git-repair-962e279e17c1f3cf3be49ffdfb5e7310711a220c.tar.gz |
merge from git-annex
Diffstat (limited to 'Utility/Format.hs')
-rw-r--r-- | Utility/Format.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Utility/Format.hs b/Utility/Format.hs index 7844963..1ebf68d 100644 --- a/Utility/Format.hs +++ b/Utility/Format.hs @@ -103,7 +103,7 @@ empty _ = False {- Decodes a C-style encoding, where \n is a newline, \NNN is an octal - encoded character, and \xNN is a hex encoded character. -} -decode_c :: FormatString -> FormatString +decode_c :: FormatString -> String decode_c [] = [] decode_c s = unescape ("", s) where @@ -141,14 +141,14 @@ decode_c s = unescape ("", s) handle n = ("", n) {- Inverse of decode_c. -} -encode_c :: FormatString -> FormatString +encode_c :: String -> FormatString encode_c = encode_c' (const False) {- Encodes more strictly, including whitespace. -} -encode_c_strict :: FormatString -> FormatString +encode_c_strict :: String -> FormatString encode_c_strict = encode_c' isSpace -encode_c' :: (Char -> Bool) -> FormatString -> FormatString +encode_c' :: (Char -> Bool) -> String -> FormatString encode_c' p = concatMap echar where e c = '\\' : [c] |