diagrams-svg 1.4.3 → 1.4.3.1
raw patch · 4 files changed
+45/−14 lines, 4 filesdep −ghc-primdep ~basedep ~colourdep ~containersPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies removed: ghc-prim
Dependency ranges changed: base, colour, containers, diagrams-lib, filepath, hashable, lens, mtl, optparse-applicative, semigroups, text
API changes (from Hackage documentation)
+ Diagrams.Backend.SVG: instance GHC.Classes.Eq Graphics.Svg.Core.Element
+ Diagrams.Backend.SVG: instance GHC.Classes.Eq n => GHC.Classes.Eq (Diagrams.Core.Types.Options Diagrams.Backend.SVG.SVG Linear.V2.V2 n)
- Diagrams.Backend.SVG: data family Options b (v :: Type -> Type) n :: Type
+ Diagrams.Backend.SVG: data family Options b (v :: Type -> Type) n
Files
- CHANGELOG.md +20/−0
- diagrams-svg.cabal +11/−13
- src/Diagrams/Backend/SVG.hs +13/−0
- src/Diagrams/Backend/SVG/CmdLine.hs +1/−1
CHANGELOG.md view
@@ -1,3 +1,23 @@+## [v1.4.3.1](https://github.com/diagrams/diagrams-svg/tree/v1.4.3.1) (2021-12-28)++- Dependency upper bounds updates to allow:+ - `base-4.16` (GHC 9.2)+ - `lens-5.1`+ - `hashable-1.4`+ - `semigroups-0.20`+- Add `Eq` instance for `Options SVG` and (orphan) `Eq` instance for `Element`++## [v1.4.3-r3](https://github.com/diagrams/diagrams-svg/tree/v1.4.3-r3) (2021-06-08)++Dependency upper bounds updates, to allow:++- `base-4.15` (GHC 9.0)+- `base64-bytestring-1.2`+- `diagrams-core-1.5`+- `monoid-extras-0.6`+- `lens-5.0`+- `optparse-applicative-0.16`+ ## [v1.4.3](https://github.com/diagrams/diagrams-svg/tree/v1.4.3) (2019-12-10) - Allow `base-4.13` (GHC 8.8), `lens-4.18`, `semigroups-0.19`,
diagrams-svg.cabal view
@@ -1,7 +1,7 @@ Name: diagrams-svg-Version: 1.4.3+Version: 1.4.3.1 Synopsis: SVG backend for diagrams drawing EDSL.-Homepage: http://projects.haskell.org/diagrams/+Homepage: https://diagrams.github.io/ License: BSD3 License-file: LICENSE Extra-source-files: README.md, CHANGELOG.md@@ -12,7 +12,7 @@ Category: Graphics Build-type: Simple Cabal-version: >=1.10-Tested-with: GHC ==7.10.3 || ==8.0.2 || ==8.2.2 || ==8.4.3 || ==8.6.5 || ==8.8.1+Tested-with: GHC ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.4 || ==9.0.1 || ==9.2.1 Description: This package provides a modular backend for rendering diagrams created with the diagrams EDSL to SVG files. It uses @lucid-svg@ to be a native@@ -40,26 +40,24 @@ Diagrams.Backend.SVG.CmdLine Other-modules: Graphics.Rendering.SVG Hs-source-dirs: src- Build-depends: base >= 4.7 && < 4.14+ Build-depends: base >= 4.7 && < 4.17 , filepath , mtl >= 1 && < 2.3 , bytestring >= 0.9 && < 1.0- , base64-bytestring >= 1 && < 1.1+ , base64-bytestring >= 1 && < 1.3 , colour- , diagrams-core >= 1.4 && < 1.5+ , diagrams-core >= 1.4 && < 1.6 , diagrams-lib >= 1.4 && < 1.5- , monoid-extras >= 0.3 && < 0.6+ , monoid-extras >= 0.3 && < 0.7 , svg-builder >= 0.1 && < 0.2 , text >= 0.11 && < 1.3 , JuicyPixels >= 3.1.5 && < 3.4 , split >= 0.1.2 && < 0.3 , containers >= 0.3 && < 0.7- , lens >= 4.0 && < 4.19- , hashable >= 1.1 && < 1.4- , optparse-applicative >= 0.13 && < 0.16- , semigroups >= 0.13 && < 0.20- if impl(ghc < 7.6)- build-depends: ghc-prim+ , lens >= 4.0 && < 5.2+ , hashable >= 1.1 && < 1.5+ , optparse-applicative >= 0.13 && < 0.17+ , semigroups >= 0.13 && < 0.21 Ghc-options: -Wall
src/Diagrams/Backend/SVG.hs view
@@ -17,6 +17,8 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeSynonymInstances #-} +{-# OPTIONS_GHC -fno-warn-orphans #-}+ ---------------------------------------------------------------------------- -- | -- Module : Diagrams.Backend.SVG@@ -125,6 +127,7 @@ import Control.Monad.Reader import Control.Monad.State import Data.Char+import Data.Function (on) import Data.Typeable -- from hashable@@ -254,6 +257,7 @@ -- ^ Attriubtes to apply to the entire svg element. , _generateDoctype :: Bool }+ deriving Eq renderRTree :: SVG -> Options SVG V2 n -> RTree SVG V2 n Annotation -> Result SVG V2 n renderRTree _ opts rt = runRenderM (opts ^.idPrefix) svgOutput@@ -427,3 +431,12 @@ sa `hashWithSalt` gd where ds = fmap renderBS defs++-- This is an orphan instance. Since Element is defined as a newtype+-- of (HashMap Text Text -> Builder), it doesn't really make sense to+-- define an Eq instance for it in general. However, as of+-- hashable-1.4 an Eq superclass was added to Hashable, so in order to+-- have a Hashable instance for Options SVG, we need to have a+-- matching Eq instance.+instance Eq Element where+ (==) = (==) `on` renderBS
src/Diagrams/Backend/SVG/CmdLine.hs view
@@ -50,7 +50,7 @@ -- "Diagrams.Backend.SVG" for more information. -- -- For a tutorial on command-line diagram creation see--- <http://projects.haskell.org/diagrams/doc/cmdline.html>.+-- <https://diagrams.github.io/doc/cmdline.html>. -- -----------------------------------------------------------------------------