Switched file input utilities to use withTextFile
This fixed encoding issues with unicode input
This commit is contained in:
parent
5e2089ad30
commit
4c81a8500e
1 changed files with 3 additions and 3 deletions
|
@ -631,15 +631,15 @@ append file s = sh (do
|
|||
|
||||
-- | Acquire a `Managed` read-only `Handle` from a `FilePath`
|
||||
readonly :: FilePath -> Managed Handle
|
||||
readonly file = managed (Filesystem.withFile file IO.ReadMode)
|
||||
readonly file = managed (Filesystem.withTextFile file IO.ReadMode)
|
||||
|
||||
-- | Acquire a `Managed` write-only `Handle` from a `FilePath`
|
||||
writeonly :: FilePath -> Managed Handle
|
||||
writeonly file = managed (Filesystem.withFile file IO.WriteMode)
|
||||
writeonly file = managed (Filesystem.withTextFile file IO.WriteMode)
|
||||
|
||||
-- | Acquire a `Managed` append-only `Handle` from a `FilePath`
|
||||
appendonly :: FilePath -> Managed Handle
|
||||
appendonly file = managed (Filesystem.withFile file IO.AppendMode)
|
||||
appendonly file = managed (Filesystem.withTextFile file IO.AppendMode)
|
||||
|
||||
-- | Combine the output of multiple `Shell`s, in order
|
||||
cat :: [Shell a] -> Shell a
|
||||
|
|
Loading…
Reference in a new issue