-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Parse a Pandoc to a composite value. -- -- Provides a functionality for transforming a Pandoc into a -- vinyl/composite record. @package compdoc @version 0.3.0.0 -- | Provides functionality for transforming a Pandoc into a -- composite record. module Text.Compdoc type FContent = (:->) "content" Text fContent :: forall f_aiKp rs_aiKq. (Functor f_aiKp, (∈) FContent rs_aiKq) => (Text -> f_aiKp Text) -> Record rs_aiKq -> f_aiKp (Record rs_aiKq) -- | A Compdoc is a Record with at least an FContent field. newtype Compdoc a Compdoc :: Record (FContent : a) -> Compdoc a [unCompdoc] :: Compdoc a -> Record (FContent : a) -- | Read some Pandoc markdown as Text as a `Record (Compdoc -- a)` supplying a JsonFormat for the metadata. readMarkdown' :: (Show e, Typeable e, MonadThrow m) => ReaderOptions -> WriterOptions -> JsonFormat e (Record a) -> Text -> m (Compdoc a) -- | Read a markdown file from disk, supplying a JsonFormat for the -- metadata. readMarkdownFile :: (MonadIO m, MonadThrow m, Show e, Typeable e) => ReaderOptions -> WriterOptions -> JsonFormat e (Record a) -> Path b File -> m (Compdoc a) -- | Run a PandocPure operation with a default value in the event of -- failure. runPandocPureDefault :: a -> PandocPure a -> a -- | Transform a Pandoc to a Compdoc supplying a `JsonFormat -- for the metadata. pandocToCompdoc :: (Typeable e, Show e, MonadThrow m) => (WriterOptions -> Pandoc -> PandocPure Text) -> WriterOptions -> JsonFormat e (Record a) -> Pandoc -> m (Compdoc a) -- | Create the tail of a Compdoc which is just an FContent -- field. contentBlock :: WriterOptions -> [Block] -> Record (FContent : '[]) -- | Write a list of Blocks to Text using -- WriterOptions defaulting to the empty string in the case of -- error. writeBlocksDefault :: WriterOptions -> [Block] -> Text -- | Flatten pandoc metadata to an aeson value. flattenMeta :: MonadThrow m => (Pandoc -> PandocPure Text) -> Meta -> m Value