reactive-midyim 0.4.0.1 → 0.4.1
raw patch · 2 files changed
+15/−5 lines, 2 filesdep +semigroupsPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies added: semigroups
API changes (from Hackage documentation)
+ Reactive.Banana.MIDI.Time: instance Data.Semigroup.Semigroup Reactive.Banana.MIDI.Time.Seconds
+ Reactive.Banana.MIDI.Time: instance Data.Semigroup.Semigroup Reactive.Banana.MIDI.Time.Ticks
+ Reactive.Banana.MIDI.Time: instance Data.Semigroup.Semigroup a => Data.Semigroup.Semigroup (Reactive.Banana.MIDI.Time.T m t a)
- Reactive.Banana.MIDI.Time: ticksFromAny :: (Quantity a, Timed m) => T m t a -> m (T m t Ticks)
+ Reactive.Banana.MIDI.Time: ticksFromAny :: (Quantity a, (Timed m)) => T m t a -> m (T m t Ticks)
Files
reactive-midyim.cabal view
@@ -1,12 +1,11 @@ Name: reactive-midyim-Version: 0.4.0.1+Version: 0.4.1 License: BSD3 License-File: LICENSE Author: Henning Thielemann <haskell@henning-thielemann.de> Maintainer: Henning Thielemann <haskell@henning-thielemann.de> Homepage: http://www.haskell.org/haskellwiki/Reactive-balsa Category: Sound, Music-Build-Type: Simple Synopsis: Process MIDI events via reactive-banana Description: MIDI is the Musical Instrument Digital Interface,@@ -45,7 +44,7 @@ Source-Repository this type: darcs location: http://hub.darcs.net/thielema/reactive-midyim/- tag: 0.4.0.1+ tag: 0.4.1 Library Build-Depends:@@ -58,6 +57,7 @@ utility-ht >=0.0.5 && <0.1, containers >=0.2 && <0.6, transformers >=0.2 && <0.6,+ semigroups >=0.1 && <1.0, random >=1 && <2, base >=4 && <5
src/Reactive/Banana/MIDI/Time.hs view
@@ -6,6 +6,7 @@ import Control.Applicative (Const(Const), ) import Data.Monoid (Monoid, mempty, mappend, )+import Data.Semigroup (Semigroup, (<>), ) import Data.Tuple.HT (mapPair, mapSnd, ) import Data.Ord.HT (comparing, ) import Data.Eq.HT (equating, )@@ -56,14 +57,23 @@ newtype Ticks = Ticks {unTicks :: Integer} deriving (Show, Eq, Ord) +instance Semigroup Seconds where+ Seconds x <> Seconds y = Seconds $ x+y+ instance Monoid Seconds where mempty = Seconds 0- mappend (Seconds x) (Seconds y) = Seconds $ x+y+ mappend = (<>) +instance Semigroup Ticks where+ Ticks x <> Ticks y = Ticks $ x+y+ instance Monoid Ticks where mempty = Ticks 0- mappend (Ticks x) (Ticks y) = Ticks $ x+y+ mappend = (<>) ++instance (Semigroup a) => Semigroup (T m t a) where+ x <> y = cons $ decons x <> decons y instance (Monoid a) => Monoid (T m t a) where mempty = cons mempty