packages feed

Rasterific 0.7.2.1 → 0.7.2.2

raw patch · 4 files changed

+46/−32 lines, 4 filesdep +faildep +semigroupsPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: fail, semigroups

API changes (from Hackage documentation)

+ Graphics.Rasterific.Transformations: instance Data.Semigroup.Semigroup Graphics.Rasterific.Transformations.Transformation
- Graphics.Rasterific: class Geometry a where listToPrims = concatMap toPrimitives . toList
+ Graphics.Rasterific: class Geometry a
- Graphics.Rasterific: class (Ord a, Num a) => Modulable a where coverageModulate c a = (clamped, fullValue - clamped) where clamped = modulate a c
+ Graphics.Rasterific: class (Ord a, Num a) => Modulable a
- Graphics.Rasterific: class Transformable a where transform f = runIdentity . transformM (return . f)
+ Graphics.Rasterific: class Transformable a
- Graphics.Rasterific: listToPrims :: (Geometry a, Foldable f) => f a -> [Primitive]
+ Graphics.Rasterific: listToPrims :: (Geometry a, (Foldable f)) => f a -> [Primitive]
- Graphics.Rasterific.Linear: class Additive f => Metric f where quadrance v = dot v v qd f g = quadrance (f ^-^ g) distance f g = norm (f ^-^ g) norm v = sqrt (quadrance v) signorm v = fmap (/ m) v where m = norm v
+ Graphics.Rasterific.Linear: class Additive f => Metric f

Files

README.md view
@@ -1,27 +1,26 @@-Rasterific-==========--![Rasterific logo](https://raw.github.com/Twinside/Rasterific/master/img/logo.png)--[![Build Status](https://travis-ci.org/Twinside/Rasterific.png?branch=master)](https://travis-ci.org/Twinside/Rasterific)-[![Hackage](https://img.shields.io/hackage/v/Rasterific.svg)](http://hackage.haskell.org/package/Rasterific)--Rasterific is a Haskell rasterization engine (a vectorial renderer)-implemented on top of [JuicyPixels](https://github.com/Twinside/Juicy.Pixels).-Rasterific bases its text rendering on [FontyFruity](https://github.com/Twinside/FontyFruity).--Main capability------------------ * Draw vector graphics to an image.- * Export graphics to PDF (since 0.6).--Design--------The renderer design is based on the-[Nile](https://github.com/damelang/nile) /-[Gezira](https://github.com/damelang/gezira) renderer from the STEP-project from the [VPRI](http://www.vpri.org/index.html) institute. The-interesting thing about this renderer is the conciseness of it's-implementation, providing antialiased rendering in the way.-+Rasterific
+==========
+
+![Rasterific logo](https://raw.github.com/Twinside/Rasterific/master/img/logo.png)
+
+[![Hackage](https://img.shields.io/hackage/v/Rasterific.svg)](http://hackage.haskell.org/package/Rasterific)
+
+Rasterific is a Haskell rasterization engine (a vectorial renderer)
+implemented on top of [JuicyPixels](https://github.com/Twinside/Juicy.Pixels).
+Rasterific bases its text rendering on [FontyFruity](https://github.com/Twinside/FontyFruity).
+
+Main capability
+---------------
+
+ * Draw vector graphics to an image.
+ * Export graphics to PDF (since 0.6).
+
+Design
+------
+The renderer design is based on the
+[Nile](https://github.com/damelang/nile) /
+[Gezira](https://github.com/damelang/gezira) renderer from the STEP
+project from the [VPRI](http://www.vpri.org/index.html) institute. The
+interesting thing about this renderer is the conciseness of it's
+implementation, providing antialiased rendering in the way.
+
Rasterific.cabal view
@@ -1,7 +1,7 @@ -- Initial Rasterific.cabal generated by cabal init.  For further 
 -- documentation, see http://haskell.org/cabal/users-guide/
 name:                Rasterific
-version:             0.7.2.1
+version:             0.7.2.2
 synopsis:            A pure haskell drawing engine.
 -- A longer description of the package.
 description:
@@ -24,7 +24,7 @@ 
 -- extra-source-files:  
 
-cabal-version:       >= 1.10
+cabal-version:       >= 1.18
 extra-doc-files: docimages/*.png
 extra-source-files: changelog
                   , README.md
@@ -40,7 +40,7 @@ Source-Repository this
     Type:      git
     Location:  git://github.com/Twinside/Rasterific.git
-    Tag:       v0.7.2.1
+    Tag:       v0.7.2.2
 
 flag embed_linear
   description: Embed a reduced version of Linear avoiding a (huge) dep
@@ -82,6 +82,13 @@   ghc-options: -O3 -Wall 
   -- -ddump-simpl -ddump-to-file -dsuppress-module-prefixes -dsuppress-uniques
   default-language: Haskell2010
+
+  if impl(ghc >= 8.0)
+    ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances
+  else
+    -- provide/emulate `Control.Monad.Fail` and `Data.Semigroups` API for pre-GHC8
+    build-depends: fail == 4.9.*, semigroups == 0.18.*
+
   build-depends: base        >= 4.8     && < 5
                , free        >= 4.7
                , JuicyPixels >= 3.2
changelog view
@@ -1,6 +1,11 @@ Change log
 ==========
 
+v0.7.2.2
+--------
+
+ * Fix: adding Semigroup instances for GHC 8.4
+ 
 v0.7.2.1
 --------
 
src/Graphics/Rasterific/Transformations.hs view
@@ -18,7 +18,7 @@     , inverseTransformation
     ) where
 
-import Data.Monoid( (<>) )
+import Data.Semigroup( Semigroup( .. ) )
 import Graphics.Rasterific.Types
 import Graphics.Rasterific.Linear( V2( .. ), normalize )
 
@@ -53,8 +53,11 @@               (b * c' + d * d' {- below d' is zero -})
               (b * e' + d * f' + f {- below f' is one -})
 
+instance Semigroup Transformation where
+    (<>) = transformCombine
+
 instance Monoid Transformation where
-    mappend = transformCombine
+    mappend = (<>)
     mempty = Transformation 1 0 0
                             0 1 0