I was curious about how the “input redirection” program on page 170 of Learn You a Haskell for Great Good (LYAH) worked, so I typed it into a file named do1.hs, with one additional line:
import Data.Char main = do contents <- getContents putStrLn "dude" putStr $ map toUpper contents
The line I added is the putStrLn "dude" line.
I compiled it like this: