I\'m fairly new to Haskell, and I\'d like to keep reading lines from the console until the end of the stream, and outputting everything I get in upper case. So far, I\'ve got
You could also just rely on lazy IO.
import Data.Char main :: IO () main = do inp <- getContents let ls = lines inp upcased = map (map toUpper) ls mapM_ putStrLn upcased