diff options
author | Andrew Cady <d@jerkface.net> | 2015-12-04 00:55:17 -0500 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2015-12-04 00:55:17 -0500 |
commit | 804d48fe9b4613c81759e192c8a04c41b571bf8e (patch) | |
tree | ab8471074a80efadf787142f7c0455b65513467c | |
parent | 7af27c322b1aeae772030f8c821e9167f95f9889 (diff) |
whitespace formatting
-rw-r--r-- | midi-dump.hs | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/midi-dump.hs b/midi-dump.hs index 864bf96..09da6b6 100644 --- a/midi-dump.hs +++ b/midi-dump.hs | |||
@@ -1,30 +1,30 @@ | |||
1 | {-# LANGUAGE FlexibleContexts #-} | ||
1 | {-# LANGUAGE OverloadedStrings #-} | 2 | {-# LANGUAGE OverloadedStrings #-} |
2 | {-# LANGUAGE FlexibleContexts #-} | ||
3 | 3 | ||
4 | import AlsaSeq | 4 | import AlsaSeq |
5 | import qualified Sound.ALSA.Exception as AlsaExc | 5 | import Control.Monad.RWS.Strict |
6 | import qualified Data.Set as Set | 6 | import Data.List |
7 | import qualified Sound.ALSA.Sequencer.Event as Event | 7 | import Data.Maybe |
8 | import Control.Monad.RWS.Strict | 8 | import qualified Data.Set as Set |
9 | import Data.Maybe | 9 | import qualified Sound.ALSA.Exception as AlsaExc |
10 | import Data.List | 10 | import qualified Sound.ALSA.Sequencer.Event as Event |
11 | import System.Clock | 11 | import System.Clock |
12 | 12 | ||
13 | import Control.Applicative | 13 | import Control.Applicative |
14 | import qualified Data.ByteString as BS | 14 | import qualified Data.ByteString as BS |
15 | import Data.ByteString.Char8 (pack) | ||
16 | import Data.Int | ||
15 | import Database.SQLite.Simple | 17 | import Database.SQLite.Simple |
16 | import Database.SQLite.Simple.FromRow () | 18 | import Database.SQLite.Simple.FromRow () |
17 | import Data.Int | ||
18 | import Data.ByteString.Char8 (pack) | ||
19 | 19 | ||
20 | import Control.Concurrent.Chan | 20 | import BasePrelude hiding (loop) |
21 | import Prelude hiding ((.), id) | 21 | import Control.Concurrent.Chan |
22 | import BasePrelude hiding (loop) | 22 | import Prelude hiding (id, (.)) |
23 | 23 | ||
24 | import qualified Sound.ALSA.Sequencer | ||
24 | import qualified Sound.ALSA.Sequencer.Address | 25 | import qualified Sound.ALSA.Sequencer.Address |
25 | import qualified Sound.ALSA.Sequencer.Port | 26 | import qualified Sound.ALSA.Sequencer.Port |
26 | import qualified Sound.ALSA.Sequencer.Queue | 27 | import qualified Sound.ALSA.Sequencer.Queue |
27 | import qualified Sound.ALSA.Sequencer | ||
28 | 28 | ||
29 | 29 | ||
30 | verbose = False | 30 | verbose = False |
@@ -43,24 +43,24 @@ getTS (MidiEvent ts _) = ts | |||
43 | getTS (Silence ts) = ts | 43 | getTS (Silence ts) = ts |
44 | 44 | ||
45 | data LoopState = LoopState { | 45 | data LoopState = LoopState { |
46 | keysDown :: MidiPitchSet, | 46 | keysDown :: MidiPitchSet, |
47 | inputHistory :: [EVENT], | 47 | inputHistory :: [EVENT], |
48 | lastTick :: TimeSpec | 48 | lastTick :: TimeSpec |
49 | } | 49 | } |
50 | 50 | ||
51 | data LoopEnv = LoopEnv { | 51 | data LoopEnv = LoopEnv { |
52 | _saver :: Chan (Int64, Int64, [EVENT]), | 52 | _saver :: Chan (Int64, Int64, [EVENT]), |
53 | _sqlite :: Connection, | 53 | _sqlite :: Connection, |
54 | _startTime :: TimeSpec, | 54 | _startTime :: TimeSpec, |
55 | _startTimeReal :: TimeSpec, | 55 | _startTimeReal :: TimeSpec, |
56 | _h :: Sound.ALSA.Sequencer.T Sound.ALSA.Sequencer.DuplexMode, | 56 | _h :: Sound.ALSA.Sequencer.T Sound.ALSA.Sequencer.DuplexMode, |
57 | _public :: Sound.ALSA.Sequencer.Port.T, | 57 | _public :: Sound.ALSA.Sequencer.Port.T, |
58 | _private :: Sound.ALSA.Sequencer.Port.T, | 58 | _private :: Sound.ALSA.Sequencer.Port.T, |
59 | _q :: Sound.ALSA.Sequencer.Queue.T, | 59 | _q :: Sound.ALSA.Sequencer.Queue.T, |
60 | _publicAddr :: Sound.ALSA.Sequencer.Address.T, | 60 | _publicAddr :: Sound.ALSA.Sequencer.Address.T, |
61 | _privateAddr :: Sound.ALSA.Sequencer.Address.T, | 61 | _privateAddr :: Sound.ALSA.Sequencer.Address.T, |
62 | _doSave :: Bool, | 62 | _doSave :: Bool, |
63 | _lineReader :: MVar String | 63 | _lineReader :: MVar String |
64 | } | 64 | } |
65 | 65 | ||
66 | getAbsTime = do | 66 | getAbsTime = do |