packages feed

xml-conduit-writer 0.1.1.4 → 0.1.1.5

raw patch · 2 files changed

+15/−7 lines, 2 filesdep ~mtlPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

Dependency ranges changed: mtl

API changes (from Hackage documentation)

+ Text.XML.Writer: documentA :: Name -> [(Name, Text)] -> XML -> Document
+ Text.XML.Writer: documentAD :: Name -> [(Name, Text)] -> Maybe Doctype -> XML -> Document
+ Text.XML.Writer: documentD :: Name -> Maybe Doctype -> XML -> Document

Files

src/Text/XML/Writer.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE OverloadedStrings, TypeSynonymInstances, FlexibleInstances #-}+{-# LANGUAGE OverloadedStrings, TypeSynonymInstances, FlexibleInstances, CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- IsString for XML  -- | Overcome XML insanity, node by node.@@ -17,7 +17,11 @@ module Text.XML.Writer     (     -- * Documents-      document, soap+      document+    , documentA+    , documentD+    , documentAD+    , soap     , pprint     -- * Elements     , XML@@ -46,6 +50,10 @@ import qualified Data.Text.Lazy.IO as TL import Data.String (IsString(..)) +#if MIN_VERSION_mtl(2,3,0)+import Control.Monad+#endif+ -- | Node container to be rendered as children nodes. type XML = Writer (DL.DList Node) () @@ -70,7 +78,7 @@  -- | Create a simple Document starting with a root element with a doctype. documentD :: Name             -- ^ Root node name-            -> Maybe Doctype  -- ^ DOCTYPE +            -> Maybe Doctype  -- ^ DOCTYPE             -> XML            -- ^ Contents             -> Document documentD name dt children = Document { documentPrologue = Prologue def dt def@@ -130,11 +138,11 @@ content = node . NodeContent  -- | Mass-convert to nodes.--- +-- -- > let array = element "container" $ many "wrapper" [1..3]--- +-- -- Which gives:--- +-- -- > <container> -- >     <wrapper>1</wrapper> -- >     <wrapper>2</wrapper>
xml-conduit-writer.cabal view
@@ -1,6 +1,6 @@ cabal-version:       3.0 name:                xml-conduit-writer-version:             0.1.1.4+version:             0.1.1.5 synopsis:            Warm and fuzzy creation of XML documents. description:     “It can scarcely be denied that the supreme goal of