xmlgen 0.4.0.2 → 0.4.0.3
raw patch · 2 files changed
+25/−6 lines, 2 filesdep +mtldep −monads-tfdep ~basedep ~bytestringdep ~containers
Dependencies added: mtl
Dependencies removed: monads-tf
Dependency ranges changed: base, bytestring, containers
Files
- src/Text/XML/Generator.hs +20/−2
- xmlgen.cabal +5/−4
src/Text/XML/Generator.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE FlexibleContexts, TypeSynonymInstances, FlexibleInstances, TypeFamilies, MultiParamTypeClasses, BangPatterns,- UndecidableInstances, OverlappingInstances #-}+ UndecidableInstances, OverlappingInstances, CPP #-} -- | This module provides combinators for generating XML documents. -- -- As an example, suppose you want to generate the following XML document:@@ -69,6 +69,21 @@ import qualified Data.Text as T import qualified Data.Text.Lazy as TL +#ifdef MIN_VERSION_base++#if MIN_VERSION_base(4,5,0)+#define BASE_AT_LEAST_4_5_0_0+#endif++#else++-- Fallback for ghci+#if __GLASGOW_HASKELL__ >= 704+#define BASE_AT_LEAST_4_5_0_0+#endif++#endif+ -- -- Basic definitions --@@ -456,14 +471,17 @@ -- Operators -- +-- Note: (<>) is defined in Data.Monoid starting with base 4.5.0.0+#ifndef BASE_AT_LEAST_4_5_0_0 infixl 6 <> -- | Shortcut for the 'mappend' functions of monoids. Used to concatenate elements, attributes -- and text nodes. (<>) :: Monoid t => t -> t -> t (<>) = mappend+#endif infixl 5 <#>--- | Shortcut for coonstructing pairs. Used in combination with 'xelem' for separating child-attributes+-- | Shortcut for constructing pairs. Used in combination with 'xelem' for separating child-attributes -- from child-elements. (<#>) :: a -> b -> (a, b) (<#>) x y = (x, y)
xmlgen.cabal view
@@ -1,5 +1,5 @@ Name: xmlgen-Version: 0.4.0.2+Version: 0.4.0.3 Synopsis: Fast XML generation library Description: Library for high-performance XML generation. License: BSD3@@ -9,6 +9,7 @@ Category: Text, XML Build-type: Simple Cabal-version: >=1.6+Tested-With: GHC==7.0.4, GHC==7.2.1, GHC==7.4.1, GHC==7.4.2, GHC==7.6.1 Source-Repository head type: git@@ -17,9 +18,9 @@ Library Exposed-modules: Text.XML.Generator Hs-Source-Dirs: src- Build-Depends: base >= 4.2 && < 4.4, blaze-builder == 0.3.*,- bytestring == 0.9.*, containers >= 0.3 && < 0.5,- monads-tf == 0.1.*, text >= 0.10 && < 0.12+ Build-Depends: base >= 4.2 && < 4.7, blaze-builder == 0.3.*,+ bytestring >= 0.9 && < 0.11, containers >= 0.3 && < 0.6,+ mtl >= 2.0 && < 2.2, text >= 0.10 && < 0.12 Ghc-Prof-Options: -auto-all -caf-all Flag tests