packages feed

dobutokO4 0.1.0.0 → 0.1.1.0

raw patch · 3 files changed

+45/−3 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,5 +1,10 @@ # Revision history for dobutokO4 -## 0.1.0.0 -- YYYY-mm-dd+## 0.1.0.0 -- 2020-06-02  * First version. Released on an unsuspecting world.++## 0.1.1.0 -- 2020-06-02++* First version revised A. Fixed issue with being not compiled for GHC <= 8.4.*.+
DobutokO/Sound/Presentation.hs view
@@ -9,6 +9,7 @@ -- These module contains different representations for the data.  {-# OPTIONS_GHC -threaded #-}+{-# LANGUAGE CPP #-}  module DobutokO.Sound.Presentation (   -- * Sound repesentations@@ -23,10 +24,22 @@   , IntervalG (..) ) where +#ifdef __GLASGOW_HASKELL__+#if __GLASGOW_HASKELL__>=710+/* code that applies only to GHC 7.10.* and higher versions */ import Data.Bifunctor +#endif+#endif import Numeric (showFFloat) import DobutokO.Sound.Functional.Basics+#ifdef __GLASGOW_HASKELL__+#if __GLASGOW_HASKELL__>=804+/* code that applies only to GHC 8.4.* and higher versions */+import Data.Semigroup+#endif+#endif + -- | An 'Int' parameter is an index of the 'SoundI' sound file in the sorted in the ascending order 'V.Vector' of them (the corresponding files or their  -- names) representing the whole composition. data SoundI = Si Int Double Double OvertonesO | SAi Int Double Double Double OvertonesO | SAbi Int Double Double Double OvertonesO@@ -85,10 +98,15 @@ instance Functor Timity1 where   fmap f (Time1 t1 t2 a0) = Time1 t1 t2 (f a0) +#ifdef __GLASGOW_HASKELL__+#if __GLASGOW_HASKELL__>=804+/* code that applies only to GHC 8.4.* and higher versions */ -- | Idempotent semigroup (band) (x <> x = x) if @Semigroup a@ is idempotent (is a band). instance (Semigroup a) => Semigroup (Timity1 a) where   (<>) (Time1 t01 t11 a0) (Time1 t02 t12 a1) = Time1 (min t01 t02) ((signum (t11 * t12)) * (max (t01 + (abs t11)) (t02 + (abs t12)) - min t01 t02))            (a0 <> a1)+#endif+#endif  -- | 'Double' interval representation with no order of the arguments preserved. data IntervalTim = I Double Double@@ -108,9 +126,14 @@     | compare x1 x2 /= GT = "[" ++ showFFloat Nothing x1 ", " ++ showFFloat Nothing x2 "]"     | otherwise = "[" ++ showFFloat Nothing x2 ", " ++ showFFloat Nothing x1 "]" +#ifdef __GLASGOW_HASKELL__+#if __GLASGOW_HASKELL__>=804+/* code that applies only to GHC 8.4.* and higher versions */ -- | Idempotent semigroup (x <> x = x) -- band.  instance Semigroup IntervalTim where   (<>) (I x01 x02) (I x11 x12) = I (minimum [x01,x02,x11,x12]) (maximum [x01,x02,x11,x12])+#endif+#endif    -- | Another 'Double' interval representation with no order of the arguments preserved. Has different instance of 'Semigroup' than 'IntervalTim'. data IntervalTimI = II Double Double @@ -130,9 +153,14 @@     | compare x1 x2 /= GT = "[" ++ showFFloat Nothing x1 ", " ++ showFFloat Nothing x2 "]"     | otherwise = "[" ++ showFFloat Nothing x2 ", " ++ showFFloat Nothing x1 "]" +#ifdef __GLASGOW_HASKELL__+#if __GLASGOW_HASKELL__>=804+/* code that applies only to GHC 8.4.* and higher versions */ -- | Idempotent semigroup (x <> x = x) -- band.  instance Semigroup IntervalTimI where   (<>) (II x01 x02) (II x11 x12) = II (max (min x01 x02) (min x11 x12)) (min (max x01 x02) (max x11 x12))  +#endif+#endif      -- | The first 'Double' parameter is some adjustment parameter for the playing sound being represented by 'OvertonesO'. data SoundTim = StOm Timity Double OvertonesO | SAtOm Timity Double Double OvertonesO | SAbtOm Timity Double Double OvertonesO@@ -156,14 +184,23 @@ instance (Show a, Show b) => Show (IntervalG a b) where   show (IG x y) = "[|" ++ show x ++ " __ " ++ show y ++ "|]" +#ifdef __GLASGOW_HASKELL__+#if __GLASGOW_HASKELL__>=804+/* code that applies only to GHC 8.4.* and higher versions */ -- | Idempotent semigroup (x <> x = x) and rectangular band (x <> y <> z = x <> z) -- For more information, please, refer to: https://en.wikipedia.org/wiki/Band_(mathematics) instance Semigroup (IntervalG a b) where   (<>) (IG x0 _) (IG _ w1) = IG x0 w1+#endif+#endif    instance Functor (IntervalG a) where   fmap f (IG a b) = IG a (f b) +#ifdef __GLASGOW_HASKELL__+#if __GLASGOW_HASKELL__>=710+/* code that applies only to GHC 7.10.* and higher versions */ instance Bifunctor IntervalG where   bimap f g (IG x y) = IG (f x) (g y)-  +#endif+#endif  
dobutokO4.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                dobutokO4-version:             0.1.0.0+version:             0.1.1.0 synopsis:            Helps to create experimental music. Uses SoX inside. description:         Uses SoX fade (in a special 2D way) and frequency modulation. Provides a special representation for the composition. homepage:            https://hackage.haskell.org/package/dobutokO4