jack 0.7.1.1 → 0.7.1.2
raw patch · 3 files changed
+13/−4 lines, 3 filesdep +semigroups
Dependencies added: semigroups
Files
- jack.cabal +4/−3
- src/Sound/JACK.hs +5/−1
- src/Sound/JACK/FFI.hsc +4/−0
jack.cabal view
@@ -1,5 +1,5 @@ Name: jack-Version: 0.7.1.1+Version: 0.7.1.2 License: GPL License-File: LICENSE Author: Henning Thielemann, Stefan Kersten, Soenke Hahn <soenkehahn@gmail.com>@@ -16,7 +16,7 @@ Homepage: http://www.haskell.org/haskellwiki/JACK Category: Sound Build-Type: Simple-Cabal-Version: >=1.14+Cabal-Version: 1.14 Tested-With: GHC==6.8.2, GHC==6.10.4, GHC==6.12.3 Tested-With: GHC==7.0.2, GHC==7.2.1, GHC==7.4.1, GHC==7.6.1 Extra-Source-Files:@@ -32,7 +32,7 @@ Source-Repository this type: darcs location: http://code.haskell.org/jack/- tag: 0.7.1.1+ tag: 0.7.1.2 Flag pkgConfig description: Use pkg-config tool for check version and presence of jack@@ -56,6 +56,7 @@ transformers >=0.2 && <0.6, enumset >=0.0 && <0.1, array >=0.4 && <0.6,+ semigroups >=0.1 && <1.0, base >=4.0 && <5.0 Exposed-Modules: Sound.JACK
src/Sound/JACK.hs view
@@ -131,6 +131,7 @@ import qualified System.IO as IO import Data.Monoid (Monoid, mempty, mappend, )+import Data.Semigroup (Semigroup, (<>), ) @@ -379,9 +380,12 @@ -} newtype PortSet = PortSet [Ptr (JackFFI.Port ())] +instance Semigroup PortSet where+ PortSet a <> PortSet b = PortSet (a <> b)+ instance Monoid PortSet where mempty = PortSet mempty- mappend (PortSet a) (PortSet b) = PortSet (mappend a b)+ mappend = (<>) setOfPort :: (PortType typ, Direction dir) =>
src/Sound/JACK/FFI.hsc view
@@ -32,6 +32,7 @@ import Data.Word (Word, Word32, Word64, ) import Data.Ix (Ix(range, inRange, rangeSize, index)) import Data.Monoid (Monoid, mempty, mappend, )+import Data.Semigroup (Semigroup, (<>), ) import Numeric.NonNegative.Class as NonNeg @@ -147,6 +148,9 @@ inRange (nframesToWord a, nframesToWord b) (nframesToWord i) rangeSize (a,b) = rangeSize (nframesToWord a, nframesToWord b)++instance Semigroup NFrames where+ NFrames x <> NFrames y = NFrames (x+y) instance Monoid NFrames where mempty = NFrames 0