imporove setp: >>*.
*/
+import Generics.gCons
+import Generics.gdynamic
+
import iTasks
-import gdynamic, gCons, GenEq, StdMisc, StdArray
+import GenEq, StdMisc, StdArray, GenBimap
import mTaskCode
import mTaskSerial, mTaskLCD
instance type2string MTask where type2string _ = "task"
instance type2string DigitalPin where type2string _ = "int"
instance type2string AnalogPin where type2string _ = "int"
+instance type2string UserLED where type2string _ = "int"
instance type2string String where type2string _ = "Char []"
instance type2string () where type2string _ = ""
instance typeSelector Bool where typeSelector = c ".b"
instance typeSelector a where typeSelector = c ".w"
-read` :: Int (ReadWrite a) State -> (a,State) | dyn a
+read` :: Int (ReadWrite a) State` -> (a,State`) | dyn a
read` n Rd s = (fromJust (fromDyn (s.store !! n)), s)
read` n (Wrt a) s = (a,{s&store=updateAt n (toDyn a) s.store})
read` n (Updt f) s=:{store}
instance == DigitalPin where (==) x y = x === y
instance == AnalogPin where (==) x y = x === y
+instance == UserLED where (==) x y = x === y
-derive consName DigitalPin, AnalogPin, PinMode
-derive consIndex DigitalPin, AnalogPin
+//derive class gCons UserLED, Long, Pin, Button, UserLED, AnalogPin, DigitalPin, PinMode
+//derive class iTask UserLED, Long, Pin, Button, UserLED, AnalogPin, DigitalPin, PinMode
tab =: toString (repeatn tabSize ' ')
tabSize :== 2