[Haskell-beginners] Ruby Quiz Solution #15 - won't work after
compilation
Alex Watt
el.zingo at gmail.com
Thu Aug 14 16:12:49 EDT 2008
Brent: getChar acts like getLine from what I can tell, it's a bit odd
On 8/14/08, Brandon S. Allbery KF8NH <allbery at ece.cmu.edu> wrote:
>
>
> On Aug 14, 2008, at 15:13 , Brent Yorgey wrote:
>
> On Thu, Aug 14, 2008 at 03:33:26PM +0100, Alex Watt wrote:
>>
>>> If I call "main" in ghci, my program runs as it should, but if I try
>>> compiling it, and then running the result of that compilation, i.e.:
>>>
>>> $ ghc -o animal_game game.hs
>>> $ ./animal_game
>>>
>>> unexpected things occur, particularly "getChar" does not work correctly,
>>> and
>>>
>>
>> When you say 'getchar does not work correctly', exactly what do you
>> mean? I'm not sure of the problem, but this smells to me of something
>> having to do with buffering and/or newline characters not getting
>> handled properly.
>>
>
> I'm thinking termios is in line mode still. System.Posix.Terminal is what
> he needs.
>
> --
> brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
> system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
> electrical and computer engineering, carnegie mellon university KF8NH
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20080814/6cb299c8/attachment.htm
More information about the Beginners
mailing list