Brandon Allbery <allbery.b@gmail.com> wrote:I can't confirm that. This is true for compiled programs, but when
> The code is doing exactly what it says. getTwoChars reads two
> characters --- *not* a line. So the next character waiting to be read
> is the newline, which is returned by the next getTwoChars.
>
> This may depend to some extent on the platform, as Unix defaults to a
> line-oriented input interface (at the OS level) but Windows to
> character-oriented input.
running
liftA2 (,) getChar getChar
on the GHCi command line, it seems to use NoBuffering.