update Score Timewise :: ([Software ], Encoding Date) → Score Timewise → Score Timewise
update Score Timewise x (a, (b, c)) = (a, (update Score Header x b, c)) -- |
type Measure = ((CDATA, Maybe Yes No, Maybe Yes No, Maybe Tenths), [Part ]) -- |
read Measure :: Eq i ⇒ STM Result [Content i ] Measure read Measure = do
y ← read ELEMENT "measure"
y1 ← read 4 (read REQUIRED "number" read CDATA) (read IMPLIED "implicit" read Yes No)
(read IMPLIED "non-controlling" read Yes No) (read IMPLIED "width" read Tenths)
(attributes y )
y2 ← read 1 (read LIST1 read Part ) (childs y ) return (y1 , y2 )
-- |
show Measure :: Measure → [Content ()]
show Measure ((a, b, c, d ), e) =
show ELEMENT "measure" (show REQUIRED "number" show CDATA a ++ show IMPLIED "implicit" show Yes No b ++
show IMPLIED "non-controlling" show Yes No c ++ show IMPLIED "width" show Tenths d )
(show LIST1 show Part e) -- |
type Part = (ID , Music Data) -- |
read Part :: Eq i ⇒ STM Result [Content i ] Part read Part = do
y ← read ELEMENT "part"
y1 ← read 1 (read REQUIRED "id" read ID ) (attributes y) y2 ← read 1 read Music Data (childs y )
return (y1 , y2 ) -- |
show Part :: Part → [Content ()]
show Part (a, b) =
show ELEMENT "part" (show REQUIRED "id" show ID a) (show Music Data b)
2.15 Util
-- |
-- Maintainer : [email protected] -- Stability : experimental
-- Portability: HaXML
--module Text .XML.MusicXML.Util where import Text .XML.HaXml .Types
import Control .Monad (MonadPlus (. .)) import Data.Char (isSpace)
import Prelude (String , Maybe (. .), (. .) + ·, Bool (. .), Monad (. .), Show (. .), Int , Functor (. .), Eq (. .),
(·), (++), (∧), error ,
id , map, concat , [·, ·], maybe, and ,
·, lookup, unwords) -- * Result -- |
data Result a = Ok a | Error String deriving (Eq , Show )
-- |
instance Monad Result where (Ok a) >>= b = b a
(Error msg) >>= = Error msg return x = Ok x
fail msg = Error msg -- |
instance Functor Result where fmap f (Ok a) = Ok (f a) fmap (Error msg) = Error msg -- |
instance MonadPlus Result where mzero = Error "unknow error"
(Ok a) ‘mplus‘ = (Ok a) (Error ) ‘mplus‘ b = b -- |
isOK :: Result a → Bool isOK (Ok ) = True isOK = False
-- |
isError :: Result a → Bool isError (Error ) = True isError = False
-- |
fromOK :: Result a → a fromOK (Ok a) = a
fromOK (Error msg) = error msg -- |
fromError :: Result a → String fromError (Ok ) = [ ] fromError (Error msg) = msg
-- * ST -- |
newtype ST s a = ST {state :: s → (s, a)}
instance Monad (ST s) where return x = ST (λs → (s, x ))
p >>= f = ST (λs1 → let (s2 , r ) = state p s1 in state (f r ) s2 ) instance Functor (ST s) where
fmap f st = ST (λs → (λ(x , y ) → (x , f y)) (state st s)) -- |
liftST :: (s → a) → ST s a liftST f = ST (λs → (s, f s))
-- * STM -- |
newtype STM m s a = STM {stateM :: s → m (s, a)}
-- |
instance (Monad m) ⇒ Monad (STM m s) where return x = STM (λs → return (s, x ))
p >>= f = STM (λs → do {
; (s0, l ) ← stateM p s
; stateM (f l ) s0})
fail msg = STM (λ → fail msg ) -- |
instance MonadPlus m ⇒ MonadPlus (STM m s) where mzero = STM (λ → mzero)
a ‘mplus‘ b = STM (λs → (stateM a s) ‘mplus‘ (stateM b s)) -- |
instance Monad m ⇒ Functor (STM m s) where
fmap f stm = STM (λs → stateM stm s >>= (λ(s1 , a) → return (s1 , f a))) -- |
liftSTM :: Monad m ⇒ ST s (m a) → STM m s a liftSTM p = STM (λs → do {
; let (s0, l ) = (state p s)
; lx ← l
; return (s0, lx )}) -- |
returnSTM :: Monad m ⇒ m a → STM m s a
returnSTM x = STM (λs → x >>= (λy → return (s, y )))
-- * Basic -- |
type CDATA = Prelude.String -- |
read CDATA :: Prelude.String → Result CDATA read CDATA = return
-- |
show CDATA :: CDATA → Prelude.String show CDATA = id
-- |
type ID = Prelude.String -- |
read ID :: Prelude.String → Result ID read ID = return
-- |
show ID :: ID → Prelude.String show ID = id
-- * Attributes -- |
read IMPLIED0:: String → (String → Result a) → [Attribute ] → Maybe a read IMPLIED0key func s = maybe Nothing
(result · func · unwords ·
map ([id , ""]) · (λ(AttValue l ) → l )) (lookup key s)
where -- |
result :: Result a → Maybe a result (Ok x ) = Just x result (Error ) = Nothing -- |
read IMPLIED :: Monad m ⇒
String → (String → Result a) → STM m [Attribute ] (Maybe a) read IMPLIED key func =
STM (λs → return (s, read IMPLIED0key func s)) -- |
show IMPLIED :: String → (a → String ) → Maybe a → [Attribute ] show IMPLIED key function = maybe [ ] (show REQUIRED key function)
-- |
read REQUIRED :: Monad m ⇒ String → (String → Result a) → STM m [Attribute ] a
read REQUIRED key func = read IMPLIED key func >>=
maybe (fail ("I expect " ++ key ++ " as required attribute")) return -- |
show REQUIRED :: String → (a → String ) → a → [Attribute ] show REQUIRED key function =
(:[ ]) · (λx → (key , x )) · AttValue · (:[ ]) · i1· function -- |
read DEFAULT :: Monad m ⇒
String → (String → Result a) → a → STM m [Attribute ] a read DEFAULT key func def =
read IMPLIED key func >>=
maybe (return def ) return -- |
show DEFAULT :: String → (a → String ) → a → [Attribute ] show DEFAULT = show REQUIRED
-- |
show FIXED :: String → (a → String ) → a → [Attribute ] show FIXED = show REQUIRED
-- |
read FIXED :: Monad m ⇒
String → (String → Result a) → a → STM m [Attribute ] a read FIXED key func def =
read IMPLIED key func >>=
maybe (return def ) return
-- |
read ELEMENT0:: String → [Content i ] → ([Content i ], Result (Element i )) read ELEMENT0tag ((CElem (e@(Elem key )) ) : t ) | key ≡ tag = (t , Ok e) read ELEMENT0tag ((CString s ) : t ) | Prelude.and (map isSpace s) =
read ELEMENT0tag t
read ELEMENT0tag (((CMisc ) : t )) = read ELEMENT0tag t read ELEMENT0tag l =
(l , Error ("I expect " ++ tag ++ " element" ++ moreinfo)) where moreinfo :: String
moreinfo = ": [" ++ concat (map conts l ) ++ "]"
-- |
conts :: Content i → String
conts (CElem (Elem k ) ) = "<" ++ k ++ "/>"
conts (CString s ) = s conts (CRef ) = "(ref)"
conts (CMisc ) = "(misc)"
-- |
read ELEMENT :: String → STM Result [Content i ] (Element i ) read ELEMENT tag = liftSTM (ST (λs → read ELEMENT0tag s))
-- |
show ELEMENT :: String → [Attribute ] → [Content ()] → [Content ()]
show ELEMENT tag attr contents = [CElem (Elem tag attr contents) ()]
-- |
attributes :: Element i → [Attribute ] attributes (Elem x ) = x
-- |
childs :: Element i → [Content i ] childs (Elem x ) = x
-- |
type PCDATA = Prelude.String -- |
read PCDATA0:: [Content i ] → ([Content i ], Result PCDATA)
read PCDATA0[ ] = ([ ], return [ ]) read PCDATA0((CString y ) : t ) =
let (a, b) = read PCDATA0t in (a, b >>= return · (y ++)) read PCDATA0((CRef y ) : t ) =
let (a, b) = read PCDATA0t in (a, b >>= return · (read REF y ++))
read PCDATA0(l @((CElem ) : )) = (l , return [ ]) read PCDATA0( : t ) = read PCDATA0t
-- |
read REF :: Reference → PCDATA read REF (RefEntity x ) = ’&’ : x ++ ";"
read REF (RefChar x ) = ’#’ : show x -- |
read PCDATA :: STM Result [Content i ] PCDATA read PCDATA = liftSTM (ST (λs → read PCDATA0s))
-- |
show PCDATA :: PCDATA → [Content ()]
show PCDATA pcdata = [CString False pcdata ()]
-- * Elements -- |
read MAYBE :: STM Result [Content i ] a → STM Result [Content i ] (Maybe a) read MAYBE st = STM (λs →
((stateM st s) >>= (λ(z1 , z2 ) → return (z1 , return z2 )))
‘mplus‘ return (s, Nothing )) -- |
show MAYBE :: (a → [Content ()]) → Maybe a → [Content ()]
show MAYBE f = maybe [ ] f -- |
read LIST :: Eq i ⇒ STM Result [Content i ] a → STM Result [Content i ] [a ] read LIST st = STM (λs →
let x = stateM st s in case x of
Ok (x1 , x2 ) → if s ≡ x1 then return (s, [x2 ]) else let y = stateM (read LIST st ) x1
in case y of
Ok (y1 , y2 ) → return (y1 , x2 : y2 ) Error → return (x1 , [x2 ]) Error → return (s, [ ])
) -- |
show LIST :: (a → [Content ()]) → [a ] → [Content ()]
show LIST f = concat · map f -- |
read LIST1 :: Eq i ⇒ STM Result [Content i ] a → STM Result [Content i ] [a ] read LIST1 st = STM (λs →
let x = stateM st s in case x of
Ok (x1 , x2 ) → if s ≡ x1 then return (s, [x2 ]) else let y = stateM (read LIST1 st ) x1
in case y of
Ok (y1 , y2 ) → return (y1 , x2 : y2 ) Error → return (x1 , [x2 ]) Error → fail "empty list"
) -- |
show LIST1 :: (a → [Content ()]) → [a ] → [Content ()]
show LIST1 = show LIST
-- * Read -- |
read 1 :: Monad m ⇒ STM m s a → s → STM m s0a
read 1 st1 s = returnSTM (stateM st1 s >>= (λ( , x ) → return x )) -- |
read 2 :: Monad m ⇒ STM m s a → STM m s b → s → STM m s0(a, b) read 2 st1 st2 s = returnSTM (do
(s1 , a) ← stateM st1 s ( , b) ← stateM st2 s1 return (a, b))
-- |
read 3 :: Monad m ⇒ STM m s a → STM m s b → STM m s c → s → STM m s0(a, b, c)
read 3 st1 st2 st3 s = returnSTM (do (s1 , a) ← stateM st1 s
(s2 , b) ← stateM st2 s1 ( , c) ← stateM st3 s2 return (a, b, c)) -- |
read 4 :: Monad m ⇒ STM m s a → STM m s b → STM m s c → STM m s d → s → STM m s0(a, b, c, d )
read 4 st1 st2 st3 st4 s = returnSTM (do (s1 , a) ← stateM st1 s
(s2 , b) ← stateM st2 s1 (s3 , c) ← stateM st3 s2 ( , d ) ← stateM st4 s3 return (a, b, c, d )) -- |
read 5 :: Monad m ⇒ STM m s a → STM m s b → STM m s c → STM m s d → STM m s e → s → STM m s0(a, b, c, d , e) read 5 st1 st2 st3 st4 st5 s = returnSTM (do
(s1 , a) ← stateM st1 s (s2 , b) ← stateM st2 s1 (s3 , c) ← stateM st3 s2 (s4 , d ) ← stateM st4 s3 ( , e) ← stateM st5 s4 return (a, b, c, d , e)) -- |
read 6 :: Monad m ⇒ STM m s a → STM m s b → STM m s c →
STM m s d → STM m s e → STM m s f → s → STM m s0(a, b, c, d , e, f ) read 6 st1 st2 st3 st4 st5 st6 s = returnSTM (do
(s1 , a) ← stateM st1 s (s2 , b) ← stateM st2 s1 (s3 , c) ← stateM st3 s2 (s4 , d ) ← stateM st4 s3 (s5 , e) ← stateM st5 s4 ( , f ) ← stateM st6 s5 return (a, b, c, d , e, f )) -- |
read 7 :: Monad m ⇒ STM m s a → STM m s b → STM m s c → STM m s d → STM m s e → STM m s f → STM m s g → s → STM m s0(a, b, c, d , e, f , g )
read 7 st1 st2 st3 st4 st5 st6 st7 s = returnSTM (do (s1 , a) ← stateM st1 s
(s2 , b) ← stateM st2 s1
(s3 , c) ← stateM st3 s2 (s4 , d ) ← stateM st4 s3 (s5 , e) ← stateM st5 s4 (s6 , f ) ← stateM st6 s5 ( , g ) ← stateM st7 s6 return (a, b, c, d , e, f , g )) -- |
read 8 :: Monad m ⇒ STM m s a → STM m s b → STM m s c → STM m s d → STM m s e → STM m s f → STM m s g → STM m s h → s → STM m s0(a, b, c, d , e, f , g , h)
read 8 st1 st2 st3 st4 st5 st6 st7 st8 s = returnSTM (do (s1 , a) ← stateM st1 s
(s2 , b) ← stateM st2 s1 (s3 , c) ← stateM st3 s2 (s4 , d ) ← stateM st4 s3 (s5 , e) ← stateM st5 s4 (s6 , f ) ← stateM st6 s5 (s7 , g ) ← stateM st7 s6 ( , h) ← stateM st8 s7 return (a, b, c, d , e, f , g , h)) -- |
read 9 :: Monad m ⇒ STM m s a → STM m s b → STM m s c → STM m s d → STM m s e → STM m s f → STM m s g → STM m s h → STM m s i → s → STM m s0(a, b, c, d , e, f , g , h, i ) read 9 st1 st2 st3 st4 st5 st6 st7 st8 st9 s = returnSTM (do
(s1 , a) ← stateM st1 s (s2 , b) ← stateM st2 s1 (s3 , c) ← stateM st3 s2 (s4 , d ) ← stateM st4 s3 (s5 , e) ← stateM st5 s4 (s6 , f ) ← stateM st6 s5 (s7 , g ) ← stateM st7 s6 (s8 , h) ← stateM st8 s7 ( , i ) ← stateM st9 s8 return (a, b, c, d , e, f , g , h, i )) -- |
read 10 :: Monad m ⇒ STM m s a → STM m s b → STM m s c → STM m s d → STM m s e → STM m s f → STM m s g → STM m s h → STM m s i → STM m s j →
s → STM m s0(a, b, c, d , e, f , g , h, i , j ) read 10 st1 st2 st3 st4 st5 st6 st7 st8 st9 st10 s =
returnSTM (do
(s1 , a) ← stateM st1 s (s2 , b) ← stateM st2 s1 (s3 , c) ← stateM st3 s2 (s4 , d ) ← stateM st4 s3 (s5 , e) ← stateM st5 s4 (s6 , f ) ← stateM st6 s5 (s7 , g ) ← stateM st7 s6 (s8 , h) ← stateM st8 s7 (s9 , i ) ← stateM st9 s8 ( , j ) ← stateM st10 s9 return (a, b, c, d , e, f , g , h, i , j )) -- |
read 11 :: Monad m ⇒ STM m s a → STM m s b → STM m s c → STM m s d → STM m s e → STM m s f → STM m s g → STM m s h → STM m s i → STM m s j → STM m s k → s → STM m s0(a, b, c, d , e, f , g , h, i , j , k )
read 11 st1 st2 st3 st4 st5 st6 st7 st8 st9 st10 st11 s = returnSTM (do
(s1 , a) ← stateM st1 s (s2 , b) ← stateM st2 s1 (s3 , c) ← stateM st3 s2 (s4 , d ) ← stateM st4 s3 (s5 , e) ← stateM st5 s4 (s6 , f ) ← stateM st6 s5 (s7 , g ) ← stateM st7 s6 (s8 , h) ← stateM st8 s7 (s9 , i ) ← stateM st9 s8 (s10 , j ) ← stateM st10 s9 ( , k ) ← stateM st11 s10 return (a, b, c, d , e, f , g , h, i , j , k )) -- |
read 12 :: Monad m ⇒ STM m s a → STM m s b → STM m s c → STM m s d → STM m s e → STM m s f → STM m s g → STM m s h → STM m s i → STM m s j → STM m s k → STM m s l → s → STM m s0(a, b, c, d , e, f , g , h, i , j , k , l ) read 12 st1 st2 st3 st4 st5 st6 st7 st8 st9 st10 st11 st12 s =
returnSTM (do
(s1 , a) ← stateM st1 s (s2 , b) ← stateM st2 s1 (s3 , c) ← stateM st3 s2 (s4 , d ) ← stateM st4 s3 (s5 , e) ← stateM st5 s4 (s6 , f ) ← stateM st6 s5 (s7 , g ) ← stateM st7 s6 (s8 , h) ← stateM st8 s7 (s9 , i ) ← stateM st9 s8 (s10 , j ) ← stateM st10 s9 (s11 , k ) ← stateM st11 s10 ( , l ) ← stateM st12 s11
return (a, b, c, d , e, f , g , h, i , j , k , l )) -- |
read 13 :: Monad m ⇒ STM m s a → STM m s b → STM m s c → STM m s d → STM m s e → STM m s f → STM m s g → STM m s h → STM m s i → STM m s j → STM m s k →
STM m s l → STM m s n → s → STM m s0(a, b, c, d , e, f , g , h, i , j , k , l , n) read 13 st1 st2 st3 st4 st5 st6 st7 st8 st9 st10 st11 st12 st13 s =
returnSTM (do
(s1 , a) ← stateM st1 s (s2 , b) ← stateM st2 s1 (s3 , c) ← stateM st3 s2 (s4 , d ) ← stateM st4 s3 (s5 , e) ← stateM st5 s4 (s6 , f ) ← stateM st6 s5 (s7 , g ) ← stateM st7 s6 (s8 , h) ← stateM st8 s7 (s9 , i ) ← stateM st9 s8 (s10 , j ) ← stateM st10 s9 (s11 , k ) ← stateM st11 s10 (s12 , l ) ← stateM st12 s11 ( , m) ← stateM st13 s12
return (a, b, c, d , e, f , g , h, i , j , k , l , m)) -- |
read 17 :: Monad m ⇒ STM m s a → STM m s b → STM m s c → STM m s d → STM m s e → STM m s f → STM m s g →
STM m s h → STM m s i → STM m s j → STM m s k → STM m s l → STM m s n → STM m s o → STM m s p → STM m s q → STM m s r → s →
STM m s0(a, b, c, d , e, f , g , h, i , j , k , l , n, o, p, q , r ) read 17 st1 st2 st3 st4 st5 st6 st7 st8 st9
st10 st11 st12 st13 st14 st15 st16 st17 s = returnSTM (do
(s1 , a) ← stateM st1 s (s2 , b) ← stateM st2 s1 (s3 , c) ← stateM st3 s2 (s4 , d ) ← stateM st4 s3 (s5 , e) ← stateM st5 s4 (s6 , f ) ← stateM st6 s5 (s7 , g ) ← stateM st7 s6 (s8 , h) ← stateM st8 s7 (s9 , i ) ← stateM st9 s8 (s10 , j ) ← stateM st10 s9 (s11 , k ) ← stateM st11 s10 (s12 , l ) ← stateM st12 s11 (s13 , n) ← stateM st13 s12 (s14 , o) ← stateM st14 s13 (s15 , p) ← stateM st15 s14 (s16 , q ) ← stateM st16 s15 ( , r ) ← stateM st17 s16
return (a, b, c, d , e, f , g , h, i , j , k , l , n, o, p, q , r ))
instance (Show a, Show b, Show c, Show d , Show e, Show f , Show g , Show h, Show i , Show j , Show k , Show l , Show m, Show n, Show o, Show p, Show q )
⇒ Show (a, b, c, d , e, f , g, h, i , j , k , l , m, n, o, p, q) where
show (a, b, c, d , e, f , g , h, i , j , k , l , m, n, o, p, q ) = "(" ++ show a ++ "," ++ show b ++ "," ++ show c ++ "," ++ show d ++ "," ++ show e ++ "," ++ show f ++ "," ++ show g ++ "," ++ show h ++ "," ++ show i ++ "," ++ show j ++ "," ++ show k ++ "," ++ show l ++ "," ++ show m ++ "," ++ show n ++ "," ++ show o ++ "," ++ show p ++ "," ++ show q ++ ")"
instance (Eq a, Eq b, Eq c, Eq d , Eq e, Eq f , Eq g , Eq h, Eq i , Eq j , Eq k , Eq l , Eq m, Eq n, Eq o, Eq p, Eq q)
⇒ Eq (a, b, c, d , e, f , g, h, i , j , k , l , m, n, o, p, q) where
(a1 , b1 , c1 , d1 , e1 , f1 , g1 , h1 , i1, j1 , k1 , l1 , m1 , n1 , o1 , π1, q1 ) ≡ (a2 , b2 , c2 , d2 , e2 , f2 , g2 , h2 , i2, j2 , k2 , l2 , m2 , n2 , o2 , π2, q2 ) = (a1 ≡ a2 ) ∧ (b1 ≡ b2 ) ∧ (c1 ≡ c2 ) ∧ (d1 ≡ d2 ) ∧ (e1 ≡ e2 ) ∧ (f1 ≡ f2 ) ∧ (g1 ≡ g2 ) ∧ (h1 ≡ h2 ) ∧ (i1≡ i2) ∧ (j1 ≡ j2 ) ∧ (k1 ≡ k2 ) ∧ (l1 ≡ l2 ) ∧ (m1 ≡ m2 ) ∧ (n1 ≡ n2 ) ∧ (o1 ≡ o2 ) ∧ (π1≡ π2) ∧ (q1 ≡ q2 )
3 Test
-- |
module Main where
import Text .XML.MusicXML hiding (String ) -- MusicXML package import System.IO
import Data.Maybe
import System.Environment import System.Console.GetOpt import Prelude
-- |
data Option = List FilePath
| Help
| Version
deriving (Eq , Show ) options :: [OptDescr Option ] options = [
Option [’v’, ’V’] ["version"] (NoArg Version) "show version number"
, Option [’h’, ’H’, ’?’] ["help"] (NoArg Help) "show help"
, Option [’l’, ’m’] ["manifest"] (ReqArg List "MANIFEST") "manifest file"
] -- |
header :: String → String
header prog = "Usage: " ++ prog ++ " [OPTIONS...] FILES..."
-- |
proc :: [Option ] → [String ] → IO ()
proc [ ] files = main0(zip ([1 . .] :: [Int ]) files) proc ((List file) : t ) files = do
list ← readFile file proc t (lines list ++ files) proc ( : t ) files = proc t files
mkoutput :: FilePath → FilePath
mkoutput = reverse · ("lmx.tuptuo-"++) · drop 4 · reverse
-- |
put :: String → IO ()
put msg = putStr msg >> hFlush stdout putLn :: String → IO ()
putLn msg = putStrLn msg >> hFlush stdout putBool :: Bool → IO ()
putBool True = putStrLn "[Ok]"
putBool False = putStrLn "[Failed]"
-- |
inout :: FilePath → IO () inout file = do
putLn ("file: " ++ show file) >> put "Reading "
contents ← readFile file
r1 ← return (read CONTENTS read MusicXMLDoc file contents) r2 ← return (case isOK r1 of
True → Just (mkoutput file, fromOK r1 ); False → Nothing ) putBool (isOK r1 )
put "Writing "
r3 ← return (fmap (λ(a, b) →
(a, show CONTENTS show MusicXMLDoc b)) r2 ) maybe (return ()) (uncurry writeFile) r3
putBool (isJust r3 )
-- | main :: IO () main = do
argv ← getArgs prog ← getProgName
case getOpt Permute options argv of
(o, n, [ ]) | Help ∈ o → putStrLn (usageInfo (header prog ) options)
| Version ∈ o → putStrLn (unwords [prog ])
| otherwise → proc o n
( , , errs) → putStrLn (unlines errs ++ usageInfo (header prog ) options) -- |
main0:: [(Int , FilePath)] → IO () main0[ ] = return ()
main0((a, b) : t ) = do
putLn ("\nNumber: " ++ show a) >> inout b >> main0t
4 Conclusion
This library handle music notation at musicxml format. This Haskell library is translation from DTD specification.
References
[1] Michael Good. Lessons from the adoption of musicxml as an interchange standard, 2006.
[2] Michael Good and Geri Actor. Using musicxml for file interchange. IEEE, 2003.
[3] Paul Haudak, John Hudges, Simon Peyton Jones, and Philip Wadler. A history of haskell:
Being lazy with class. ACM, 2007.
[4] Simon Peyton Jones. Haskell 98 Language and Libraries: The Revised Report, 2002.
[5] David Brian Williams. Musicxml: The new link for sharing sibelius and finale files. 2008.