packages feed

pro-abstract 0.1.4.0 → 0.2.0.0

raw patch · 8 files changed

+18/−15 lines, 8 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- ProAbstract: blockTag :: Prism' (Block ann) (BlockTag ann)
- ProAbstract: paragraph :: Prism' (Block ann) (Paragraph ann)
- ProAbstract.Optics: blockTag :: Prism' (Block ann) (BlockTag ann)
- ProAbstract.Optics: paragraph :: Prism' (Block ann) (Paragraph ann)
- ProAbstract.Structure: blockTag :: Prism' (Block ann) (BlockTag ann)
- ProAbstract.Structure: paragraph :: Prism' (Block ann) (Paragraph ann)

Files

changelog.txt view
@@ -14,3 +14,7 @@  v0.1.4.0 - Export BlockTagContent from the ProAbstract module            (mistakenly omitted in v0.1.1.0)++v0.2.0.0 - Remove:+    - prism 'blockTag' -- use 'tagged' instead+    - prism 'paragraph' -- use 'bare' instead
library/pro-abstract/ProAbstract.hs view
@@ -195,7 +195,7 @@ | 'Inline'              | 'Tagged' 'Lines'      | 'Fragment'            | +-----------------------+-----------------------+-----------------------+ -('Block' also has a third prism, 'paragraph', which is neither fork nor plain.)+('Block' also has a third prism, 'bare', which is neither fork nor plain.)   === Annotation@@ -236,7 +236,7 @@      {- * Blocks -} Block (..), Blocks (..),     {- ** Paragraphs -} Paragraph (..), HasManyParagraphs (..),-    {- ** Tag blocks -} BlockTag (..), blockTag, BlockTagContent (..),+    {- ** Tag blocks -} BlockTag (..), BlockTagContent (..),      {- * Lines -} Inline (..), Line (..), Lines (..),     {- ** Plain text -} Fragment (..), PlainBlock (..),@@ -248,10 +248,8 @@             HasWitherableInlineTags (..), HasWitherableBlockTags (..),      {- * Prisms -}-    {- ** Plain -} Plain, CanBePlain (..),-    {- ** Fork -} Fork, CanFork (..),+    {- ** Plain/fork -} Plain, CanBePlain (..), Fork, CanFork (..),     {- ** Tagged/bare -} tagged, bare, IsTaggedOrBare (..), TaggedOrBare (..),-    {- ** Paragraph -} paragraph,      {- * Metadata -} Metadata (..), HasMetadata (..), HasManyMetadata (..),     {- ** Properties -} properties, hasProperty,
library/pro-abstract/ProAbstract/Optics.hs view
@@ -10,7 +10,7 @@     , metadata, atSetting, hasProperty, properties, settings      -- * Prisms-    , fork, plain, paragraph, blockTag, tagged, bare+    , fork, plain, tagged, bare      -- * Isomorphisms     , taggedOrBare
library/pro-abstract/ProAbstract/Structure.hs view
@@ -4,7 +4,7 @@       Document (..)      -- * Blocks-    , Block (..), paragraph, Blocks (..), BlockTag (..), blockTag, BlockTagContent (..)+    , Block (..), Blocks (..), BlockTag (..), BlockTagContent (..)      -- * Paragraph     , Paragraph (..)
library/pro-abstract/ProAbstract/Structure/Block.hs view
@@ -21,7 +21,7 @@  data Block ann =     BlockPlain     (Tagged (PlainBlock ann)) -- ^ 'ProAbstract.plain'-  | BlockParagraph (Paragraph ann)           -- ^ 'ProAbstract.paragraph'+  | BlockParagraph (Paragraph ann)           -- ^ 'ProAbstract.bare'   | BlockFork      (Tagged (Blocks ann))     -- ^ 'ProAbstract.fork'   deriving stock (Eq, Show, Generic)   deriving anyclass (Hashable, NFData)
library/pro-abstract/ProAbstract/Tagless/CanBeTagless.hs view
@@ -28,9 +28,9 @@ instance CanBeTagless (Inline ann) where     tagless s = plain % tagless s --- | Only a 'paragraph' inline is considered to be plain text, because 'fork' and 'plain' blocks have tags.+-- | Only a 'bare' block is considered to be plain text, because 'fork' and 'plain' blocks have tags. instance CanBeTagless (Block ann) where-    tagless s = paragraph % tagless s+    tagless s = bare % tagless s  instance CanBeTagless (Blocks ann) where     tagless = \case
library/pro-abstract/ProAbstract/Tagless/CanHaveTaglessContent.hs view
@@ -12,9 +12,8 @@  instance CanHaveTaglessContent (Block ann) where     taglessContent s =-        (plain % taglessContent @(Tagged (PlainBlock ann)) s) `afailing`-        (fork % taglessContent @(Tagged (Blocks ann)) s) `afailing`-        (paragraph % tagless @(Paragraph ann) s)+        (tagged % taglessContent @(BlockTag ann) s) `afailing`+        (bare % tagless @(Paragraph ann) s)  instance CanHaveTaglessContent (BlockTag ann) where     taglessContent s =@@ -25,7 +24,9 @@     taglessContent = tagless  instance CanHaveTaglessContent (Inline ann) where-    taglessContent s = (plain % tagless s) `afailing` (fork % taglessContent s)+    taglessContent s =+        (plain % tagless s) `afailing`+        (fork % taglessContent s)  instance CanHaveTaglessContent (Lines ann) where     taglessContent = tagless
pro-abstract.cabal view
@@ -1,7 +1,7 @@ cabal-version: 3.0  name: pro-abstract-version: 0.1.4.0+version: 0.2.0.0  category: Language synopsis: Abstract syntax for writing documents