X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=mTaskInterpret.icl;h=4876e935c33de2de88e3eef3de6a934ddd119a72;hb=bdebf34a1e281db5b2de64d5dd177cf7ea5cee51;hp=c63c95dbf36b85c79dd2adc1a69b5cd50603ced0;hpb=55afb005ced3bba3813163596cdc7288a318a3c2;p=mTask.git diff --git a/mTaskInterpret.icl b/mTaskInterpret.icl index c63c95d..4876e93 100644 --- a/mTaskInterpret.icl +++ b/mTaskInterpret.icl @@ -1,7 +1,9 @@ implementation module mTaskInterpret //import iTasks -import gdynamic, gCons, GenEq, StdMisc, StdArray, GenBimap +import Generics.gCons + +import GenEq, StdMisc, StdArray, GenBimap import GenPrint import StdEnum import mTask @@ -227,9 +229,9 @@ instance zero BCState where zero = {freshl=[1..], freshs=[1..], sdss=[]} -toRealByteCode :: (ByteCode a b) -> (String, BCState) -toRealByteCode x -# (bc, st) = runBC x zero +toRealByteCode :: (ByteCode a b) BCState -> (String, BCState) +toRealByteCode x s +# (bc, st) = runBC x s # (bc, gtmap) = computeGotos bc 1 = (concat $ map (toString o toByteVal) (map (implGotos gtmap) bc), st) @@ -263,7 +265,7 @@ toMessages interval (bytes, st=:{sdss}) = ([MTSds i (toString b)\\(i,b)<-sdss] + toSDSUpdate :: Int Int -> [MTaskMSGSend] toSDSUpdate i v = [MTUpd i (to16bit v)] -Start = toMessages 500 $ toRealByteCode (unMain bc) +Start = toMessages 500 $ toRealByteCode (unMain bc) zero where bc = sds \x=5 In sds \y=4 In