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
46 :: BCValue = E.e: BCValue e & mTaskType, TC e
50 instance toString MTaskInterval
51 instance toString MTaskMSGRecv
52 instance toString MTaskMSGSend
53 encode :: MTaskMSGSend -> String
54 decode :: String -> MTaskMSGRecv
65 | BCSdsPublish BCShare
83 //Conditionals and jumping
104 derive gPrint BCValue, MTaskDeviceSpec
105 derive consIndex BCValue
106 derive consName BCValue
107 derive conses BCValue
108 derive consNum BCValue
110 derive class gCons Long, UserLED, Button, AnalogPin, DigitalPin, PinMode, Pin
111 derive class iTask UserLED, Long, Pin, Button, AnalogPin, DigitalPin, PinMode, MTaskDeviceSpec
112 derive gEditor BCValue
114 derive JSONEncode BCValue
115 derive JSONDecode BCValue
116 derive gDefault BCValue
119 :: ByteCode a p = BC (RWS () [BC] BCState ())
132 instance zero BCState
134 class toByteCode a :: a -> String
135 class fromByteCode a :: String -> a
136 class mTaskType a | toByteCode, fromByteCode, iTask, TC a
138 instance toByteCode Int, Bool, Char, Long, String, Button, UserLED, BCValue
139 instance fromByteCode Int, Bool, Char, Long, String, Button, UserLED, BCValue
140 instance toByteCode MTaskInterval
141 instance fromByteCode MTaskInterval, MTaskDeviceSpec
143 instance arith ByteCode
144 instance boolExpr ByteCode
145 instance analogIO ByteCode
146 instance digitalIO ByteCode
147 instance aIO ByteCode
148 instance dIO ByteCode
149 instance userLed ByteCode
150 instance If ByteCode Stmt Stmt Stmt
151 instance If ByteCode e Stmt Stmt
152 instance If ByteCode Stmt e Stmt
153 instance If ByteCode x y Stmt
155 instance noOp ByteCode
156 instance retrn ByteCode
158 instance sds ByteCode
159 instance sdspub ByteCode
160 instance assign ByteCode
161 instance seq ByteCode
162 instance serial ByteCode
164 toMessages :: MTaskInterval (Main (ByteCode a b)) BCState -> ([MTaskMSGSend], BCState)
166 toByteVal :: BC -> String
167 toReadableByteCode :: (ByteCode a b) BCState -> (String, BCState)
168 toRealByteCode :: (ByteCode a b) BCState -> (String, BCState)