I have a main function that outputs unicode which looks like this:
main = do
hSetEncoding stdout utf8
input <- getContents
mapM_ putStr $ myfunc input
How can I write this function without do notation?
I get <stdout>: commitBuffer: invalid argument (invalid character) when I try to compile this main function:
main = getContents >>= mapM_ putStr . myfunc