Copyright | (c) 2017 2018 N Steenbergen |
---|---|
License | GPL-3 |
Maintainer | ns@slak.ws |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
This module contains operations and class instances for writing to files or terminals.
Documentation
A data type representing the supported file formats.
writeHeader :: Handle -> Format -> IO () Source #
Write the header associated with a file format to a file.
writeBody :: (LaTeX a, Printable a) => Handle -> Format -> a -> IO () Source #
Write an object to a file in the given format.
writeFooter :: Handle -> Format -> IO () Source #
Write the footer associated with a file format to a file.
write :: Handle -> Doc -> IO () Source #
Write a document to some file handle. Automatically chooses prettyprint
or plainprint
based on whether we are writing to a terminal or not.