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 instance toString MTaskMSGRecv
19 instance toString MTaskMSGSend
20 encode :: MTaskMSGSend -> String
21 decode :: String -> MTaskMSGRecv
48 //Conditionals and jumping
65 :: ByteCode a p = BC (BCState -> ([BC], BCState))
66 instance Semigroup (ByteCode a p)
67 instance Monoid (ByteCode a p)
72 sdss :: [(Int, [Char])]
76 class toByteCode a :: a -> [Char]
77 instance toByteCode Int
78 instance toByteCode Bool
79 instance toByteCode Char
80 instance toByteCode String
81 instance toByteCode Long
82 instance toByteCode Button
85 instance arith ByteCode
86 instance boolExpr ByteCode
87 instance analogIO ByteCode
88 instance digitalIO ByteCode
89 //instance If ByteCode Stmt Stmt Stmt
90 //instance If ByteCode e Stmt Stmt
91 //instance If ByteCode Stmt e Stmt
92 instance If ByteCode x y Stmt
94 instance noOp ByteCode
97 instance assign ByteCode
99 instance serial ByteCode
101 //pub :: (ByteCode a b) -> ByteCode a b
103 toMessages :: Int (String, BCState) -> ([MTaskMSGSend], BCState)
104 toSDSUpdate :: Int Int -> [MTaskMSGSend]
106 toByteVal :: BC -> [Char]
107 toReadableByteCode :: (ByteCode a b) -> (String, BCState)
108 toRealByteCode :: (ByteCode a b) -> (String, BCState)