From cb452795ab772fb465e7675b22865eb1ff25cf53 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Wed, 17 May 2017 09:24:35 +0200 Subject: [PATCH] update --- Makefile | 3 +-- Tasks/Examples.icl | 11 +++++++++++ miTask.icl | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6dea347..f8054da 100644 --- a/Makefile +++ b/Makefile @@ -24,8 +24,7 @@ BINARIES:= mTaskInterpret miTask # mTaskExamples all: CleanSerial/Clean\ System\ Files/TTY.o $(BINARIES) #client/mTaskSymbols.h mkdir -p miTask-www - find ~/projects/iTasks-SDK/Libraries -path '*/WebPublic/*' -not -path '*/CodeMirror/*' -execdir cp -nR {} "$$PWD"/miTask-www/ \; - + find ~/projects/iTasks-SDK/Libraries -path '*/WebPublic' -execdir sh -c 'cp -nvR WebPublic/* '"$$PWD"/miTask-www/ \; CleanSerial/Clean\ System\ Files/TTY.o: make -C CleanSerial diff --git a/Tasks/Examples.icl b/Tasks/Examples.icl index b0ae530..78b0d67 100644 --- a/Tasks/Examples.icl +++ b/Tasks/Examples.icl @@ -6,6 +6,16 @@ import mTask import Devices.mTaskDevice import iTasks._Framework.Serialization +countTo5 :: Main (ByteCode () Stmt) +countTo5 = sds \x=0 In {main = + x =. x +. lit 1 :. + pub x :. + IF ( x >. lit 5) ( + retrn x + ) ( + noOp + )} + count :: Main (ByteCode () Stmt) count = sds \x=0 In {main = x =. x +. lit 1 :. pub x :. noOp} @@ -67,4 +77,5 @@ allmTasks = 'DM'.fromList ,("blink", ledSelection @ blink) ,("blinkShare", treturn blinkShare) ,("count", treturn count) + ,("countTo5", treturn countTo5) ] diff --git a/miTask.icl b/miTask.icl index 0e7a631..f701b64 100644 --- a/miTask.icl +++ b/miTask.icl @@ -37,7 +37,7 @@ mTaskManager = startupDevices >>| anyTask [ viewmTasks @! () , whileUnchanged sdsStore manageShares , whileUnchanged deviceStore $ manageDevices process - ] <<@ ApplyLayout (sequenceLayouts + ] <<@ ApplyLayout (foldl1 sequenceLayouts [arrangeWithSideBar 0 LeftSide 260 True ,arrangeSplit Vertical True]) where -- 2.20.1