1 definition module mTaskInterpret
5 from Data.Functor.Identity import :: Identity
6 from Control.Monad.State import :: State, :: StateT
7 from Control.Monad.RWST import :: RWST, :: RWS
8 from Data.Either import :: Either
9 from iTasks._Framework.Generic.Defaults import generic gDefault
10 from GenPrint import generic gPrint
11 from Generics.gCons import class gCons, generic conses, generic consName, generic consIndex, generic consNum
20 | MTDevSpec MTaskDeviceSpec
24 = MTTask MTaskInterval String
43 :: BCValue = E.e: BCValue e & mTaskType, TC e
47 instance toString MTaskInterval
48 instance toString MTaskMSGRecv
49 instance toString MTaskMSGSend
50 encode :: MTaskMSGSend -> String
51 decode :: String -> MTaskMSGRecv
62 | BCSdsPublish BCShare
80 //Conditionals and jumping
101 derive gPrint BCValue, MTaskDeviceSpec
102 derive consIndex BCValue
103 derive consName BCValue
104 derive conses BCValue
105 derive consNum BCValue
107 derive class gCons Long, UserLED, Button, AnalogPin, DigitalPin, PinMode, Pin
108 derive class iTask UserLED, Long, Pin, Button, AnalogPin, DigitalPin, PinMode, MTaskDeviceSpec
109 derive gEditor BCValue
111 derive JSONEncode BCValue
112 derive JSONDecode BCValue
113 derive gDefault BCValue
116 :: ByteCode a p = BC (RWS () [BC] BCState ())
128 instance zero BCState
130 class toByteCode a :: a -> String
131 class fromByteCode a :: String -> a
132 class mTaskType a | toByteCode, fromByteCode, iTask, TC a
134 instance toByteCode Int, Bool, Char, Long, String, Button, UserLED, BCValue
135 instance fromByteCode Int, Bool, Char, Long, String, Button, UserLED, BCValue
136 instance toByteCode MTaskInterval
137 instance fromByteCode MTaskInterval, MTaskDeviceSpec
139 instance arith ByteCode
140 instance boolExpr ByteCode
141 instance analogIO ByteCode
142 instance digitalIO ByteCode
143 instance aIO ByteCode
144 instance dIO ByteCode
145 instance userLed ByteCode
146 instance If ByteCode Stmt Stmt Stmt
147 instance If ByteCode e Stmt Stmt
148 instance If ByteCode Stmt e Stmt
149 instance If ByteCode x y Stmt
151 instance noOp ByteCode
152 instance retrn ByteCode
154 instance sds ByteCode
155 instance assign ByteCode
156 instance seq ByteCode
157 instance serial ByteCode
159 toMessages :: MTaskInterval (Main (ByteCode a b)) BCState -> ([MTaskMSGSend], BCState)
161 toByteVal :: BC -> String
162 toReadableByteCode :: (ByteCode a b) BCState -> (String, BCState)
163 toRealByteCode :: (ByteCode a b) BCState -> (String, BCState)