X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=mTaskSimulation.icl;h=801235ec2e3ed0bb821dd33415014d1c061bb51b;hb=09b207a39b7791098daafd7d87c3ad9d3db3e19f;hp=d52fa9a359d67c8bf177e43b335a627f06b68336;hpb=0d7dc6966d2f428cd7543708e220aa4315d64978;p=mTask.git diff --git a/mTaskSimulation.icl b/mTaskSimulation.icl index d52fa9a..801235e 100644 --- a/mTaskSimulation.icl +++ b/mTaskSimulation.icl @@ -1,7 +1,10 @@ implementation module mTaskSimulation +import Generics.gdynamic +import Generics.gCons + import iTasks -import gdynamic, gCons, GenEq, StdMisc, StdArray +import GenEq, StdMisc, StdArray import mTask derive class iTask Display @@ -74,6 +77,7 @@ defEval2 v f = instance sds Eval where sds f = defEval f con f = defEval f + pub _ = undef defEval :: ((Eval t p)->In t (Main (Eval u q))) -> (Main (Eval u q)) | dyn t defEval f = @@ -151,7 +155,7 @@ instance writePinD AnalogPin where // ----- Interactive Simulation ----- // -derive class iTask DigitalPin, AnalogPin, Dyn, StateInterface, DisplayVar, Pin +derive class iTask StateInterface, DisplayVar simulate :: (Main (Eval a p)) -> Task () simulate {main=(E f)} = setup zero where @@ -251,8 +255,8 @@ instance stringQuotes String where stringQuotes x = c "\"" +.+ x +.+ c "\"" instance stringQuotes t where stringQuotes x = x -derive toGenDynamic (), MTask, DigitalPin, AnalogPin, Pin, [], Long//, Servo -derive fromGenDynamic (), MTask, DigitalPin, AnalogPin, Pin, [], Long//, Servo +derive toGenDynamic (), MTask, DigitalPin, AnalogPin, Pin, [], Long, UserLED//, Servo +derive fromGenDynamic (), MTask, DigitalPin, AnalogPin, Pin, [], Long, UserLED//, Servo instance == () where (==) _ _ = True