1 definition module mTaskInterpret
3 from Data.Functor.Identity import :: Identity
4 from Control.Monad.State import :: State, :: StateT
5 from Control.Monad.RWST import :: RWST, :: RWS
6 from Data.Either import :: Either
19 = MTTask MTaskInterval String
29 instance toString MTaskInterval
30 instance toString MTaskMSGRecv
31 instance toString MTaskMSGSend
32 encode :: MTaskMSGSend -> String
33 decode :: String -> MTaskMSGRecv
38 // | E.e: BCPush e & toByteCode e
61 //Conditionals and jumping
83 :: ByteCode a p = BC (RWS () [BC] BCState ())
98 class toByteCode a :: a -> String
99 class fromByteCode a :: String -> a
100 class mTaskType a | toByteCode, fromByteCode a
102 instance toByteCode Int, Bool, Char, Long, String, Button, UserLED
103 instance fromByteCode Int, Bool, Char, Long, String, Button, UserLED
104 instance toByteCode MTaskInterval
105 instance fromByteCode MTaskInterval
108 instance arith ByteCode
109 instance boolExpr ByteCode
110 instance analogIO ByteCode
111 instance digitalIO ByteCode
112 instance userLed ByteCode
113 instance If ByteCode Stmt Stmt Stmt
114 instance If ByteCode e Stmt Stmt
115 instance If ByteCode Stmt e Stmt
116 instance If ByteCode x y Stmt
118 instance noOp ByteCode
120 instance sds ByteCode
121 instance assign ByteCode
122 instance seq ByteCode
123 instance serial ByteCode
125 toMessages :: MTaskInterval (String, BCState) -> ([MTaskMSGSend], BCState)
126 toSDSUpdate :: Int Int -> [MTaskMSGSend]
128 toByteVal :: BC -> String
129 toReadableByteCode :: (ByteCode a b) BCState -> (String, BCState)
130 toRealByteCode :: (ByteCode a b) BCState -> (String, BCState)