summaryrefslogtreecommitdiff
path: root/Midi.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Midi.hs')
-rw-r--r--Midi.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Midi.hs b/Midi.hs
index 402f683..cc14eb6 100644
--- a/Midi.hs
+++ b/Midi.hs
@@ -59,6 +59,11 @@ instance ToRow CompleteRecording where
59 where 59 where
60 (CompleteRecording (TimeSpec s ns) (TimeSpec s' ns') (TimeSpec s'' ns'') (TimeSpec s''' ns''') midi) = reco 60 (CompleteRecording (TimeSpec s ns) (TimeSpec s' ns') (TimeSpec s'' ns'') (TimeSpec s''' ns''') midi) = reco
61 61
62instance Monoid CompleteRecording where
63 mempty = CompleteRecording 0 0 0 0 []
64 (CompleteRecording s _e f _l evts) `mappend` (CompleteRecording _s' e' _f' l' evts') =
65 CompleteRecording s e' f l' (evts' ++ evts)
66
62maybesnd :: forall t t1. (t, Maybe t1) -> Maybe (t, t1) 67maybesnd :: forall t t1. (t, Maybe t1) -> Maybe (t, t1)
63maybesnd (_, Nothing) = Nothing 68maybesnd (_, Nothing) = Nothing
64maybesnd (x, Just y) = Just (x, y) 69maybesnd (x, Just y) = Just (x, y)