fix(library/system/io): read_to_end: work around UTF-8 bug in io.read
This commit is contained in:
parent
f254a906b3
commit
08474e04ff
1 changed files with 2 additions and 1 deletions
|
|
@ -142,7 +142,8 @@ iterate "" $ λ r,
|
|||
if done
|
||||
then return none
|
||||
else do
|
||||
c ← read h 1024,
|
||||
-- HACK: use less efficient `get_line` while `read` is broken
|
||||
c ← get_line h,
|
||||
return $ some (r ++ c)
|
||||
|
||||
def read_file (fname : string) (bin := ff) : io string :=
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue