packages feed

music-pitch-literal 1.6.2 → 1.7

raw patch · 5 files changed

+30/−1 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Music.Pitch.Alterable: instance Alterable a => Alterable (b, a)
+ Music.Pitch.Alterable: instance Alterable a => Alterable [a]
+ Music.Pitch.Augmentable: instance Augmentable a => Augmentable (b, a)
+ Music.Pitch.Augmentable: instance Augmentable a => Augmentable [a]
+ Music.Pitch.Literal.Interval: instance (Monoid b, IsInterval a) => IsInterval (b, a)
+ Music.Pitch.Literal.Interval: instance IsInterval a => IsInterval [a]
+ Music.Pitch.Literal.Pitch: instance (Monoid b, IsPitch a) => IsPitch (b, a)
+ Music.Pitch.Literal.Pitch: instance IsPitch a => IsPitch [a]

Files

music-pitch-literal.cabal view
@@ -1,6 +1,6 @@  name:                   music-pitch-literal-version:                1.6.2+version:                1.7 author:                 Hans Hoglund maintainer:             Hans Hoglund license:                BSD3
src/Music/Pitch/Alterable.hs view
@@ -54,3 +54,11 @@ instance Integral a => Alterable (Ratio a) where     sharpen = (+ 1)     flatten = (subtract 1)++instance Alterable a => Alterable [a] where+    sharpen = fmap sharpen+    flatten = fmap flatten++instance Alterable a => Alterable (b, a) where+    sharpen = fmap sharpen+    flatten = fmap flatten
src/Music/Pitch/Augmentable.hs view
@@ -50,3 +50,12 @@ instance Integral a => Augmentable (Ratio a) where     augment  = (+ 1)     diminish = (subtract 1)++instance Augmentable a => Augmentable [a] where+    augment = fmap augment+    diminish = fmap diminish++instance Augmentable a => Augmentable (b, a) where+    augment = fmap augment+    diminish = fmap diminish+
src/Music/Pitch/Literal/Interval.hs view
@@ -61,6 +61,12 @@ instance IsInterval a => IsInterval (Last a) where     fromInterval = pure . fromInterval +instance IsInterval a => IsInterval [a] where+    fromInterval = pure . fromInterval++instance (Monoid b, IsInterval a) => IsInterval (b, a) where+    fromInterval = pure . fromInterval+ instance IsInterval Double where     fromInterval = fromIntegral . asInteger . fromInterval 
src/Music/Pitch/Literal/Pitch.hs view
@@ -75,6 +75,12 @@ instance IsPitch a => IsPitch (Last a) where     fromPitch = pure . fromPitch +instance IsPitch a => IsPitch [a] where+    fromPitch = pure . fromPitch++instance (Monoid b, IsPitch a) => IsPitch (b, a) where+    fromPitch = pure . fromPitch+ instance IsPitch Double where     fromPitch (PitchL (pc, sem, oct)) = fromIntegral $ semitones sem + diatonic pc + oct * 12         where