Document is:module

The ATK interface which represents the toplevel container for document content. The AtkDocument interface should be supported by any object whose content is a representation or view of a document. The AtkDocument interface should appear on the toplevel container for the document content; however AtkDocument instances may be nested (i.e. an AtkDocument may be a descendant of another AtkDocument) in those cases where one document contains "embedded content" which can reasonably be considered a document in its own right.
Management of the PDF structure
This module defines an abstract syntax tree for the GraphQL language. It follows closely the structure given in the specification. Please refer to Facebook's GraphQL Specification. for more information.
Mid level utils for processing PDF file Basic example how to get number of pages in document
import Pdf.Document

withPdfFile "input.pdf" $ \pdf ->
doc <- document pdf
catalog <- documentCatalog doc
rootNode <- catalogPageNode catalog
count <- pageNodeNKids rootNode
print count
page <- loadPageByNum rootNode 1
text <- pageExtractText page
print text
PDF document
State arrows for document input
State arrows for document output
Parsing of documentation nodes.
Type classes to allow for XML handling functions to be generalized to work with different document types.
Quick documentation for the PDF library. For detailed examples, download the tar.gz package from Hackage and look at the test.hs in folder Test.
Provides a function to print documentation if available.
This module is documentation module for relational-record. The project page of relational-record is http://khibino.github.io/haskell-relational-record/ .
This module contains code for documenting a set of persistent entity definitions. All the library provides is a means to render a Markdown document with table and column documentation and comments. A further expansion could use the information here to generate PostgreSQL COMMENTs on the fields and tables too.

Getting Started

You probably already have a persistent entity definitions somewhere, and they probably look like this:
share [mkPersist sqlSettings] [persistUpperCase|
User
firstName Text.Text
active    Bool
deriving Show Eq Read Ord
|]
The persistUpperCase QuasiQuoter parses the block of text and returns a value of type [EntityDef]. We need to get our hands on that definition so we can document it. We'll use the mkEntityDefList function to expose it:
share
[ mkPersist sqlSettings
, mkEntityDefList "entityDefs"
] [persistUpperCase|
User
firstName Text.Text
active    Bool
deriving Show Eq Read Ord
|]
You may want to factor out the quasiquoter into a term and import from another module. This has an important downside: the ID fields from the QuasiQuoter are given as Int64 regardless of what they actually are. It's not possible for the persistent quasiquoter to properly know the types of the IDs.

Documentating The Schema

Now, we're going to use the document function to link up the entityDefs with a documentation expression (type EntityDoc).
docs :: [EntityDef]
docs = document entityDefs $ do
pure ()
The EntityDoc type is a monad, and we'll use do notation to sequence multiple entity definitions.
docs :: [EntityDef]
docs = document entityDefs $ do
User --^ do
pure ()
The --^ operator mimics the Haddock comment syntax. We use the constructor of the entity (in this case, User). On the right, we provide documentation for the entity. The right hand expression will have the type FieldDoc, and we can use do notation to construct it. We can use string literals to document the entity itself, with the OverloadedStrings extension enabled. The string literals are concatenated, and used to provide entity-level comments. You'll need to manage whitespace yourself, though.
docs :: [EntityDef]
docs = document entityDefs $ do
User --^ do
"This is user documentation. "
"You can have multiple lines, but you need to watch out for spaces. "
"The lines will be combined."
We can also document the entity fields. We do this using the # operator.
docs :: [EntityDef]
docs = document entityDefs $ do
User --^ do
"This is user documentation. "
"You can have multiple lines, but you need to watch out for spaces. "
"The lines will be combined."

UserFirstName # "The user's first name."
UserActive    # "Whether or not the user is able to log in."
This attaches the comment to the entity field.

Rendering the Documentation

Finally, we'll use render and provide a Renderer to generate documentation. For an example of what this looks like, check out the file test/example.md in the repository (linked from the README).
renderedDocs :: Text
renderedDocs = render markdownTableRenderer docs
Conversion of Pandoc documents to OpenDocument XML.