blaze-svg 0.3.6 → 0.3.6.1
raw patch · 6 files changed
+145/−113 lines, 6 filesdep ~blaze-markupdep ~mtlPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: blaze-markup, mtl
API changes (from Hackage documentation)
+ Text.Blaze.Svg: toSvg :: ToMarkup a => a -> Svg
+ Text.Blaze.Svg.Internal: a :: Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
+ Text.Blaze.Svg.Internal: aa :: Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
+ Text.Blaze.Svg.Internal: appendToPath :: [String] -> Path
+ Text.Blaze.Svg.Internal: ar :: Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
+ Text.Blaze.Svg.Internal: c :: Show a => a -> a -> a -> a -> a -> a -> Path
+ Text.Blaze.Svg.Internal: cr :: Show a => a -> a -> a -> a -> a -> a -> Path
+ Text.Blaze.Svg.Internal: h :: Show a => a -> Path
+ Text.Blaze.Svg.Internal: hr :: Show a => a -> Path
+ Text.Blaze.Svg.Internal: l :: Show a => a -> a -> Path
+ Text.Blaze.Svg.Internal: lr :: Show a => a -> a -> Path
+ Text.Blaze.Svg.Internal: m :: Show a => a -> a -> Path
+ Text.Blaze.Svg.Internal: matrix :: Show a => a -> a -> a -> a -> a -> a -> AttributeValue
+ Text.Blaze.Svg.Internal: mkPath :: Path -> AttributeValue
+ Text.Blaze.Svg.Internal: mr :: Show a => a -> a -> Path
+ Text.Blaze.Svg.Internal: q :: Show a => a -> a -> a -> a -> Path
+ Text.Blaze.Svg.Internal: qr :: Show a => a -> a -> a -> a -> Path
+ Text.Blaze.Svg.Internal: rotate :: Show a => a -> AttributeValue
+ Text.Blaze.Svg.Internal: rotateAround :: Show a => a -> a -> a -> AttributeValue
+ Text.Blaze.Svg.Internal: s :: Show a => a -> a -> a -> a -> Path
+ Text.Blaze.Svg.Internal: scale :: Show a => a -> a -> AttributeValue
+ Text.Blaze.Svg.Internal: skewX :: Show a => a -> AttributeValue
+ Text.Blaze.Svg.Internal: skewY :: Show a => a -> AttributeValue
+ Text.Blaze.Svg.Internal: sr :: Show a => a -> a -> a -> a -> Path
+ Text.Blaze.Svg.Internal: t :: Show a => a -> a -> Path
+ Text.Blaze.Svg.Internal: toSvg :: ToMarkup a => a -> Svg
+ Text.Blaze.Svg.Internal: tr :: Show a => a -> a -> Path
+ Text.Blaze.Svg.Internal: translate :: Show a => a -> a -> AttributeValue
+ Text.Blaze.Svg.Internal: type Path = State AttributeValue ()
+ Text.Blaze.Svg.Internal: type Svg = Markup
+ Text.Blaze.Svg.Internal: v :: Show a => a -> Path
+ Text.Blaze.Svg.Internal: vr :: Show a => a -> Path
+ Text.Blaze.Svg.Internal: z :: Path
- Text.Blaze.Svg11: altglyph :: Svg
+ Text.Blaze.Svg11: altglyph :: Svg -> Svg
- Text.Blaze.Svg11: desc :: Svg
+ Text.Blaze.Svg11: desc :: Svg -> Svg
- Text.Blaze.Svg11: foreignobject :: Svg
+ Text.Blaze.Svg11: foreignobject :: Svg -> Svg
- Text.Blaze.Svg11: metadata :: Svg
+ Text.Blaze.Svg11: metadata :: Svg -> Svg
- Text.Blaze.Svg11: script :: Svg
+ Text.Blaze.Svg11: script :: Svg -> Svg
- Text.Blaze.Svg11: style :: Svg
+ Text.Blaze.Svg11: style :: Svg -> Svg
- Text.Blaze.Svg11: textpath :: Svg
+ Text.Blaze.Svg11: textpath :: Svg -> Svg
- Text.Blaze.Svg11: title :: Svg
+ Text.Blaze.Svg11: title :: Svg -> Svg
- Text.Blaze.Svg11: tspan :: Svg
+ Text.Blaze.Svg11: tspan :: Svg -> Svg
Files
- CHANGES.md +5/−0
- blaze-svg.cabal +2/−2
- src/Text/Blaze/Svg.hs +2/−1
- src/Text/Blaze/Svg/Internal.hs +16/−10
- src/Text/Blaze/Svg11.hs +110/−92
- src/Util/GenerateSvgCombinators.hs +10/−8
CHANGES.md view
@@ -1,3 +1,8 @@+0.3.6.1 (13 March 2017)+-----------------------++* Allow `blaze-markup-0.8`.+ 0.3.6 (25 January 2016) -----------------------
blaze-svg.cabal view
@@ -1,5 +1,5 @@ name: blaze-svg-version: 0.3.6+version: 0.3.6.1 synopsis: SVG combinator library homepage: https://github.com/deepakjois/blaze-svg license: BSD3@@ -47,7 +47,7 @@ Build-depends: base >= 4 && < 5, mtl >= 2 && < 3,- blaze-markup >= 0.5 && < 0.8+ blaze-markup >= 0.5 && < 0.9 Source-repository head Type: git
src/Text/Blaze/Svg.hs view
@@ -3,6 +3,7 @@ ( Svg , Path+ , toSvg -- * SVG Path combinators , mkPath -- ** \"moveto\" commands@@ -11,7 +12,7 @@ , z -- ** \"lineto\" commands , l, lr, h, hr, v, vr- -- ** The cubic Bézier curve commands + -- ** The cubic Bézier curve commands , c, cr, s, sr -- ** The quadratic Bézier curve commands , q, qr, t, tr
src/Text/Blaze/Svg/Internal.hs view
@@ -1,14 +1,16 @@-{-# OPTIONS_HADDOCK hide #-} module Text.Blaze.Svg.Internal where -import Control.Monad.State-import Data.Monoid (mappend, mempty)+import Control.Monad.State+import Data.Monoid (mappend, mempty) -import Text.Blaze+import Text.Blaze -- | Type to represent an SVG document fragment. type Svg = Markup +toSvg :: ToMarkup a => a -> Svg+toSvg = toMarkup+ -- | Type to accumulate an SVG path. type Path = State AttributeValue () @@ -185,10 +187,14 @@ , show x, ",", show y , " " ]- --- | Elliptical Arc (absolute). This function is an alias for 'a' defined in--- this module. It is defined so that it can be exported instead of the a--- function due to naming conflicts with 'Text.Blaze.SVG11.a'.++-- | Elliptical Arc (absolute).+--+-- Note that this function is an alias for the function+-- 'Text.Blaze.Svg.Internal.a', defined in+-- "Text.Blaze.Svg.Internal". 'aa' is exported from "Text.Blaze.Svg"+-- instead of 'a' due to naming conflicts with 'Text.Blaze.SVG11.a'+-- from "Text.Blaze.SVG11". aa :: Show a => a -- ^ Radius in the x-direction@@ -202,8 +208,8 @@ aa = a -- | Elliptical Arc (absolute). This is the internal definition for absolute--- arcs. It is not exported but instead exported as 'aa' due to naming--- conflicts with 'Text.Blaze.SVG11.a'.+-- arcs. It is not exported but instead exported as 'aa' due to naming+-- conflicts with 'Text.Blaze.SVG11.a'. a :: Show a => a -- ^ Radius in the x-direction
src/Text/Blaze/Svg11.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} -- WARNING: The next block of code was automatically generated by -- src/Util/GenerateSvgCombinators.hs:69 --@@ -136,12 +137,13 @@ {-# INLINE a #-} -- WARNING: The next block of code was automatically generated by--- src/Util/GenerateSvgCombinators.hs:205+-- src/Util/GenerateSvgCombinators.hs:186 ----- | Combinator for the @\<altGlyph />@ element.+-- | Combinator for the @\<altGlyph>@ element. ---altglyph :: Svg -- ^ Resulting SVG.-altglyph = Leaf "altGlyph" "<altGlyph" " />"+altglyph :: Svg -- ^ Inner SVG.+ -> Svg -- ^ Resulting SVG.+altglyph = Parent "altGlyph" "<altGlyph" "</altGlyph>" {-# INLINE altglyph #-} -- WARNING: The next block of code was automatically generated by@@ -150,7 +152,7 @@ -- | Combinator for the @\<altGlyphDef />@ element. -- altglyphdef :: Svg -- ^ Resulting SVG.-altglyphdef = Leaf "altGlyphDef" "<altGlyphDef" " />"+altglyphdef = leaf "altGlyphDef" "<altGlyphDef" " />" {-# INLINE altglyphdef #-} -- WARNING: The next block of code was automatically generated by@@ -159,7 +161,7 @@ -- | Combinator for the @\<altGlyphItem />@ element. -- altglyphitem :: Svg -- ^ Resulting SVG.-altglyphitem = Leaf "altGlyphItem" "<altGlyphItem" " />"+altglyphitem = leaf "altGlyphItem" "<altGlyphItem" " />" {-# INLINE altglyphitem #-} -- WARNING: The next block of code was automatically generated by@@ -168,7 +170,7 @@ -- | Combinator for the @\<animate />@ element. -- animate :: Svg -- ^ Resulting SVG.-animate = Leaf "animate" "<animate" " />"+animate = leaf "animate" "<animate" " />" {-# INLINE animate #-} -- WARNING: The next block of code was automatically generated by@@ -177,7 +179,7 @@ -- | Combinator for the @\<animateColor />@ element. -- animatecolor :: Svg -- ^ Resulting SVG.-animatecolor = Leaf "animateColor" "<animateColor" " />"+animatecolor = leaf "animateColor" "<animateColor" " />" {-# INLINE animatecolor #-} -- WARNING: The next block of code was automatically generated by@@ -186,7 +188,7 @@ -- | Combinator for the @\<animateMotion />@ element. -- animatemotion :: Svg -- ^ Resulting SVG.-animatemotion = Leaf "animateMotion" "<animateMotion" " />"+animatemotion = leaf "animateMotion" "<animateMotion" " />" {-# INLINE animatemotion #-} -- WARNING: The next block of code was automatically generated by@@ -195,7 +197,7 @@ -- | Combinator for the @\<animateTransform />@ element. -- animatetransform :: Svg -- ^ Resulting SVG.-animatetransform = Leaf "animateTransform" "<animateTransform" " />"+animatetransform = leaf "animateTransform" "<animateTransform" " />" {-# INLINE animatetransform #-} -- WARNING: The next block of code was automatically generated by@@ -204,7 +206,7 @@ -- | Combinator for the @\<circle />@ element. -- circle :: Svg -- ^ Resulting SVG.-circle = Leaf "circle" "<circle" " />"+circle = leaf "circle" "<circle" " />" {-# INLINE circle #-} -- WARNING: The next block of code was automatically generated by@@ -223,7 +225,7 @@ -- | Combinator for the @\<color-profile />@ element. -- colorProfile :: Svg -- ^ Resulting SVG.-colorProfile = Leaf "color-profile" "<color-profile" " />"+colorProfile = leaf "color-profile" "<color-profile" " />" {-# INLINE colorProfile #-} -- WARNING: The next block of code was automatically generated by@@ -232,7 +234,7 @@ -- | Combinator for the @\<cursor />@ element. -- cursor :: Svg -- ^ Resulting SVG.-cursor = Leaf "cursor" "<cursor" " />"+cursor = leaf "cursor" "<cursor" " />" {-# INLINE cursor #-} -- WARNING: The next block of code was automatically generated by@@ -246,12 +248,13 @@ {-# INLINE defs #-} -- WARNING: The next block of code was automatically generated by--- src/Util/GenerateSvgCombinators.hs:205+-- src/Util/GenerateSvgCombinators.hs:186 ----- | Combinator for the @\<desc />@ element.+-- | Combinator for the @\<desc>@ element. ---desc :: Svg -- ^ Resulting SVG.-desc = Leaf "desc" "<desc" " />"+desc :: Svg -- ^ Inner SVG.+ -> Svg -- ^ Resulting SVG.+desc = Parent "desc" "<desc" "</desc>" {-# INLINE desc #-} -- WARNING: The next block of code was automatically generated by@@ -260,7 +263,7 @@ -- | Combinator for the @\<ellipse />@ element. -- ellipse :: Svg -- ^ Resulting SVG.-ellipse = Leaf "ellipse" "<ellipse" " />"+ellipse = leaf "ellipse" "<ellipse" " />" {-# INLINE ellipse #-} -- WARNING: The next block of code was automatically generated by@@ -269,7 +272,7 @@ -- | Combinator for the @\<feBlend />@ element. -- feblend :: Svg -- ^ Resulting SVG.-feblend = Leaf "feBlend" "<feBlend" " />"+feblend = leaf "feBlend" "<feBlend" " />" {-# INLINE feblend #-} -- WARNING: The next block of code was automatically generated by@@ -278,7 +281,7 @@ -- | Combinator for the @\<feColorMatrix />@ element. -- fecolormatrix :: Svg -- ^ Resulting SVG.-fecolormatrix = Leaf "feColorMatrix" "<feColorMatrix" " />"+fecolormatrix = leaf "feColorMatrix" "<feColorMatrix" " />" {-# INLINE fecolormatrix #-} -- WARNING: The next block of code was automatically generated by@@ -287,7 +290,7 @@ -- | Combinator for the @\<feComponentTransfer />@ element. -- fecomponenttransfer :: Svg -- ^ Resulting SVG.-fecomponenttransfer = Leaf "feComponentTransfer" "<feComponentTransfer" " />"+fecomponenttransfer = leaf "feComponentTransfer" "<feComponentTransfer" " />" {-# INLINE fecomponenttransfer #-} -- WARNING: The next block of code was automatically generated by@@ -296,7 +299,7 @@ -- | Combinator for the @\<feComposite />@ element. -- fecomposite :: Svg -- ^ Resulting SVG.-fecomposite = Leaf "feComposite" "<feComposite" " />"+fecomposite = leaf "feComposite" "<feComposite" " />" {-# INLINE fecomposite #-} -- WARNING: The next block of code was automatically generated by@@ -305,7 +308,7 @@ -- | Combinator for the @\<feConvolveMatrix />@ element. -- feconvolvematrix :: Svg -- ^ Resulting SVG.-feconvolvematrix = Leaf "feConvolveMatrix" "<feConvolveMatrix" " />"+feconvolvematrix = leaf "feConvolveMatrix" "<feConvolveMatrix" " />" {-# INLINE feconvolvematrix #-} -- WARNING: The next block of code was automatically generated by@@ -314,7 +317,7 @@ -- | Combinator for the @\<feDiffuseLighting />@ element. -- fediffuselighting :: Svg -- ^ Resulting SVG.-fediffuselighting = Leaf "feDiffuseLighting" "<feDiffuseLighting" " />"+fediffuselighting = leaf "feDiffuseLighting" "<feDiffuseLighting" " />" {-# INLINE fediffuselighting #-} -- WARNING: The next block of code was automatically generated by@@ -323,7 +326,7 @@ -- | Combinator for the @\<feDisplacementMap />@ element. -- fedisplacementmap :: Svg -- ^ Resulting SVG.-fedisplacementmap = Leaf "feDisplacementMap" "<feDisplacementMap" " />"+fedisplacementmap = leaf "feDisplacementMap" "<feDisplacementMap" " />" {-# INLINE fedisplacementmap #-} -- WARNING: The next block of code was automatically generated by@@ -332,7 +335,7 @@ -- | Combinator for the @\<feDistantLight />@ element. -- fedistantlight :: Svg -- ^ Resulting SVG.-fedistantlight = Leaf "feDistantLight" "<feDistantLight" " />"+fedistantlight = leaf "feDistantLight" "<feDistantLight" " />" {-# INLINE fedistantlight #-} -- WARNING: The next block of code was automatically generated by@@ -341,7 +344,7 @@ -- | Combinator for the @\<feFlood />@ element. -- feflood :: Svg -- ^ Resulting SVG.-feflood = Leaf "feFlood" "<feFlood" " />"+feflood = leaf "feFlood" "<feFlood" " />" {-# INLINE feflood #-} -- WARNING: The next block of code was automatically generated by@@ -350,7 +353,7 @@ -- | Combinator for the @\<feFuncA />@ element. -- fefunca :: Svg -- ^ Resulting SVG.-fefunca = Leaf "feFuncA" "<feFuncA" " />"+fefunca = leaf "feFuncA" "<feFuncA" " />" {-# INLINE fefunca #-} -- WARNING: The next block of code was automatically generated by@@ -359,7 +362,7 @@ -- | Combinator for the @\<feFuncB />@ element. -- fefuncb :: Svg -- ^ Resulting SVG.-fefuncb = Leaf "feFuncB" "<feFuncB" " />"+fefuncb = leaf "feFuncB" "<feFuncB" " />" {-# INLINE fefuncb #-} -- WARNING: The next block of code was automatically generated by@@ -368,7 +371,7 @@ -- | Combinator for the @\<feFuncG />@ element. -- fefuncg :: Svg -- ^ Resulting SVG.-fefuncg = Leaf "feFuncG" "<feFuncG" " />"+fefuncg = leaf "feFuncG" "<feFuncG" " />" {-# INLINE fefuncg #-} -- WARNING: The next block of code was automatically generated by@@ -377,7 +380,7 @@ -- | Combinator for the @\<feFuncR />@ element. -- fefuncr :: Svg -- ^ Resulting SVG.-fefuncr = Leaf "feFuncR" "<feFuncR" " />"+fefuncr = leaf "feFuncR" "<feFuncR" " />" {-# INLINE fefuncr #-} -- WARNING: The next block of code was automatically generated by@@ -386,7 +389,7 @@ -- | Combinator for the @\<feGaussianBlur />@ element. -- fegaussianblur :: Svg -- ^ Resulting SVG.-fegaussianblur = Leaf "feGaussianBlur" "<feGaussianBlur" " />"+fegaussianblur = leaf "feGaussianBlur" "<feGaussianBlur" " />" {-# INLINE fegaussianblur #-} -- WARNING: The next block of code was automatically generated by@@ -395,7 +398,7 @@ -- | Combinator for the @\<feImage />@ element. -- feimage :: Svg -- ^ Resulting SVG.-feimage = Leaf "feImage" "<feImage" " />"+feimage = leaf "feImage" "<feImage" " />" {-# INLINE feimage #-} -- WARNING: The next block of code was automatically generated by@@ -404,7 +407,7 @@ -- | Combinator for the @\<feMerge />@ element. -- femerge :: Svg -- ^ Resulting SVG.-femerge = Leaf "feMerge" "<feMerge" " />"+femerge = leaf "feMerge" "<feMerge" " />" {-# INLINE femerge #-} -- WARNING: The next block of code was automatically generated by@@ -413,7 +416,7 @@ -- | Combinator for the @\<feMergeNode />@ element. -- femergenode :: Svg -- ^ Resulting SVG.-femergenode = Leaf "feMergeNode" "<feMergeNode" " />"+femergenode = leaf "feMergeNode" "<feMergeNode" " />" {-# INLINE femergenode #-} -- WARNING: The next block of code was automatically generated by@@ -422,7 +425,7 @@ -- | Combinator for the @\<feMorphology />@ element. -- femorphology :: Svg -- ^ Resulting SVG.-femorphology = Leaf "feMorphology" "<feMorphology" " />"+femorphology = leaf "feMorphology" "<feMorphology" " />" {-# INLINE femorphology #-} -- WARNING: The next block of code was automatically generated by@@ -431,7 +434,7 @@ -- | Combinator for the @\<feOffset />@ element. -- feoffset :: Svg -- ^ Resulting SVG.-feoffset = Leaf "feOffset" "<feOffset" " />"+feoffset = leaf "feOffset" "<feOffset" " />" {-# INLINE feoffset #-} -- WARNING: The next block of code was automatically generated by@@ -440,7 +443,7 @@ -- | Combinator for the @\<fePointLight />@ element. -- fepointlight :: Svg -- ^ Resulting SVG.-fepointlight = Leaf "fePointLight" "<fePointLight" " />"+fepointlight = leaf "fePointLight" "<fePointLight" " />" {-# INLINE fepointlight #-} -- WARNING: The next block of code was automatically generated by@@ -449,7 +452,7 @@ -- | Combinator for the @\<feSpecularLighting />@ element. -- fespecularlighting :: Svg -- ^ Resulting SVG.-fespecularlighting = Leaf "feSpecularLighting" "<feSpecularLighting" " />"+fespecularlighting = leaf "feSpecularLighting" "<feSpecularLighting" " />" {-# INLINE fespecularlighting #-} -- WARNING: The next block of code was automatically generated by@@ -458,7 +461,7 @@ -- | Combinator for the @\<feSpotLight />@ element. -- fespotlight :: Svg -- ^ Resulting SVG.-fespotlight = Leaf "feSpotLight" "<feSpotLight" " />"+fespotlight = leaf "feSpotLight" "<feSpotLight" " />" {-# INLINE fespotlight #-} -- WARNING: The next block of code was automatically generated by@@ -467,7 +470,7 @@ -- | Combinator for the @\<feTile />@ element. -- fetile :: Svg -- ^ Resulting SVG.-fetile = Leaf "feTile" "<feTile" " />"+fetile = leaf "feTile" "<feTile" " />" {-# INLINE fetile #-} -- WARNING: The next block of code was automatically generated by@@ -476,7 +479,7 @@ -- | Combinator for the @\<feTurbulence />@ element. -- feturbulence :: Svg -- ^ Resulting SVG.-feturbulence = Leaf "feTurbulence" "<feTurbulence" " />"+feturbulence = leaf "feTurbulence" "<feTurbulence" " />" {-# INLINE feturbulence #-} -- WARNING: The next block of code was automatically generated by@@ -485,7 +488,7 @@ -- | Combinator for the @\<filter />@ element. -- filter_ :: Svg -- ^ Resulting SVG.-filter_ = Leaf "filter" "<filter" " />"+filter_ = leaf "filter" "<filter" " />" {-# INLINE filter_ #-} -- WARNING: The next block of code was automatically generated by@@ -494,7 +497,7 @@ -- | Combinator for the @\<font />@ element. -- font :: Svg -- ^ Resulting SVG.-font = Leaf "font" "<font" " />"+font = leaf "font" "<font" " />" {-# INLINE font #-} -- WARNING: The next block of code was automatically generated by@@ -503,7 +506,7 @@ -- | Combinator for the @\<font-face />@ element. -- fontFace :: Svg -- ^ Resulting SVG.-fontFace = Leaf "font-face" "<font-face" " />"+fontFace = leaf "font-face" "<font-face" " />" {-# INLINE fontFace #-} -- WARNING: The next block of code was automatically generated by@@ -512,7 +515,7 @@ -- | Combinator for the @\<font-face-format />@ element. -- fontFaceFormat :: Svg -- ^ Resulting SVG.-fontFaceFormat = Leaf "font-face-format" "<font-face-format" " />"+fontFaceFormat = leaf "font-face-format" "<font-face-format" " />" {-# INLINE fontFaceFormat #-} -- WARNING: The next block of code was automatically generated by@@ -521,7 +524,7 @@ -- | Combinator for the @\<font-face-name />@ element. -- fontFaceName :: Svg -- ^ Resulting SVG.-fontFaceName = Leaf "font-face-name" "<font-face-name" " />"+fontFaceName = leaf "font-face-name" "<font-face-name" " />" {-# INLINE fontFaceName #-} -- WARNING: The next block of code was automatically generated by@@ -530,7 +533,7 @@ -- | Combinator for the @\<font-face-src />@ element. -- fontFaceSrc :: Svg -- ^ Resulting SVG.-fontFaceSrc = Leaf "font-face-src" "<font-face-src" " />"+fontFaceSrc = leaf "font-face-src" "<font-face-src" " />" {-# INLINE fontFaceSrc #-} -- WARNING: The next block of code was automatically generated by@@ -539,16 +542,17 @@ -- | Combinator for the @\<font-face-uri />@ element. -- fontFaceUri :: Svg -- ^ Resulting SVG.-fontFaceUri = Leaf "font-face-uri" "<font-face-uri" " />"+fontFaceUri = leaf "font-face-uri" "<font-face-uri" " />" {-# INLINE fontFaceUri #-} -- WARNING: The next block of code was automatically generated by--- src/Util/GenerateSvgCombinators.hs:205+-- src/Util/GenerateSvgCombinators.hs:186 ----- | Combinator for the @\<foreignObject />@ element.+-- | Combinator for the @\<foreignObject>@ element. ---foreignobject :: Svg -- ^ Resulting SVG.-foreignobject = Leaf "foreignObject" "<foreignObject" " />"+foreignobject :: Svg -- ^ Inner SVG.+ -> Svg -- ^ Resulting SVG.+foreignobject = Parent "foreignObject" "<foreignObject" "</foreignObject>" {-# INLINE foreignobject #-} -- WARNING: The next block of code was automatically generated by@@ -577,7 +581,7 @@ -- | Combinator for the @\<glyphRef />@ element. -- glyphref :: Svg -- ^ Resulting SVG.-glyphref = Leaf "glyphRef" "<glyphRef" " />"+glyphref = leaf "glyphRef" "<glyphRef" " />" {-# INLINE glyphref #-} -- WARNING: The next block of code was automatically generated by@@ -586,7 +590,7 @@ -- | Combinator for the @\<hkern />@ element. -- hkern :: Svg -- ^ Resulting SVG.-hkern = Leaf "hkern" "<hkern" " />"+hkern = leaf "hkern" "<hkern" " />" {-# INLINE hkern #-} -- WARNING: The next block of code was automatically generated by@@ -595,7 +599,7 @@ -- | Combinator for the @\<image />@ element. -- image :: Svg -- ^ Resulting SVG.-image = Leaf "image" "<image" " />"+image = leaf "image" "<image" " />" {-# INLINE image #-} -- WARNING: The next block of code was automatically generated by@@ -604,7 +608,7 @@ -- | Combinator for the @\<line />@ element. -- line :: Svg -- ^ Resulting SVG.-line = Leaf "line" "<line" " />"+line = leaf "line" "<line" " />" {-# INLINE line #-} -- WARNING: The next block of code was automatically generated by@@ -638,12 +642,13 @@ {-# INLINE mask #-} -- WARNING: The next block of code was automatically generated by--- src/Util/GenerateSvgCombinators.hs:205+-- src/Util/GenerateSvgCombinators.hs:186 ----- | Combinator for the @\<metadata />@ element.+-- | Combinator for the @\<metadata>@ element. ---metadata :: Svg -- ^ Resulting SVG.-metadata = Leaf "metadata" "<metadata" " />"+metadata :: Svg -- ^ Inner SVG.+ -> Svg -- ^ Resulting SVG.+metadata = Parent "metadata" "<metadata" "</metadata>" {-# INLINE metadata #-} -- WARNING: The next block of code was automatically generated by@@ -662,7 +667,7 @@ -- | Combinator for the @\<mpath />@ element. -- mpath :: Svg -- ^ Resulting SVG.-mpath = Leaf "mpath" "<mpath" " />"+mpath = leaf "mpath" "<mpath" " />" {-# INLINE mpath #-} -- WARNING: The next block of code was automatically generated by@@ -671,7 +676,7 @@ -- | Combinator for the @\<path />@ element. -- path :: Svg -- ^ Resulting SVG.-path = Leaf "path" "<path" " />"+path = leaf "path" "<path" " />" {-# INLINE path #-} -- WARNING: The next block of code was automatically generated by@@ -690,7 +695,7 @@ -- | Combinator for the @\<polygon />@ element. -- polygon :: Svg -- ^ Resulting SVG.-polygon = Leaf "polygon" "<polygon" " />"+polygon = leaf "polygon" "<polygon" " />" {-# INLINE polygon #-} -- WARNING: The next block of code was automatically generated by@@ -699,7 +704,7 @@ -- | Combinator for the @\<polyline />@ element. -- polyline :: Svg -- ^ Resulting SVG.-polyline = Leaf "polyline" "<polyline" " />"+polyline = leaf "polyline" "<polyline" " />" {-# INLINE polyline #-} -- WARNING: The next block of code was automatically generated by@@ -718,16 +723,17 @@ -- | Combinator for the @\<rect />@ element. -- rect :: Svg -- ^ Resulting SVG.-rect = Leaf "rect" "<rect" " />"+rect = leaf "rect" "<rect" " />" {-# INLINE rect #-} -- WARNING: The next block of code was automatically generated by--- src/Util/GenerateSvgCombinators.hs:205+-- src/Util/GenerateSvgCombinators.hs:186 ----- | Combinator for the @\<script />@ element.+-- | Combinator for the @\<script>@ element. ---script :: Svg -- ^ Resulting SVG.-script = Leaf "script" "<script" " />"+script :: Svg -- ^ Inner SVG.+ -> Svg -- ^ Resulting SVG.+script = Parent "script" "<script" "</script>" . external {-# INLINE script #-} -- WARNING: The next block of code was automatically generated by@@ -736,7 +742,7 @@ -- | Combinator for the @\<set />@ element. -- set :: Svg -- ^ Resulting SVG.-set = Leaf "set" "<set" " />"+set = leaf "set" "<set" " />" {-# INLINE set #-} -- WARNING: The next block of code was automatically generated by@@ -745,16 +751,17 @@ -- | Combinator for the @\<stop />@ element. -- stop :: Svg -- ^ Resulting SVG.-stop = Leaf "stop" "<stop" " />"+stop = leaf "stop" "<stop" " />" {-# INLINE stop #-} -- WARNING: The next block of code was automatically generated by--- src/Util/GenerateSvgCombinators.hs:205+-- src/Util/GenerateSvgCombinators.hs:186 ----- | Combinator for the @\<style />@ element.+-- | Combinator for the @\<style>@ element. ---style :: Svg -- ^ Resulting SVG.-style = Leaf "style" "<style" " />"+style :: Svg -- ^ Inner SVG.+ -> Svg -- ^ Resulting SVG.+style = Parent "style" "<style" "</style>" . external {-# INLINE style #-} -- WARNING: The next block of code was automatically generated by@@ -798,21 +805,23 @@ {-# INLINE text_ #-} -- WARNING: The next block of code was automatically generated by--- src/Util/GenerateSvgCombinators.hs:205+-- src/Util/GenerateSvgCombinators.hs:186 ----- | Combinator for the @\<textPath />@ element.+-- | Combinator for the @\<textPath>@ element. ---textpath :: Svg -- ^ Resulting SVG.-textpath = Leaf "textPath" "<textPath" " />"+textpath :: Svg -- ^ Inner SVG.+ -> Svg -- ^ Resulting SVG.+textpath = Parent "textPath" "<textPath" "</textPath>" {-# INLINE textpath #-} -- WARNING: The next block of code was automatically generated by--- src/Util/GenerateSvgCombinators.hs:205+-- src/Util/GenerateSvgCombinators.hs:186 ----- | Combinator for the @\<title />@ element.+-- | Combinator for the @\<title>@ element. ---title :: Svg -- ^ Resulting SVG.-title = Leaf "title" "<title" " />"+title :: Svg -- ^ Inner SVG.+ -> Svg -- ^ Resulting SVG.+title = Parent "title" "<title" "</title>" {-# INLINE title #-} -- WARNING: The next block of code was automatically generated by@@ -821,16 +830,17 @@ -- | Combinator for the @\<tref />@ element. -- tref :: Svg -- ^ Resulting SVG.-tref = Leaf "tref" "<tref" " />"+tref = leaf "tref" "<tref" " />" {-# INLINE tref #-} -- WARNING: The next block of code was automatically generated by--- src/Util/GenerateSvgCombinators.hs:205+-- src/Util/GenerateSvgCombinators.hs:186 ----- | Combinator for the @\<tspan />@ element.+-- | Combinator for the @\<tspan>@ element. ---tspan :: Svg -- ^ Resulting SVG.-tspan = Leaf "tspan" "<tspan" " />"+tspan :: Svg -- ^ Inner SVG.+ -> Svg -- ^ Resulting SVG.+tspan = Parent "tspan" "<tspan" "</tspan>" {-# INLINE tspan #-} -- WARNING: The next block of code was automatically generated by@@ -839,7 +849,7 @@ -- | Combinator for the @\<use />@ element. -- use :: Svg -- ^ Resulting SVG.-use = Leaf "use" "<use" " />"+use = leaf "use" "<use" " />" {-# INLINE use #-} -- WARNING: The next block of code was automatically generated by@@ -848,7 +858,7 @@ -- | Combinator for the @\<view />@ element. -- view :: Svg -- ^ Resulting SVG.-view = Leaf "view" "<view" " />"+view = leaf "view" "<view" " />" {-# INLINE view #-} -- WARNING: The next block of code was automatically generated by@@ -857,5 +867,13 @@ -- | Combinator for the @\<vkern />@ element. -- vkern :: Svg -- ^ Resulting SVG.-vkern = Leaf "vkern" "<vkern" " />"+vkern = leaf "vkern" "<vkern" " />" {-# INLINE vkern #-}++leaf :: StaticString -> StaticString -> StaticString -> Svg+#if MIN_VERSION_blaze_markup(0,8,0)+leaf tag open close = Leaf tag open close ()+#else+leaf = Leaf+#endif+{-# INLINE leaf #-}
src/Util/GenerateSvgCombinators.hs view
@@ -241,13 +241,15 @@ , " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">" ] , parents =- [ "a","defs","glyph","g","marker","mask","missing-glyph","pattern", "svg"- , "switch", "symbol", "linearGradient", "radialGradient", "clipPath", "text" + [ "a", "altGlyph", "clipPath", "defs", "desc", "foreignObject", "g"+ , "glyph", "linearGradient", "marker", "mask", "metadata"+ , "missing-glyph", "pattern", "radialGradient", "script", "style"+ , "svg", "switch", "symbol", "text", "textPath", "title", "tspan" ] , leafs =- [ "altGlyph", "altGlyphDef", "altGlyphItem", "animate", "animateColor"+ [ "altGlyphDef", "altGlyphItem", "animate", "animateColor" , "animateMotion", "animateTransform", "circle", "color-profile"- , "cursor", "desc", "ellipse", "feBlend"+ , "cursor", "ellipse", "feBlend" , "feColorMatrix", "feComponentTransfer" , "feComposite" , "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap" , "feDistantLight", "feFlood", "feFuncA", "feFuncB" , "feFuncG"@@ -255,10 +257,10 @@ , "feMorphology", "feOffset", "fePointLight", "feSpecularLighting" , "feSpotLight" , "feTile", "feTurbulence", "filter", "font" , "font-face", "font-face-format" , "font-face-name", "font-face-src"- , "font-face-uri", "foreignObject" , "glyphRef", "hkern", "image"- , "line", "metadata", "mpath", "path"- , "polygon" , "polyline", "rect", "script", "set"- , "stop", "style" , "textPath", "title", "tref", "tspan", "use"+ , "font-face-uri", "glyphRef", "hkern", "image"+ , "line", "mpath", "path"+ , "polygon" , "polyline", "rect", "set"+ , "stop", "tref", "use" , "view", "vkern" ] , attributes =