rewrite generation to rws
[mTask.git] / mTask.icl
index 9d42d2f..b92b1fc 100644 (file)
--- a/mTask.icl
+++ b/mTask.icl
@@ -59,6 +59,7 @@ instance type2string Char       where type2string _ = "char"
 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 _ = ""
 
@@ -120,11 +121,12 @@ instance long Eval Long where
 
 instance == DigitalPin where (==) x y = x === y
 instance == AnalogPin   where (==) x y = x === y
+instance == UserLED where (==) x y = x === y
 
+derive gEq UserLED
 derive gPrint Pin, Button, UserLED, AnalogPin, DigitalPin, PinMode
 derive class gCons Pin, Button, UserLED, AnalogPin, DigitalPin, PinMode
 
-
 tab =: toString (repeatn tabSize ' ')
 tabSize :== 2