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.
This commit is contained in:
parent
6dd806f1ad
commit
a1730cd6af
37 changed files with 230 additions and 101 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue