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@163.com>
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@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@163.com
Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
Try putStrLn or put "/n" at end of first putStr main = do putStrLn "Give me some input: " l <- getLine putStrLn $ map toUpper l Mar 19, 2020 7:37:15 PM nowsnow <nowsnow@163.com>:
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@163.com>
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
participants (3)
-
A. Vigneron -
Henry Yang -
nowsnow