[Haskell-cafe] Resources/papers on lazy I/O

Joachim Durchholz jo at durchholz.org
Thu Mar 28 18:43:16 UTC 2019

Am 28.03.19 um 19:26 schrieb Vanessa McHale:
> That got me thinking - what exactly is wrong with lazy I/O? I've seen 
> Oleg Kiselyov's paper (http://okmij.org/ftp/Haskell/#lazyIO-not-True) 
> and I've run into issues myself (basically the issue here: 
> https://stackoverflow.com/questions/31342012/read-and-writing-to-file-in-haskell), 
> but none of those seem so pathological - the second issue could be 
> better resolved with linear types!

As far as I recall, IO was the nasty loophole in Haskell initially, and 
after lots of ugly hackery and living with the pain, various approaches 
Today's IO system was one of the, and there were two contenders. IO won 
because it was the first one to become useful, and while at least one of 
the others made it to the proof-of-concept stages, IO had started to 
mature already and the contender never managed to get much mind share.

So... it's part historical accident, part "nobody had a better idea at 
the time". Which means that there could well be better alternatives, but 
it's unclear how to judge whether some alternative is really better, so 
even people with an interest in the field tend to research on other topics.


More information about the Haskell-Cafe mailing list