packages feed

diagrams 0.2.1.3 → 0.2.2

raw patch · 3 files changed

+13/−8 lines, 3 filesdep ~mtlPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: mtl

API changes (from Hackage documentation)

- Graphics.Rendering.Diagrams.Layouts: instance Functor Identity

Files

CHANGES view
@@ -1,3 +1,10 @@+Version 0.2.2: November 2, 2010++  * update mtl dependency to 2.0.  Note that due to the changed+    definition of Cont, this version does NOT compile with versions of+    mtl previous to 2.0.  If you need to use a version of mtl < 2.0+    then stick with 0.2.1.3 for now.+ Version 0.2.1.3: May 30, 2010    * update cairo version range to allow 0.11
Graphics/Rendering/Diagrams/Layouts.hs view
@@ -58,6 +58,7 @@ import Graphics.Rendering.Diagrams.Engine (sizeAndPos) import Control.Arrow (first) import Control.Monad.Cont+import Control.Monad.Identity  import Data.List (transpose) import Data.Tree@@ -409,10 +410,6 @@  -- Miscellaneous --------------------------------- -newtype Identity a = Identity a-instance Functor Identity where-  fmap f (Identity x) = Identity (f x)- data Padded = Padded Double Double HAlignment VAlignment instance LayoutClass Padded Identity where   layoutSizeAndPos (Padded dw dh ha va) (Identity ((w,h), d))@@ -466,8 +463,9 @@          -> Diagram withSize f dia = Compound (Layout (FromSize f) (Identity dia)) -diagSize :: Diagram -> Cont Diagram (Double, Double) -diagSize d = Cont { runCont = \f -> flip withSize d $ \w h -> f (w, h) } +diagSize :: Diagram -> Cont Diagram (Double, Double)+diagSize d = ContT { runContT = \f -> Identity . flip withSize d $+                                      \w h -> runIdentity (f (w, h)) }  -- | Align diagrams into a grid, specifying individual alignments for each item. --   Warning: there is currently an exponential performace blowup if you nest grids
diagrams.cabal view
@@ -1,5 +1,5 @@ Name:                diagrams-Version:             0.2.1.3+Version:             0.2.2 Stability:           experimental Description:         An embedded domain-specific language (EDSL) for                       creating simple diagrams, built on top of the Cairo@@ -24,7 +24,7 @@   ghc-options:       -Wall   if flag(testing)     ghc-options: -Werror-  Build-Depends:     base >= 2 && < 5, mtl >= 1.0 && < 1.2,+  Build-Depends:     base >= 2 && < 5, mtl >= 2.0 && < 2.1,                      containers >= 0.2 && < 0.4,                      cairo >= 0.9 && < 0.12, colour >= 2.2.1 && < 2.4   Exposed-Modules:   Graphics.Rendering.Diagrams,