repositories
/
mTask.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
split out again for tasks
[mTask.git]
/
mTask.dcl
diff --git
a/mTask.dcl
b/mTask.dcl
index
7d9e976
..
ac9405c
100644
(file)
--- a/
mTask.dcl
+++ b/
mTask.dcl
@@
-14,11
+14,15
@@
todo:
imporove setp: >>*.
*/
imporove setp: >>*.
*/
-//import iTasks
+import Generics.gCons
+import Generics.gdynamic
+
+import iTasks
+
import iTasks._Framework.Generic
from iTasks._Framework.Task import :: Task
import StdClass
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
import mTaskCode, mTaskSimulation, mTaskInterpret
import mTaskSerial, mTaskLCD
@@
-31,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
:: 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
:: PinMode = INPUT | OUTPUT | INPUT_PULLUP
:: Pin = Digital DigitalPin | Analog AnalogPin
@@
-87,6
+92,7
@@
class var2 v where
class sds v where
sds :: ((v t Upd)->In t (Main (v c s))) -> (Main (v c s)) | type, toByteCode, toCode t
con :: ((v t Expr) ->In t (Main (v c s))) -> (Main (v c s)) | type t
class sds v where
sds :: ((v t Upd)->In t (Main (v c s))) -> (Main (v c s)) | type, toByteCode, toCode t
con :: ((v t Expr) ->In t (Main (v c s))) -> (Main (v c s)) | type t
+ pub :: (v t Upd) -> v t Expr | type t
class seq v where
(>>=.) infixr 0 :: (v t p) ((v t Expr) -> (v u q)) -> (v u Stmt) | type t & type u
(:.) infixr 0 :: (v t p) (v u q) -> v u Stmt | type t & type u
class seq v where
(>>=.) infixr 0 :: (v t p) ((v t Expr) -> (v u q)) -> (v u Stmt) | type t & type u
(:.) infixr 0 :: (v t p) (v u q) -> v u Stmt | type t & type u
@@
-125,6
+131,10
@@
class time v where
delay :: (v Long p) -> (v Long Expr)
millis :: (v Long Expr)
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
class pio p t where pio :: p -> v t Upd | aIO v & dIO v
instance pio AnalogPin Int
instance pio AnalogPin Bool