aboutsummaryrefslogtreecommitdiff
path: root/Utility/Misc.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-05-15 23:32:17 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-05-16 01:03:52 -0400
commit4dc2000f97236089a8613cc6b0bf9846fea6abfa (patch)
tree83df60ef702246b0b71bc99e141d4a8bf1990438 /Utility/Misc.hs
parent973180b077e60b5d12d7c57d926878d11d7f2105 (diff)
adeiu, MissingH
Removed dependency on MissingH, instead depending on the split library. After laying groundwork for this since 2015, it was mostly straightforward. Added Utility.Tuple and Utility.Split. Eyeballed System.Path.WildMatch while implementing the same thing. Since MissingH's progress meter display was being used, I re-implemented my own. Bonus: Now progress is displayed for transfers of files of unknown size. This commit was sponsored by Shane-o on Patreon.
Diffstat (limited to 'Utility/Misc.hs')
-rw-r--r--Utility/Misc.hs8
1 files changed, 0 insertions, 8 deletions
diff --git a/Utility/Misc.hs b/Utility/Misc.hs
index 564935ddb..4498c0a03 100644
--- a/Utility/Misc.hs
+++ b/Utility/Misc.hs
@@ -45,14 +45,6 @@ separate c l = unbreak $ break c l
| null b = r
| otherwise = (a, tail b)
-{- Split on a single character. This is over twice as fast as using
- - Data.List.Utils.split on a list of length 1, while producing
- - identical results. -}
-splitc :: Char -> String -> [String]
-splitc c s = case break (== c) s of
- (i, _c:rest) -> i : splitc c rest
- (i, []) -> i : []
-
{- Breaks out the first line. -}
firstLine :: String -> String
firstLine = takeWhile (/= '\n')