fix(library/system/io): read_to_end: work around UTF-8 bug in io.read

This commit is contained in:
Sebastian Ullrich 2018-07-05 16:47:53 +02:00
parent f254a906b3
commit 08474e04ff

View file

@ -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 :=