mTasks can now be built with normal taskss
[mTask.git] / mTask.dcl
index c7a6a3a..ac9405c 100644 (file)
--- a/mTask.dcl
+++ b/mTask.dcl
@@ -14,12 +14,15 @@ todo:
        imporove setp: >>*.
 */
 
+import Generics.gCons
+import Generics.gdynamic
+
 import iTasks
 
 import iTasks._Framework.Generic
 from iTasks._Framework.Task import :: Task
 import StdClass
-import gdynamic, gCons, GenEq, StdMisc, StdArray
+import GenEq, StdMisc, StdArray
 
 import mTaskCode, mTaskSimulation, mTaskInterpret
 import mTaskSerial, mTaskLCD
@@ -32,6 +35,7 @@ import mTaskSerial, mTaskLCD
 :: DigitalPin 
    = D0 | D1 | D2 | D3 | D4 | D5 |D6 | D7 | D8 | D9 | D10 | D11 | D12 | D13
 :: AnalogPin = A0 | A1 | A2 | A3 | A4 | A5
+:: UserLED = LED1 | LED2 | LED3
 :: PinMode   = INPUT | OUTPUT | INPUT_PULLUP
 :: Pin     = Digital DigitalPin | Analog AnalogPin
 
@@ -127,6 +131,10 @@ class time v where
   delay  :: (v Long p) -> (v Long Expr)
   millis ::         (v Long Expr)
 
+class userLed v where
+       ledOn :: UserLED -> (v () Stmt)
+       ledOff :: UserLED -> (v () Stmt)
+
 class pio p t where pio :: p -> v t Upd | aIO v & dIO v
 instance pio AnalogPin Int
 instance pio AnalogPin Bool