<html><head></head><body><p dir="ltr">And this is because the implementation of IO is *specifically* crafted to guarantee this ordering. It is not a property of monads in general, or do syntax in general.</p>
<br><br><div class="gmail_quote">On 15 April 2015 11:31:38 pm AEST, Ryan Yates <fryguybob@gmail.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr">In your example a and b will be ordered as you would expect.</div><div class="gmail_extra"><br /><div class="gmail_quote">On Wed, Apr 15, 2015 at 9:26 AM, Jon Schneider <span dir="ltr"><<a href="mailto:haskell@jschneider.net" target="_blank">haskell@jschneider.net</a>></span> wrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">Perhaps I need to be more specific.<br />
<br />
main = do<br />
 a <- getLine<br />
 b <- getLine<br />
<br />
Can we say "a" absolutely always receives the first line of input and if<br />
so what makes this the case rather than "b" receiving it ? Or do things<br />
need to be slightly more complicated to achieve this ?<br />
<br />
Sorry it's just the engineer in me. I think once I've got this clear I'll<br />
be happy to move on.<br />
<br />
Jon<br />
<br />
</div></div><div class="HOEnZb"><div class="h5">_______________________________________________<br />
Haskell-Cafe mailing list<br />
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br />
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br />
</div></div></blockquote></div><br /></div>
<p style="margin-top: 2.5em; margin-bottom: 1em; border-bottom: 1px solid #000"></p><pre class="k9mail"><hr /><br />Haskell-Cafe mailing list<br />Haskell-Cafe@haskell.org<br /><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br /></pre></blockquote></div></body></html>