<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi all,<br>
<br>
I recently finished up writing streaming facilities via libarchive
bindings and lazy bytestrings. It ended up working nicely -
reading from a file lazily and then unpacking the archive was more
efficient in time + allocations than reading the file all at once.<br>
<br>
That got me thinking - what exactly is wrong with lazy I/O? I've
seen Oleg <span style="left: 462.937px; top: 255.862px;
font-size: 16.6043px; font-family: sans-serif; transform:
scaleX(0.874757);">Kiselyov</span>'s paper
(<a class="moz-txt-link-freetext" href="http://okmij.org/ftp/Haskell/#lazyIO-not-True">http://okmij.org/ftp/Haskell/#lazyIO-not-True</a>) and I've run into
issues myself (basically the issue here:
<a class="moz-txt-link-freetext" href="https://stackoverflow.com/questions/31342012/read-and-writing-to-file-in-haskell">https://stackoverflow.com/questions/31342012/read-and-writing-to-file-in-haskell</a>),
but none of those seem so pathological - the second issue could be
better resolved with linear types! <br>
<br>
Are the any explanations of why Haskell *does* use lazy I/O?
Laziness allows symmetries between values and generators of values
- surely it is not *that* immoral to enforce this even in the IO
monad? <br>
<br>
Cheers,<br>
Vanessa McHale<br>
</p>
</body>
</html>