hPutDoc :: Handle -> Doc ann -> IO ()
Like putDoc, but instead of using stdout, print to a user-provided
handle, e.g. a file or a socket. Uses the defaultLayoutOptions.
main = 'withFile' filename (\h -> 'hPutDoc' h doc)
where
doc = 'vcat' ["vertical", "text"]
filename = "someFile.txt"
'hPutDoc' h doc = 'renderIO' h ('layoutPretty' 'defaultLayoutOptions' doc)