Brent: getChar acts like getLine from what I can tell, it's a bit odd<br><br><div><span class="gmail_quote">On 8/14/08, <b class="gmail_sendername">Brandon S. Allbery KF8NH</b> <<a href="mailto:allbery@ece.cmu.edu">allbery@ece.cmu.edu</a>> wrote:</span><blockquote class="gmail_quote" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; margin-left: 0.80ex; border-left-color: #cccccc; border-left-width: 1px; border-left-style: solid; padding-left: 1ex">
<span class="q"><br> On Aug 14, 2008, at 15:13 , Brent Yorgey wrote:<br><br><blockquote class="gmail_quote" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0.80ex; border-left-color: #cccccc; border-left-width: 1px; border-left-style: solid; padding-left: 1ex">
On Thu, Aug 14, 2008 at 03:33:26PM +0100, Alex Watt wrote:<br><blockquote class="gmail_quote" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0.80ex; border-left-color: #cccccc; border-left-width: 1px; border-left-style: solid; padding-left: 1ex">
If I call "main" in ghci, my program runs as it should, but if I try<br> compiling it, and then running the result of that compilation, i.e.:<br><br> $ ghc -o animal_game game.hs<br> $ ./animal_game<br><br> unexpected things occur, particularly "getChar" does not work correctly, and<br>
</blockquote><br> When you say 'getchar does not work correctly', exactly what do you<br> mean? I'm not sure of the problem, but this smells to me of something<br> having to do with buffering and/or newline characters not getting<br>
handled properly.<br></blockquote><br></span> I'm thinking termios is in line mode still. System.Posix.Terminal is what he needs.<br><span class="sg"><br> -- <br> brandon s. allbery [solaris,freebsd,perl,pugs,haskell] <a href="mailto:allbery@kf8nh.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">allbery@kf8nh.com</a><br>
system administrator [openafs,heimdal,too many hats] <a href="mailto:allbery@ece.cmu.edu" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">allbery@ece.cmu.edu</a><br> electrical and computer engineering, carnegie mellon university KF8NH</span><div>
<span class="e" id="q_11bc2d20b4fe5270_3"><br><br><br> _______________________________________________<br> Beginners mailing list<br><a href="mailto:Beginners@haskell.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.haskell.org/mailman/listinfo/beginners</a><br></span></div></blockquote></div><br>