[Haskell-beginners] about "putStr"

A. Vigneron a.vigneron at protonmail.com
Thu Mar 19 11:48:51 UTC 2020


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 <nowsnow at 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 nowsnow at 163.com
>
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners




More information about the Beginners mailing list