convert from readFileStrict
This removes that function, using file-io readFile' instead. Had to deal with newline conversion, which readFileStrict does on Windows. In a few cases, that was pretty ugly to deal with. Sponsored-by: Kevin Mueller
This commit is contained in:
parent
de1af273e0
commit
6e27b0d4d1
19 changed files with 94 additions and 71 deletions
|
@ -10,7 +10,6 @@
|
|||
|
||||
module Utility.Misc (
|
||||
hGetContentsStrict,
|
||||
readFileStrict,
|
||||
separate,
|
||||
separate',
|
||||
separateEnd',
|
||||
|
@ -47,10 +46,6 @@ import Prelude
|
|||
hGetContentsStrict :: Handle -> IO String
|
||||
hGetContentsStrict = hGetContents >=> \s -> length s `seq` return s
|
||||
|
||||
{- A version of readFile that is not lazy. -}
|
||||
readFileStrict :: FilePath -> IO String
|
||||
readFileStrict = readFile >=> \s -> length s `seq` return s
|
||||
|
||||
{- Like break, but the item matching the condition is not included
|
||||
- in the second result list.
|
||||
-
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue