Commit f97109c0 authored by Ben Gamari's avatar Ben Gamari 🐢

Update diagrams bounds

parent 4e378c6a
diff --git a/active.cabal b/active.cabal
index 20ae73c..231c8b3 100644
--- a/active.cabal
+++ b/active.cabal
@@ -24,7 +24,7 @@ library
vector >= 0.10,
semigroups >= 0.1 && < 0.19,
semigroupoids >= 1.2 && < 5.3,
- lens >= 4.0 && < 4.16,
+ lens >= 4.0 && < 4.19,
linear >= 1.14 && < 1.21
hs-source-dirs: src
default-language: Haskell2010
@@ -36,7 +36,7 @@ test-suite active-tests
vector >= 0.10,
semigroups >= 0.1 && < 0.19,
semigroupoids >= 1.2 && < 5.3,
- lens >= 4.0 && < 4.16,
+ lens >= 4.0 && < 4.19,
linear >= 1.14 && < 1.21,
QuickCheck >= 2.9 && < 2.10
other-modules: Data.Active
diff --git a/src/Data/Active.hs b/src/Data/Active.hs
index c5e1b3f..4db447b 100644
--- a/src/Data/Active.hs
+++ b/src/Data/Active.hs
@@ -162,31 +162,6 @@ import Linear.Affine
-- Time
------------------------------------------------------------
--- | An abstract type for representing /points in time/. Note that
--- literal numeric values may be used as @Time@s, thanks to the the
--- 'Num' and 'Fractional' instances.
-newtype Time n = Time { unTime :: n }
- deriving (Eq, Ord, Show, Read, Enum, Num, Fractional, Real, RealFrac, Functor)
-
-makeWrapped ''Time
-
--- | A convenient wrapper function to convert a numeric value into a time.
-toTime :: n -> Time n
-toTime = Time
-
--- | A convenient unwrapper function to turn a time into a numeric value.
-fromTime :: Time n -> n
-fromTime = unTime
-
-instance Affine Time where
- type Diff Time = Duration
- (Time t1) .-. (Time t2) = Duration (t1 - t2)
- (Time t) .+^ (Duration d) = Time (t + d)
-
--- instance Deadline Time a where
--- -- choose tm deadline (if before / at deadline) (if after deadline)
--- choose t1 t2 a b = if t1 <= t2 then a else b
-
-- | An abstract type representing /elapsed time/ between two points
-- in time. Note that durations can be negative. Literal numeric
-- values may be used as @Duration@s thanks to the 'Num' and
@@ -218,6 +193,31 @@ instance Num n => Monoid (Duration n) where
mappend = (<>)
mempty = 0
+-- | An abstract type for representing /points in time/. Note that
+-- literal numeric values may be used as @Time@s, thanks to the the
+-- 'Num' and 'Fractional' instances.
+newtype Time n = Time { unTime :: n }
+ deriving (Eq, Ord, Show, Read, Enum, Num, Fractional, Real, RealFrac, Functor)
+
+makeWrapped ''Time
+
+-- | A convenient wrapper function to convert a numeric value into a time.
+toTime :: n -> Time n
+toTime = Time
+
+-- | A convenient unwrapper function to turn a time into a numeric value.
+fromTime :: Time n -> n
+fromTime = unTime
+
+instance Affine Time where
+ type Diff Time = Duration
+ (Time t1) .-. (Time t2) = Duration (t1 - t2)
+ (Time t) .+^ (Duration d) = Time (t + d)
+
+-- instance Deadline Time a where
+-- -- choose tm deadline (if before / at deadline) (if after deadline)
+-- choose t1 t2 a b = if t1 <= t2 then a else b
+
-- | An @Era@ is a concrete span of time, that is, a pair of times
-- representing the start and end of the era. @Era@s form a
-- semigroup: the combination of two @Era@s is the smallest @Era@
diff --git a/diagrams-core.cabal b/diagrams-core.cabal
index d9672bf..243ad05 100644
--- a/diagrams-core.cabal
+++ b/diagrams-core.cabal
@@ -37,12 +37,12 @@ Library
Diagrams.Core.V
Build-depends: base >= 4.2 && < 4.12,
- containers >= 0.4.2 && < 0.6,
+ containers >= 0.4.2 && < 0.7,
unordered-containers >= 0.2 && < 0.3,
semigroups >= 0.8.4 && < 0.19,
monoid-extras >= 0.3 && < 0.6,
dual-tree >= 0.2 && < 0.3,
- lens >= 4.0 && < 4.17,
+ lens >= 4.0 && < 4.19,
linear >= 1.11.3 && < 1.21,
adjunctions >= 4.0 && < 5.0,
distributive >=0.2.2 && < 1.0,
diff --git a/diagrams-lib.cabal b/diagrams-lib.cabal
index e20d4c9..c635bad 100644
index e20d4c9..5eee537 100644
--- a/diagrams-lib.cabal
+++ b/diagrams-lib.cabal
@@ -1,5 +1,6 @@
......@@ -34,9 +34,10 @@ index e20d4c9..c635bad 100644
fingertree >= 0.1 && < 0.2,
intervals >= 0.7 && < 0.9,
- lens >= 4.6 && < 4.17,
+ lens >= 4.6 && < 4.18,
+ lens >= 4.6 && < 4.19,
tagged >= 0.7,
optparse-applicative >= 0.11 && < 0.15,
- optparse-applicative >= 0.11 && < 0.15,
+ optparse-applicative >= 0.11 && < 0.16,
filepath,
- JuicyPixels >= 3.1.5 && < 3.3,
+ JuicyPixels >= 3.1.5 && < 3.4,
......
diff --git a/diagrams-svg.cabal b/diagrams-svg.cabal
index c02d88e..660478a 100644
index c02d88e..f8884a8 100644
--- a/diagrams-svg.cabal
+++ b/diagrams-svg.cabal
@@ -1,5 +1,6 @@
......@@ -27,7 +27,7 @@ index c02d88e..660478a 100644
, filepath
, mtl >= 1 && < 2.3
, bytestring >= 0.9 && < 1.0
@@ -48,13 +49,13 @@ Library
@@ -48,15 +49,15 @@ Library
, colour
, diagrams-core >= 1.4 && < 1.5
, diagrams-lib >= 1.4 && < 1.5
......@@ -41,10 +41,13 @@ index c02d88e..660478a 100644
- , containers >= 0.3 && < 0.6
- , lens >= 4.0 && < 4.17
+ , containers >= 0.3 && < 0.7
+ , lens >= 4.0 && < 4.18
+ , lens >= 4.0 && < 4.19
, hashable >= 1.1 && < 1.3
, optparse-applicative >= 0.13 && < 0.15
- , optparse-applicative >= 0.13 && < 0.15
+ , optparse-applicative >= 0.13 && < 0.16
, semigroups >= 0.13 && < 0.19
if impl(ghc < 7.6)
build-depends: ghc-prim
diff --git a/src/Diagrams/Backend/SVG.hs b/src/Diagrams/Backend/SVG.hs
index 96d292c..66c7f54 100644
--- a/src/Diagrams/Backend/SVG.hs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment