X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=mTaskInterpret.dcl;h=2701fcf3a85309c742c058af95f64872dd8e27e0;hb=acd239b3f29e215ade0b63d5b26b6cf8e8ae0d63;hp=319ffb3e7e4d6f09bb238c27a0b92e4057d7fc4e;hpb=55afb005ced3bba3813163596cdc7288a318a3c2;p=mTask.git diff --git a/mTaskInterpret.dcl b/mTaskInterpret.dcl index 319ffb3..2701fcf 100644 --- a/mTaskInterpret.dcl +++ b/mTaskInterpret.dcl @@ -15,10 +15,17 @@ import mTask | MTEmpty :: MTaskMSGSend - = MTTask Int String + = MTTask MTaskInterval String + | MTTaskDel Int | MTSds Int String | MTUpd Int String +:: MTaskInterval + = OneShot + | OnInterval Int + | OnInterrupt Int + +instance toString MTaskInterval instance toString MTaskMSGRecv instance toString MTaskMSGSend encode :: MTaskMSGSend -> String @@ -88,6 +95,7 @@ instance toByteCode String instance toByteCode Long instance toByteCode Button instance toByteCode UserLED +//instance toByteCode MTaskInterval instance toChar Pin instance arith ByteCode @@ -107,11 +115,9 @@ instance assign ByteCode instance seq ByteCode instance serial ByteCode -//pub :: (ByteCode a b) -> ByteCode a b - -toMessages :: Int (String, BCState) -> ([MTaskMSGSend], BCState) +toMessages :: MTaskInterval (String, BCState) -> ([MTaskMSGSend], BCState) toSDSUpdate :: Int Int -> [MTaskMSGSend] toByteVal :: BC -> [Char] toReadableByteCode :: (ByteCode a b) -> (String, BCState) -toRealByteCode :: (ByteCode a b) -> (String, BCState) +toRealByteCode :: (ByteCode a b) BCState -> (String, BCState)