active 0.1.0.6 → 0.1.0.7
raw patch · 3 files changed
+13/−4 lines, 3 filesdep ~semigroups
Dependency ranges changed: semigroups
Files
- CHANGES +5/−0
- active.cabal +3/−3
- src/Data/Active.hs +5/−1
CHANGES view
@@ -1,3 +1,8 @@+0.1.0.7 (27 September 2013)+---------------------------++ * allow semigroups-0.11+ 0.1.0.6 (16 July 2013) ----------------------
active.cabal view
@@ -1,5 +1,5 @@ name: active-version: 0.1.0.6+version: 0.1.0.7 synopsis: Abstractions for animation description: "Active" abstraction for animated things with finite start and end times. license: BSD3@@ -21,7 +21,7 @@ exposed-modules: Data.Active build-depends: base >= 4.0 && < 4.8, array >= 0.3 && < 0.5,- semigroups >= 0.1 && < 0.10,+ semigroups >= 0.1 && < 0.12, semigroupoids >= 1.2 && < 3.2, vector-space >= 0.8 && < 0.9, newtype >= 0.2 && < 0.3@@ -33,7 +33,7 @@ main-is: active-tests.hs build-depends: base >= 4.0 && < 4.8, array >= 0.3 && < 0.5,- semigroups >= 0.1 && < 0.10,+ semigroups >= 0.1 && < 0.12, semigroupoids >= 1.2 && < 3.2, vector-space >= 0.8 && < 0.9, newtype >= 0.2 && < 0.3,
src/Data/Active.hs view
@@ -144,6 +144,7 @@ import Data.Monoid (First(..)) import Data.VectorSpace hiding ((<.>))+import qualified Data.VectorSpace as VS import Data.AffineSpace ------------------------------------------------------------@@ -157,7 +158,7 @@ -- other numeric types. newtype Time = Time { unTime :: Rational } deriving ( Eq, Ord, Show, Read, Enum, Num, Fractional, Real, RealFrac- , AdditiveGroup, InnerSpace+ , AdditiveGroup ) instance Newtype Time Rational where@@ -167,6 +168,9 @@ instance VectorSpace Time where type Scalar Time = Rational s *^ (Time t) = Time (s * t)++instance InnerSpace Time where+ (Time a) <.> (Time b) = a * b -- | Convert any value of a 'Real' type (including @Int@, @Integer@, -- @Rational@, @Float@, and @Double@) to a 'Time'.