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
18 = MTTask MTaskInterval String
28 instance toString MTaskInterval
29 instance toString MTaskMSGRecv
30 instance toString MTaskMSGSend
31 encode :: MTaskMSGSend -> String
32 decode :: String -> MTaskMSGRecv
59 //Conditionals and jumping
79 :: ByteCode a p = BC (BCState -> ([BC], BCState))
80 instance Semigroup (ByteCode a p)
81 instance Monoid (ByteCode a p)
96 class toByteCode a :: a -> [Char]
97 instance toByteCode Int
98 instance toByteCode Bool
99 instance toByteCode Char
100 instance toByteCode String
101 instance toByteCode Long
102 instance toByteCode Button
103 instance toByteCode UserLED
104 //instance toByteCode MTaskInterval
107 instance arith ByteCode
108 instance boolExpr ByteCode
109 instance analogIO ByteCode
110 instance digitalIO ByteCode
111 instance userLed ByteCode
112 //instance If ByteCode Stmt Stmt Stmt
113 //instance If ByteCode e Stmt Stmt
114 //instance If ByteCode Stmt e Stmt
115 instance If ByteCode x y Stmt
117 instance noOp ByteCode
119 instance sds ByteCode
120 instance assign ByteCode
121 instance seq ByteCode
122 instance serial ByteCode
124 toMessages :: MTaskInterval (String, BCState) -> ([MTaskMSGSend], BCState)
125 toSDSUpdate :: Int Int -> [MTaskMSGSend]
127 toByteVal :: BC -> [Char]
128 toReadableByteCode :: (ByteCode a b) -> (String, BCState)
129 toRealByteCode :: (ByteCode a b) BCState -> (String, BCState)