packages feed

compdoc 0.1.0.0 → 0.2.0.0

raw patch · 4 files changed

+12/−6 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Text.Compdoc: fContent :: forall f_aq6d rs_aq6e. (Functor f_aq6d, (∈) FContent rs_aq6e) => (Text -> f_aq6d Text) -> Record rs_aq6e -> f_aq6d (Record rs_aq6e)
+ Text.Compdoc: fContent :: forall f_aiOb rs_aiOc. (Functor f_aiOb, (∈) FContent rs_aiOc) => (Text -> f_aiOb Text) -> Record rs_aiOc -> f_aiOb (Record rs_aiOc)
- Text.Compdoc: type Compdoc a = a ++ (FContent : '[])
+ Text.Compdoc: type Compdoc a = FContent : a

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for compdoc -# v0.1.0.0+## v0.2.0.0++* Removed type family from compdoc definition.++## v0.1.0.0  * Initial data declaration and parsing functions.
README.md view
@@ -1,6 +1,8 @@ # Compdoc - Composite Pandoc Format -Compdoc is an alternative format for reading pandoc markdown data using [composite](https://hackage.haskell.org/package/composite-base) and [composite-aeson](https://hackage.haskell.org/package/composite-aeson).+Compdoc is an alternative format for reading pandoc markdown data using+[composite](https://hackage.haskell.org/package/composite-base) and+[composite-aeson](https://hackage.haskell.org/package/composite-aeson).  Compdoc will read a pandoc markdown file according to the `JsonFormat` that you supply to parse the metadata, and place the main body in an `FContents` fields
compdoc.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           compdoc-version:        0.1.0.0+version:        0.2.0.0 synopsis:       Parse a Pandoc to a composite value. description:    Provides a functionality for transforming a Pandoc into a vinyl/composite record. category:       Text
src/Text/Compdoc.hs view
@@ -10,6 +10,7 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TemplateHaskell   #-}+{-# LANGUAGE TypeApplications  #-} {-# LANGUAGE TypeOperators     #-} module Text.Compdoc (   FContent@@ -30,7 +31,6 @@ import           Composite.TH import           Data.Aeson import           Data.Vinyl ((<+>))-import           Data.Vinyl.TypeLevel import           Path import           RIO import           Text.Pandoc@@ -42,7 +42,7 @@   |]  -- | A Compdoc is a Record with at least an FContent field.-type Compdoc a = a ++ (FContent : '[])+type Compdoc a = FContent ': a  -- | Write a list of `Block`s to `Text` using `WriterOptions` defaulting to the empty string -- in the case of error.@@ -71,7 +71,7 @@ pandocToCompdoc :: (Typeable e, Show e, MonadThrow m) => (WriterOptions -> Pandoc -> PandocPure Text) -> WriterOptions -> JsonFormat e (Record a) -> Pandoc -> m (Record (Compdoc a)) pandocToCompdoc writer wopts f (Pandoc meta xs) = do   k <- flattenMeta (writer wopts) meta >>= parseValue' f-  return $ k <+> contentBlock wopts xs+  return $ contentBlock wopts xs <+> k  -- | Create the tail of a `Compdoc` which is just an `FContent` field. contentBlock :: WriterOptions -> [Block] -> Record (FContent : '[])