+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module ZXS.Machine where
+import Control.Monad.State
+import Control.Applicative (Applicative)
+
import Z80.CPU
+import ZXS.Memory
+
+data Spectrum = Spectrum
+ { zxCPU :: CPU
+ , zxMemory :: Memory
+ -- TODO: there's other stuff to add, but this will be done after
+ -- the scaffolding is in place.
+ } deriving (Show, Eq)
+
+-- the ZXS transformer
+newtype ZXST m a = ZXST { unZXST :: StateT Spectrum m a }
+ deriving (Monad, Functor, Applicative, MonadIO)
+-- for now we "fall back" to IO as the default inner monad
+type ZXS a = ZXST IO a