Reputation: 9620
I have an IO [String]
in main
, which I want to write (as lines) to stdout. How?
--newbie
Upvotes: 1
Views: 85
Reputation: 64740
IO [String]
is an action that will get you strings. If you wish to perform the action and print the results then consider:
printIOString io = putStrLn . unlines =<< io
Or with some additional notation, if you prefer:
printIOString io =
do strs <- io
let rendered = unlines strs
putStrLn rendered
Upvotes: 9