packages feed

active 0.2.0.18 → 0.2.1

raw patch · 3 files changed

+24/−10 lines, 3 filesdep ~QuickCheckdep ~basedep ~lensPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: QuickCheck, base, lens, linear, vector

API changes (from Hackage documentation)

- Data.Active: instance (Data.Active.Active a1 GHC.Types.~ t) => Control.Lens.Wrapped.Rewrapped (Data.Active.Active a2) t
- Data.Active: instance (Data.Active.Duration n1 GHC.Types.~ t) => Control.Lens.Wrapped.Rewrapped (Data.Active.Duration n2) t
- Data.Active: instance (Data.Active.Time n1 GHC.Types.~ t) => Control.Lens.Wrapped.Rewrapped (Data.Active.Time n2) t
- Data.Active: instance Control.Lens.Wrapped.Wrapped (Data.Active.Duration n)
- Data.Active: instance Control.Lens.Wrapped.Wrapped (Data.Active.Time n)
+ Data.Active: instance Control.Lens.Wrapped.Rewrapped (Data.Active.Active a) (Data.Active.Active b)
+ Data.Active: instance Control.Lens.Wrapped.Rewrapped (Data.Active.Duration a) (Data.Active.Duration b)
+ Data.Active: instance Control.Lens.Wrapped.Rewrapped (Data.Active.Time a) (Data.Active.Time b)
+ Data.Active: instance Control.Lens.Wrapped.Wrapped (Data.Active.Duration a)
+ Data.Active: instance Control.Lens.Wrapped.Wrapped (Data.Active.Time a)

Files

CHANGES view
@@ -1,3 +1,8 @@+## [0.2.1](https://github.com/diagrams/active/tree/v0.2.1) (2023-12-15)++- Allow `base-4.19`, test on GHC 9.8+- Remove Template Haskell in order to ease cross-compilation (thanks to @georgefst)+ ## [0.2.0.18](https://github.com/diagrams/active/tree/v0.2.0.18) (2023-06-10)  - Fix failing test case ([#43](https://github.com/diagrams/active/issues/43))
active.cabal view
@@ -1,6 +1,6 @@ cabal-version:       1.18 name:                active-version:             0.2.0.18+version:             0.2.1 synopsis:            Abstractions for animation description:         "Active" abstraction for animated things with finite start and end times. license:             BSD3@@ -24,9 +24,10 @@    || ==8.8.4    || ==8.10.7    || ==9.0.2-   || ==9.2.7-   || ==9.4.4-   || ==9.6.1+   || ==9.2.8+   || ==9.4.8+   || ==9.6.3+   || ==9.8.1  source-repository head   type:     git@@ -34,8 +35,8 @@  library   exposed-modules:     Data.Active-  build-depends:       base >= 4.0 && < 4.19,-                       vector >= 0.10,+  build-depends:       base >= 4.0 && < 4.20,+                       vector >= 0.10 && < 0.14,                        semigroups >= 0.1 && < 0.21,                        semigroupoids >= 1.2 && < 6.1,                        lens >= 4.0 && < 5.3,
src/Data/Active.hs view
@@ -5,7 +5,6 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses      #-} {-# LANGUAGE ScopedTypeVariables        #-}-{-# LANGUAGE TemplateHaskell            #-} {-# LANGUAGE TypeFamilies               #-} {-# LANGUAGE TypeOperators              #-} {-# LANGUAGE TypeSynonymInstances       #-}@@ -169,7 +168,10 @@ newtype Time n = Time { unTime :: n }   deriving (Eq, Ord, Show, Read, Enum, Num, Fractional, Real, RealFrac, Functor) -makeWrapped ''Time+instance Wrapped (Time a) where+    type Unwrapped (Time a) = a+    _Wrapped' = iso unTime Time+instance Rewrapped (Time a) (Time b)  -- | A convenient wrapper function to convert a numeric value into a time. toTime :: n -> Time n@@ -219,7 +221,10 @@   (Time t1) .-. (Time t2) = Duration (t1 - t2)   (Time t) .+^ (Duration d) = Time (t + d) -makeWrapped ''Duration+instance Wrapped (Duration a) where+    type Unwrapped (Duration a) = a+    _Wrapped' = iso fromDuration toDuration+instance Rewrapped (Duration a) (Duration 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@@ -330,7 +335,10 @@ newtype Active a = Active (MaybeApply Dynamic a)   deriving (Functor, Apply, Applicative) -makeWrapped ''Active+instance Wrapped (Active a) where+    type Unwrapped (Active a) = MaybeApply Dynamic a+    _Wrapped' = iso (\(Active a) -> a) Active+instance Rewrapped (Active a) (Active b)  active :: Iso' (Active a) (Either (Dynamic a) a) active = _Wrapped . iso runMaybeApply MaybeApply