active 0.2.0.6 → 0.2.0.7
raw patch · 12 files changed
+83/−11 lines, 12 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Data.Active: era :: Dynamic a -> Era Rational
- Data.Active: instance (Monoid a, Semigroup a) => Monoid (Active a)
- Data.Active: instance Active a1 ~ t0 => Rewrapped (Active a0) t0
- Data.Active: instance Additive Duration
- Data.Active: instance Affine Time
- Data.Active: instance Applicative Active
- Data.Active: instance Applicative Duration
- Data.Active: instance Apply Active
- Data.Active: instance Apply Dynamic
- Data.Active: instance Duration n1 ~ t0 => Rewrapped (Duration n0) t0
- Data.Active: instance Enum n => Enum (Duration n)
- Data.Active: instance Enum n => Enum (Time n)
- Data.Active: instance Eq n => Eq (Duration n)
- Data.Active: instance Eq n => Eq (Time n)
- Data.Active: instance Fractional n => Fractional (Duration n)
- Data.Active: instance Fractional n => Fractional (Time n)
- Data.Active: instance Functor Active
- Data.Active: instance Functor Duration
- Data.Active: instance Functor Dynamic
- Data.Active: instance Functor Time
- Data.Active: instance MaybeApply f1 a1 ~ t0 => Rewrapped (MaybeApply f0 a0) t0
- Data.Active: instance Num n => Monoid (Duration n)
- Data.Active: instance Num n => Num (Duration n)
- Data.Active: instance Num n => Num (Time n)
- Data.Active: instance Num n => Semigroup (Duration n)
- Data.Active: instance Ord n => Ord (Duration n)
- Data.Active: instance Ord n => Ord (Time n)
- Data.Active: instance Ord n => Semigroup (Era n)
- Data.Active: instance Read n => Read (Duration n)
- Data.Active: instance Read n => Read (Time n)
- Data.Active: instance Real n => Real (Duration n)
- Data.Active: instance Real n => Real (Time n)
- Data.Active: instance RealFrac n => RealFrac (Duration n)
- Data.Active: instance RealFrac n => RealFrac (Time n)
- Data.Active: instance Semigroup a => Semigroup (Active a)
- Data.Active: instance Semigroup a => Semigroup (Dynamic a)
- Data.Active: instance Show n => Show (Duration n)
- Data.Active: instance Show n => Show (Era n)
- Data.Active: instance Show n => Show (Time n)
- Data.Active: instance Time n1 ~ t0 => Rewrapped (Time n0) t0
- Data.Active: instance Wrapped (Active a0)
- Data.Active: instance Wrapped (Duration n0)
- Data.Active: instance Wrapped (MaybeApply f0 a0)
- Data.Active: instance Wrapped (Time n0)
- Data.Active: runDynamic :: Dynamic a -> Time Rational -> a
+ Data.Active: [era] :: Dynamic a -> Era Rational
+ Data.Active: [runDynamic] :: Dynamic a -> Time Rational -> a
+ Data.Active: instance (Data.Active.Active a1 ~ t0) => Control.Lens.Wrapped.Rewrapped (Data.Active.Active a0) t0
+ Data.Active: instance (Data.Active.Duration n1 ~ t0) => Control.Lens.Wrapped.Rewrapped (Data.Active.Duration n0) t0
+ Data.Active: instance (Data.Active.Time n1 ~ t0) => Control.Lens.Wrapped.Rewrapped (Data.Active.Time n0) t0
+ Data.Active: instance (Data.Functor.Bind.Class.MaybeApply f1 a1 ~ t0) => Control.Lens.Wrapped.Rewrapped (Data.Functor.Bind.Class.MaybeApply f0 a0) t0
+ Data.Active: instance (GHC.Base.Monoid a, Data.Semigroup.Semigroup a) => GHC.Base.Monoid (Data.Active.Active a)
+ Data.Active: instance Control.Lens.Wrapped.Wrapped (Data.Active.Active a0)
+ Data.Active: instance Control.Lens.Wrapped.Wrapped (Data.Active.Duration n0)
+ Data.Active: instance Control.Lens.Wrapped.Wrapped (Data.Active.Time n0)
+ Data.Active: instance Control.Lens.Wrapped.Wrapped (Data.Functor.Bind.Class.MaybeApply f0 a0)
+ Data.Active: instance Data.Functor.Bind.Class.Apply Data.Active.Active
+ Data.Active: instance Data.Functor.Bind.Class.Apply Data.Active.Dynamic
+ Data.Active: instance Data.Semigroup.Semigroup a => Data.Semigroup.Semigroup (Data.Active.Active a)
+ Data.Active: instance Data.Semigroup.Semigroup a => Data.Semigroup.Semigroup (Data.Active.Dynamic a)
+ Data.Active: instance GHC.Base.Applicative Data.Active.Active
+ Data.Active: instance GHC.Base.Applicative Data.Active.Duration
+ Data.Active: instance GHC.Base.Functor Data.Active.Active
+ Data.Active: instance GHC.Base.Functor Data.Active.Duration
+ Data.Active: instance GHC.Base.Functor Data.Active.Dynamic
+ Data.Active: instance GHC.Base.Functor Data.Active.Time
+ Data.Active: instance GHC.Classes.Eq n => GHC.Classes.Eq (Data.Active.Duration n)
+ Data.Active: instance GHC.Classes.Eq n => GHC.Classes.Eq (Data.Active.Time n)
+ Data.Active: instance GHC.Classes.Ord n => Data.Semigroup.Semigroup (Data.Active.Era n)
+ Data.Active: instance GHC.Classes.Ord n => GHC.Classes.Ord (Data.Active.Duration n)
+ Data.Active: instance GHC.Classes.Ord n => GHC.Classes.Ord (Data.Active.Time n)
+ Data.Active: instance GHC.Enum.Enum n => GHC.Enum.Enum (Data.Active.Duration n)
+ Data.Active: instance GHC.Enum.Enum n => GHC.Enum.Enum (Data.Active.Time n)
+ Data.Active: instance GHC.Num.Num n => Data.Semigroup.Semigroup (Data.Active.Duration n)
+ Data.Active: instance GHC.Num.Num n => GHC.Base.Monoid (Data.Active.Duration n)
+ Data.Active: instance GHC.Num.Num n => GHC.Num.Num (Data.Active.Duration n)
+ Data.Active: instance GHC.Num.Num n => GHC.Num.Num (Data.Active.Time n)
+ Data.Active: instance GHC.Read.Read n => GHC.Read.Read (Data.Active.Duration n)
+ Data.Active: instance GHC.Read.Read n => GHC.Read.Read (Data.Active.Time n)
+ Data.Active: instance GHC.Real.Fractional n => GHC.Real.Fractional (Data.Active.Duration n)
+ Data.Active: instance GHC.Real.Fractional n => GHC.Real.Fractional (Data.Active.Time n)
+ Data.Active: instance GHC.Real.Real n => GHC.Real.Real (Data.Active.Duration n)
+ Data.Active: instance GHC.Real.Real n => GHC.Real.Real (Data.Active.Time n)
+ Data.Active: instance GHC.Real.RealFrac n => GHC.Real.RealFrac (Data.Active.Duration n)
+ Data.Active: instance GHC.Real.RealFrac n => GHC.Real.RealFrac (Data.Active.Time n)
+ Data.Active: instance GHC.Show.Show n => GHC.Show.Show (Data.Active.Duration n)
+ Data.Active: instance GHC.Show.Show n => GHC.Show.Show (Data.Active.Era n)
+ Data.Active: instance GHC.Show.Show n => GHC.Show.Show (Data.Active.Time n)
+ Data.Active: instance Linear.Affine.Affine Data.Active.Time
+ Data.Active: instance Linear.Vector.Additive Data.Active.Duration
Files
- CHANGES +4/−0
- README.markdown +9/−0
- active.cabal +4/−3
- diagrams/src_Data_Active_backwardsDia.svg +3/−0
- diagrams/src_Data_Active_clampAfterDia.svg +3/−0
- diagrams/src_Data_Active_clampBeforeDia.svg +3/−0
- diagrams/src_Data_Active_clampDia.svg +3/−0
- diagrams/src_Data_Active_trimAfterDia.svg +3/−0
- diagrams/src_Data_Active_trimBeforeDia.svg +3/−0
- diagrams/src_Data_Active_trimDia.svg +3/−0
- diagrams/src_Data_Active_uiDia.svg +3/−0
- src/Data/Active.hs +42/−8
CHANGES view
@@ -1,3 +1,7 @@+## [v0.2.0.7](https://github.com/diagrams/active/tree/v0.2.0.7) (2015-11-09)++- fix image links in documentation+ ## [v0.2.0.6](https://github.com/diagrams/active/tree/v0.2.0.6) (2015-09-17) - allow `semigroups-0.17` in test suite
+ README.markdown view
@@ -0,0 +1,9 @@+[](http://travis-ci.org/diagrams/active)++This package defines an `Active` abstraction for time-varying values+with finite start and end times. It is used for describing animations+within the [diagrams framework](http://projects.haskell.org/diagrams). ++To install,++ cabal install active
active.cabal view
@@ -1,5 +1,5 @@ name: active-version: 0.2.0.6+version: 0.2.0.7 synopsis: Abstractions for animation description: "Active" abstraction for animated things with finite start and end times. license: BSD3@@ -10,8 +10,9 @@ category: Data build-type: Simple cabal-version: >=1.10-extra-source-files: CHANGES-tested-with: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.1+extra-source-files: CHANGES, README.markdown, diagrams/*.svg+extra-doc-files: diagrams/*.svg+tested-with: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.2 bug-reports: https://github.com/diagrams/active/issues source-repository head type: git
+ diagrams/src_Data_Active_backwardsDia.svg view
@@ -0,0 +1,3 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" height="200.0000" stroke-opacity="1" viewBox="0 0 200 200" font-size="1" width="200.0000" xmlns:xlink="http://www.w3.org/1999/xlink" stroke="rgb(0,0,0)" version="1.1"><defs></defs><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(255,0,0)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 166.6667,133.3333 l -100.0000,-100.0000 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="1.0" opacity="0.2" stroke="rgb(0,0,0)" stroke-width="0.8" fill="rgb(128,128,128)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 133.3333,166.6667 l -0.0000,-133.3333 h -33.3333 l -0.0000,133.3333 Z"/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(128,128,128)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="round" stroke-miterlimit="10.0" stroke-dasharray="3.333333333333334,3.333333333333334"><path d="M 133.3333,33.3333 v 133.3333 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(128,128,128)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="round" stroke-miterlimit="10.0" stroke-dasharray="3.333333333333334,3.333333333333334"><path d="M 100.0000,33.3333 v 133.3333 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 166.6667,166.6667 l -0.0000,-133.3333 h -133.3333 l -0.0000,133.3333 Z"/></g></svg>
+ diagrams/src_Data_Active_clampAfterDia.svg view
@@ -0,0 +1,3 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" height="200.0000" stroke-opacity="1" viewBox="0 0 200 200" font-size="1" width="200.0000" xmlns:xlink="http://www.w3.org/1999/xlink" stroke="rgb(0,0,0)" version="1.1"><defs></defs><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(255,0,0)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 33.3333,166.6667 l 100.0000,-100.0000 h 33.3333 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="1.0" opacity="0.2" stroke="rgb(0,0,0)" stroke-width="0.8" fill="rgb(128,128,128)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 133.3333,166.6667 l -0.0000,-133.3333 h -33.3333 l -0.0000,133.3333 Z"/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(128,128,128)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="round" stroke-miterlimit="10.0" stroke-dasharray="3.333333333333334,3.333333333333334"><path d="M 133.3333,33.3333 v 133.3333 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(128,128,128)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="round" stroke-miterlimit="10.0" stroke-dasharray="3.333333333333334,3.333333333333334"><path d="M 100.0000,33.3333 v 133.3333 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 166.6667,166.6667 l -0.0000,-133.3333 h -133.3333 l -0.0000,133.3333 Z"/></g></svg>
+ diagrams/src_Data_Active_clampBeforeDia.svg view
@@ -0,0 +1,3 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" height="200.0000" stroke-opacity="1" viewBox="0 0 200 200" font-size="1" width="200.0000" xmlns:xlink="http://www.w3.org/1999/xlink" stroke="rgb(0,0,0)" version="1.1"><defs></defs><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(255,0,0)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 33.3333,100.0000 h 66.6667 l 66.6667,-66.6667 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="1.0" opacity="0.2" stroke="rgb(0,0,0)" stroke-width="0.8" fill="rgb(128,128,128)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 133.3333,166.6667 l -0.0000,-133.3333 h -33.3333 l -0.0000,133.3333 Z"/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(128,128,128)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="round" stroke-miterlimit="10.0" stroke-dasharray="3.333333333333334,3.333333333333334"><path d="M 133.3333,33.3333 v 133.3333 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(128,128,128)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="round" stroke-miterlimit="10.0" stroke-dasharray="3.333333333333334,3.333333333333334"><path d="M 100.0000,33.3333 v 133.3333 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 166.6667,166.6667 l -0.0000,-133.3333 h -133.3333 l -0.0000,133.3333 Z"/></g></svg>
+ diagrams/src_Data_Active_clampDia.svg view
@@ -0,0 +1,3 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" height="200.0000" stroke-opacity="1" viewBox="0 0 200 200" font-size="1" width="200.0000" xmlns:xlink="http://www.w3.org/1999/xlink" stroke="rgb(0,0,0)" version="1.1"><defs></defs><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(255,0,0)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 33.3333,100.0000 h 66.6667 l 33.3333,-33.3333 h 33.3333 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="1.0" opacity="0.2" stroke="rgb(0,0,0)" stroke-width="0.8" fill="rgb(128,128,128)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 133.3333,166.6667 l -0.0000,-133.3333 h -33.3333 l -0.0000,133.3333 Z"/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(128,128,128)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="round" stroke-miterlimit="10.0" stroke-dasharray="3.333333333333334,3.333333333333334"><path d="M 133.3333,33.3333 v 133.3333 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(128,128,128)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="round" stroke-miterlimit="10.0" stroke-dasharray="3.333333333333334,3.333333333333334"><path d="M 100.0000,33.3333 v 133.3333 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 166.6667,166.6667 l -0.0000,-133.3333 h -133.3333 l -0.0000,133.3333 Z"/></g></svg>
+ diagrams/src_Data_Active_trimAfterDia.svg view
@@ -0,0 +1,3 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" height="200.0000" stroke-opacity="1" viewBox="0 0 200 200" font-size="1" width="200.0000" xmlns:xlink="http://www.w3.org/1999/xlink" stroke="rgb(0,0,0)" version="1.1"><defs></defs><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(255,0,0)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 33.3333,166.6667 l 100.0000,-100.0000 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="1.0" opacity="0.2" stroke="rgb(0,0,0)" stroke-width="0.8" fill="rgb(128,128,128)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 133.3333,166.6667 l -0.0000,-133.3333 h -33.3333 l -0.0000,133.3333 Z"/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(128,128,128)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="round" stroke-miterlimit="10.0" stroke-dasharray="3.333333333333334,3.333333333333334"><path d="M 133.3333,33.3333 v 133.3333 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(128,128,128)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="round" stroke-miterlimit="10.0" stroke-dasharray="3.333333333333334,3.333333333333334"><path d="M 100.0000,33.3333 v 133.3333 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 166.6667,166.6667 l -0.0000,-133.3333 h -133.3333 l -0.0000,133.3333 Z"/></g></svg>
+ diagrams/src_Data_Active_trimBeforeDia.svg view
@@ -0,0 +1,3 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" height="200.0000" stroke-opacity="1" viewBox="0 0 200 200" font-size="1" width="200.0000" xmlns:xlink="http://www.w3.org/1999/xlink" stroke="rgb(0,0,0)" version="1.1"><defs></defs><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(255,0,0)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 100.0000,100.0000 l 66.6667,-66.6667 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="1.0" opacity="0.2" stroke="rgb(0,0,0)" stroke-width="0.8" fill="rgb(128,128,128)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 133.3333,166.6667 l -0.0000,-133.3333 h -33.3333 l -0.0000,133.3333 Z"/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(128,128,128)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="round" stroke-miterlimit="10.0" stroke-dasharray="3.333333333333334,3.333333333333334"><path d="M 133.3333,33.3333 v 133.3333 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(128,128,128)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="round" stroke-miterlimit="10.0" stroke-dasharray="3.333333333333334,3.333333333333334"><path d="M 100.0000,33.3333 v 133.3333 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 166.6667,166.6667 l -0.0000,-133.3333 h -133.3333 l -0.0000,133.3333 Z"/></g></svg>
+ diagrams/src_Data_Active_trimDia.svg view
@@ -0,0 +1,3 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" height="200.0000" stroke-opacity="1" viewBox="0 0 200 200" font-size="1" width="200.0000" xmlns:xlink="http://www.w3.org/1999/xlink" stroke="rgb(0,0,0)" version="1.1"><defs></defs><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(255,0,0)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 100.0000,100.0000 l 33.3333,-33.3333 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="1.0" opacity="0.2" stroke="rgb(0,0,0)" stroke-width="0.8" fill="rgb(128,128,128)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 133.3333,166.6667 l -0.0000,-133.3333 h -33.3333 l -0.0000,133.3333 Z"/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(128,128,128)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="round" stroke-miterlimit="10.0" stroke-dasharray="3.333333333333334,3.333333333333334"><path d="M 133.3333,33.3333 v 133.3333 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(128,128,128)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="round" stroke-miterlimit="10.0" stroke-dasharray="3.333333333333334,3.333333333333334"><path d="M 100.0000,33.3333 v 133.3333 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 166.6667,166.6667 l -0.0000,-133.3333 h -133.3333 l -0.0000,133.3333 Z"/></g></svg>
+ diagrams/src_Data_Active_uiDia.svg view
@@ -0,0 +1,3 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" height="200.0000" stroke-opacity="1" viewBox="0 0 200 200" font-size="1" width="200.0000" xmlns:xlink="http://www.w3.org/1999/xlink" stroke="rgb(0,0,0)" version="1.1"><defs></defs><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(255,0,0)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 33.3333,166.6667 l 133.3333,-133.3333 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="1.0" opacity="0.2" stroke="rgb(0,0,0)" stroke-width="0.8" fill="rgb(128,128,128)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 133.3333,166.6667 l -0.0000,-133.3333 h -33.3333 l -0.0000,133.3333 Z"/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(128,128,128)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="round" stroke-miterlimit="10.0" stroke-dasharray="3.333333333333334,3.333333333333334"><path d="M 133.3333,33.3333 v 133.3333 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(128,128,128)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="round" stroke-miterlimit="10.0" stroke-dasharray="3.333333333333334,3.333333333333334"><path d="M 100.0000,33.3333 v 133.3333 "/></g><defs></defs><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.8" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 166.6667,166.6667 l -0.0000,-133.3333 h -133.3333 l -0.0000,133.3333 Z"/></g></svg>
src/Data/Active.hs view
@@ -413,7 +413,7 @@ -- at time @t@, and has as its era @[0,1]@. It is equivalent to -- @'interval' 0 1@, and can be visualized as follows: ----- <<http://www.cis.upenn.edu/~byorgey/hosted/ui.png>>+-- <<diagrams/src_Data_Active_uiDia.svg#diagram=uiDia&width=200>> -- -- On the x-axis is time, and the value that @ui@ takes on is on the -- y-axis. The shaded portion represents the era. Note that the@@ -470,7 +470,7 @@ -- the end and vice versa. For example, @backwards 'ui'@ can be -- visualized as ----- <<http://www.cis.upenn.edu/~byorgey/hosted/backwards.png>>+-- <<diagrams/src_Data_Active_backwardsDia.svg#diagram=backwardsDia&width=200>> backwards :: Active a -> Active a backwards = modActive id . onDynamic $ \s e d ->@@ -491,7 +491,7 @@ -- -- For example, @clamp 'ui'@ can be visualized as ----- <<http://www.cis.upenn.edu/~byorgey/hosted/clamp.png>>+-- <<diagrams/src_Data_Active_clampDia.svg#diagram=clampDia&width=200>> -- -- See also 'clampBefore' and 'clampAfter', which clamp only before -- or after the era, respectively.@@ -508,7 +508,7 @@ -- | \"Clamp\" an active value so that it is constant before the start -- of its era. For example, @clampBefore 'ui'@ can be visualized as ----- <<http://www.cis.upenn.edu/~byorgey/hosted/clampBefore.png>>+-- <<diagrams/src_Data_Active_clampBeforeDia.svg#diagram=clampBeforeDia&width=200>> -- -- See the documentation of 'clamp' for more information. clampBefore :: Active a -> Active a@@ -519,7 +519,7 @@ -- | \"Clamp\" an active value so that it is constant after the end -- of its era. For example, @clampBefore 'ui'@ can be visualized as ----- <<http://www.cis.upenn.edu/~byorgey/hosted/clampAfter.png>>+-- <<diagrams/src_Data_Active_clampAfterDia.svg#diagram=clampAfterDia&width=200>> -- -- See the documentation of 'clamp' for more information. clampAfter :: Active a -> Active a@@ -531,7 +531,7 @@ -- -- For example, @trim 'ui'@ can be visualized as ----- <<http://www.cis.upenn.edu/~byorgey/hosted/trim.png>>+-- <<diagrams/src_Data_Active_trimDia.svg#diagram=trimDia&width=200>> -- -- Actually, @trim ui@ is not well-typed, since it is not guaranteed -- that @ui@'s values will be monoidal (and usually they won't be)!@@ -555,7 +555,7 @@ -- | \"Trim\" an active value so that it is empty /before/ the start -- of its era. For example, @trimBefore 'ui'@ can be visualized as ----- <<http://www.cis.upenn.edu/~byorgey/hosted/trimBefore.png>>+-- <<diagrams/src_Data_Active_trimBeforeDia.svg#diagram=trimBeforeDia&width=200>> -- -- See the documentation of 'trim' for more details. trimBefore :: Monoid a => Active a -> Active a@@ -569,7 +569,7 @@ -- | \"Trim\" an active value so that it is empty /after/ the end -- of its era. For example, @trimAfter 'ui'@ can be visualized as ----- <<http://www.cis.upenn.edu/~byorgey/hosted/trimAfter.png>>+-- <<diagrams/src_Data_Active_trimAfterDia.svg#diagram=trimAfterDia&width=200>> -- -- See the documentation of 'trim' for more details. trimAfter :: Monoid a => Active a -> Active a@@ -672,3 +672,37 @@ ) ) +------------------------------------------------------------+-- Illustrations produced with diagrams-haddock+--+-- > d :: Diagram B -> Diagram B+-- > d fun = (square 4 <> ends <> fun # lc red)+-- > # lineCap LineCapRound # lineJoin LineJoinRound+-- > # frame 1+-- > where ends = vert <> vert # translateX 1+-- > <> rect 1 4 # translateX (0.5) # opacity 0.2 # fc grey+-- > vert = vrule 4 # dashingG [0.1,0.1] 0 # lc grey+-- >+-- > uiDia = d $+-- > ((-2) ^& (-2)) ~~ (2 ^& 2)+-- >+-- > backwardsDia = d $+-- > (2 ^& (-1)) ~~ ((-1) ^& 2)+-- >+-- > clampDia = d $+-- > [(2,0), (1,1), (1,0)]+-- > # map r2 # fromOffsets # centerX+-- >+-- > clampBeforeDia = d $+-- > [(2,0), (2,2)]+-- > # map r2 # fromOffsets # centerX+-- >+-- > clampAfterDia = d $+-- > [(3,3), (1,0)]+-- > # map r2 # fromOffsets # centerX # translateY (-2)+-- >+-- > trimDia = d $ origin ~~ (1 ^& 1)+-- >+-- > trimBeforeDia = d $ origin ~~ (2 ^& 2)+-- >+-- > trimAfterDia = d $ ((-2) ^& (-2)) ~~ (1 ^& 1)