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
23 instance toString MTaskMSGRecv
24 instance toString MTaskMSGSend
25 encode :: MTaskMSGSend -> String
26 decode :: String -> MTaskMSGRecv
53 //Conditionals and jumping
73 :: ByteCode a p = BC (BCState -> ([BC], BCState))
74 instance Semigroup (ByteCode a p)
75 instance Monoid (ByteCode a p)
80 sdss :: [(Int, [Char])]
84 class toByteCode a :: a -> [Char]
85 instance toByteCode Int
86 instance toByteCode Bool
87 instance toByteCode Char
88 instance toByteCode String
89 instance toByteCode Long
90 instance toByteCode Button
91 instance toByteCode UserLED
94 instance arith ByteCode
95 instance boolExpr ByteCode
96 instance analogIO ByteCode
97 instance digitalIO ByteCode
98 instance userLed ByteCode
99 //instance If ByteCode Stmt Stmt Stmt
100 //instance If ByteCode e Stmt Stmt
101 //instance If ByteCode Stmt e Stmt
102 instance If ByteCode x y Stmt
104 instance noOp ByteCode
106 instance sds ByteCode
107 instance assign ByteCode
108 instance seq ByteCode
109 instance serial ByteCode
111 //pub :: (ByteCode a b) -> ByteCode a b
113 toMessages :: Int (String, BCState) -> ([MTaskMSGSend], BCState)
114 toSDSUpdate :: Int Int -> [MTaskMSGSend]
116 toByteVal :: BC -> [Char]
117 toReadableByteCode :: (ByteCode a b) -> (String, BCState)
118 toRealByteCode :: (ByteCode a b) BCState -> (String, BCState)