From 21aa1d1f11c369323d8c3bf71648bd0a8321ca61 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Mon, 12 Apr 2021 01:01:22 +0300 Subject: Device protocol is almost done! --- src/Machine.hs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/Machine.hs') 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. -- cgit v1.2.3