It works for me, if I add the missing "let " before “bigLastName” and convert all the smart-quotes to real ones:
$ cat whatsinaname.hs
import Data.Char
main = do
putStrLn "What’s your first name?"
firstName <- getLine
putStrLn "What’s your last name?"
lastName <- getLine
let bigFirstName = map toUpper firstName
let bigLastName = map toUpper lastName
putStrLn $ "hey " ++ bigFirstName ++ " " ++ bigLastName ++ ", how are you?"
$ ghc --make whatsinaname.hs
[1 of 1] Compiling Main ( whatsinaname.hs, whatsinaname.o )
Linking whatsinaname ...
$ ./whatsinaname
What’s your first name?
Adam
What’s your last name?
Sjøgren
hey ADAM SJØGREN, how are you?
$
repl.it might have a problem with flushing. If you can, consider downloading an installer for your machine; I promise you will have a better Haskell experience.
It seems like repl.it is somehow doubling the number of ‘enter’ keypresses, so every line entered is being followed up by an additional blank line. Here’s a workaround: Each time you use getLine, actually use it twice, and discard the second line.
import Data.Char
getLine2 = do
x <- getLine
_ <- getLine
return x
main = do
putStrLn "What's your first name?"
firstName <- getLine2
putStrLn "What's your last name?"
lastName <- getLine2
let bigFirstName = map toUpper firstName
bigLastName = map toUpper lastName
putStrLn $ "hey " ++ bigFirstName ++ " " ++ bigLastName ++ ", how are you?"