1 definition module mTaskInterpret
3 from Data.Functor.Identity import :: Identity
4 from Control.Monad.State import :: State, :: StateT
5 from Data.Monoid import class Semigroup, class Monoid
22 instance toString MTaskMSGRecv
23 instance toString MTaskMSGSend
24 encode :: MTaskMSGSend -> String
25 decode :: String -> MTaskMSGRecv
52 //Conditionals and jumping
72 :: ByteCode a p = BC (BCState -> ([BC], BCState))
73 instance Semigroup (ByteCode a p)
74 instance Monoid (ByteCode a p)
79 sdss :: [(Int, [Char])]
83 class toByteCode a :: a -> [Char]
84 instance toByteCode Int
85 instance toByteCode Bool
86 instance toByteCode Char
87 instance toByteCode String
88 instance toByteCode Long
89 instance toByteCode Button
90 instance toByteCode UserLED
93 instance arith ByteCode
94 instance boolExpr ByteCode
95 instance analogIO ByteCode
96 instance digitalIO ByteCode
97 instance userLed ByteCode
98 //instance If ByteCode Stmt Stmt Stmt
99 //instance If ByteCode e Stmt Stmt
100 //instance If ByteCode Stmt e Stmt
101 instance If ByteCode x y Stmt
103 instance noOp ByteCode
105 instance sds ByteCode
106 instance assign ByteCode
107 instance seq ByteCode
108 instance serial ByteCode
110 //pub :: (ByteCode a b) -> ByteCode a b
112 toMessages :: Int (String, BCState) -> ([MTaskMSGSend], BCState)
113 toSDSUpdate :: Int Int -> [MTaskMSGSend]
115 toByteVal :: BC -> [Char]
116 toReadableByteCode :: (ByteCode a b) -> (String, BCState)
117 toRealByteCode :: (ByteCode a b) -> (String, BCState)