aboutsummaryrefslogtreecommitdiff
path: root/src/Machine.hs
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2021-04-12 01:01:22 +0300
committerAleksey Veresov <aleksey@veresov.pro>2021-04-12 01:01:22 +0300
commit21aa1d1f11c369323d8c3bf71648bd0a8321ca61 (patch)
tree68b29b89cb3bbb26167d990ac22dba580b9467a1 /src/Machine.hs
parent0be6a61d0a819b057b43848632928a261021ed25 (diff)
downloadsuem-21aa1d1f11c369323d8c3bf71648bd0a8321ca61.tar
suem-21aa1d1f11c369323d8c3bf71648bd0a8321ca61.tar.xz
suem-21aa1d1f11c369323d8c3bf71648bd0a8321ca61.zip
Device protocol is almost done!
Diffstat (limited to 'src/Machine.hs')
-rw-r--r--src/Machine.hs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Machine.hs b/src/Machine.hs
index a1ea028..75ad877 100644
--- a/src/Machine.hs
+++ b/src/Machine.hs
@@ -12,6 +12,7 @@ import Control.Monad.IO.Class (liftIO)
import Control.Monad.Reader (MonadReader, ReaderT, ask)
import Control.Monad.Trans (MonadIO)
import Network.Socket
+import System.IO
import Utils
@@ -35,7 +36,15 @@ data Machine = Machine {
s4 :: Maybe Socket,
s5 :: Maybe Socket,
s6 :: Maybe Socket,
- s7 :: Maybe Socket
+ s7 :: Maybe Socket,
+ c0 :: IORef (Maybe Handle),
+ c1 :: IORef (Maybe Handle),
+ c2 :: IORef (Maybe Handle),
+ c3 :: IORef (Maybe Handle),
+ c4 :: IORef (Maybe Handle),
+ c5 :: IORef (Maybe Handle),
+ c6 :: IORef (Maybe Handle),
+ c7 :: IORef (Maybe Handle)
}
-- Emulator is a monad which contains Machine and allows easy change of it.