[Haskell-cafe] Loop with the StateT monad

Brandon Allbery allbery.b at gmail.com
Sat Mar 18 06:45:16 UTC 2017

On Sat, Mar 18, 2017 at 1:52 AM, <p75213 at gmail.com> wrote:

> I have narrowed
> the problem down to the "p <- liftIO getChar" statement.

It does run the second time, and gets the newline following the entered
character. You should probably use getLine, or learn how your platform
switches between default line-oriented input and character-oriented --- and
how to switch it back afterward. (In C on Unix-like systems, this involves

brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20170318/82ee130d/attachment.html>

More information about the Haskell-Cafe mailing list