[Haskell-cafe] Bug in "Haskell for C programmers" tutorial?

Erik de Castro Lopo hc-erikd at mega-nerd.com
Sat Dec 31 20:01:58 EST 2005


Erik de Castro Lopo wrote:

> Hi all,
> 
> I'm working through the "Haskell for C programmers" tutorial
> and in this section":

    http://www.haskell.org/~pairwise/intro/section3.html#part7

has:

    main = do
        putStr "prompt 1"
        a <- getLine
        putStr "prompt 2"
        b <- getLine
        putStrLn (show (someFunc (read a) (read b)))

which I believe needs a:

        hFlush stdout

after each "putStr" line and an "import System.IO" at the top of
the file.

Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo
+-----------------------------------------------------------+
"Ever since GNOME development began, I have urged people to aim
to make it as good as the Macintosh. To try to be like Windows
is to try for second-best." - Richard Stallman


More information about the Haskell-Cafe mailing list