Send Beginners mailing list submissions to
        beginners@haskell.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1.  about "putStr" (nowsnow)
   2. Re:  about "putStr" (A. Vigneron)


----------------------------------------------------------------------

Message: 1
Date: Thu, 19 Mar 2020 19:36:50 +0800
From: nowsnow <nows...@163.com>
To: beginners@haskell.org
Subject: [Haskell-beginners] about "putStr"
Message-ID: <20200319193644.f1b5.48398...@163.com>
Content-Type: text/plain; charset="UTF-8"

GHC 8.6.5
=====
import Data.Char

main = do
    putStr "Give me some input: "
    l <- getLine
    putStrLn $ map toUpper l
====run====
my str
Give me some input:MY STR

===not:===
Give me some input:my str
MY STR


-- 
nowsnow <nows...@163.com>




------------------------------

Message: 2
Date: Thu, 19 Mar 2020 11:48:51 +0000
From: "A. Vigneron" <a.vigne...@protonmail.com>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] about "putStr"
Message-ID:
        
<fF_uF5meNLDBhWJ0lUohuitQlL9mFiDMT8236IhBY1RhJ9I54ICn46VP2hqVWgLatQFs_iKblguHi1--fr-YG4Vzr12J69RLiSzJIH0cmBM=@protonmail.com>
        
Content-Type: text/plain; charset=UTF-8

Try adding hFlush stdout just after your putStr (import System.IO)

--
Alex


Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, March 19, 2020 12:36 PM, nowsnow <nows...@163.com> wrote:

> GHC 8.6.5
>
> ==========
>
> import Data.Char
>
> main = do
> putStr "Give me some input: "
> l <- getLine
> putStrLn $ map toUpper l
> ====run====
> my str
> Give me some input:MY STR
>
> ===not:===
> Give me some input:my str
> MY STR
>
>
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> nowsnow nows...@163.com
>
> Beginners mailing list
> Beginners@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners




------------------------------

Subject: Digest Footer

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


------------------------------

End of Beginners Digest, Vol 141, Issue 1
*****************************************

Reply via email to