music-dynamics-literal 1.2 → 1.3
raw patch · 2 files changed
+10/−2 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Music.Dynamics.Literal: instance Eq DynamicsL
+ Music.Dynamics.Literal: instance IsDynamics Double
+ Music.Dynamics.Literal: instance IsDynamics a => IsDynamics (Maybe a)
+ Music.Dynamics.Literal: instance Ord DynamicsL
+ Music.Dynamics.Literal: instance Show DynamicsL
Files
music-dynamics-literal.cabal view
@@ -1,6 +1,6 @@ name: music-dynamics-literal-version: 1.2+version: 1.3 cabal-version: >= 1.3 author: Hans Hoglund maintainer: Hans Hoglund@@ -15,7 +15,7 @@ This package allow you to write the dynamic marks of standard notation as expressions overloaded on result type. This works exactly like numeric literals. - This library is part of the Haskell Music Suite, see <http://musicsuite.github.com>.+ This library is part of the Music Suite, see <http://musicsuite.github.com>. library build-depends:
src/Music/Dynamics/Literal.hs view
@@ -38,6 +38,7 @@ -- @0@ is an unspecified middle level dynamic. -- newtype DynamicsL = DynamicsL { getDynamicsL :: (Maybe Double, Maybe Double) }+ deriving (Eq, Show, Ord) -- Like Num can be expressed using arabic numerals, instances -- of IsDynamics can be expressed using Western pitch names (c, c sharp, c flat etc) @@ -46,6 +47,13 @@ instance IsDynamics DynamicsL where fromDynamics = id++instance IsDynamics a => IsDynamics (Maybe a) where+ fromDynamics = Just . fromDynamics++instance IsDynamics Double where+ fromDynamics (DynamicsL (Just x, _)) = x+ fromDynamics (DynamicsL (Nothing, _)) = error "IsDynamics Double: No dynamics" pppppp, ppppp, pppp, ppp, pp, _p, mp, mf, _f, ff, fff, ffff, fffff, ffffff :: IsDynamics a => a