Commit 8c1353b5 authored by Rinus Plasmeijer's avatar Rinus Plasmeijer

*** empty log message ***


git-svn-id: https://svn.cs.ru.nl/repos/iTask-system/trunk@126 63da3aa8-80fd-4f01-9db8-e6ea747a3da2
parent 18a34db3
......@@ -118,7 +118,7 @@ return_V :: !a -> Task a | iCreateAndPrint a
(<<?) infixl 5 :: !(Task a) !HtmlCode -> Task a | iCreate a
(<<!) infixl 5 :: !(Task a) !HtmlCode -> Task a | iCreate a
assignTaskTo :: !Bool !UserId !(LabeledTask a) -> Task a | iData a
assignTaskTo :: !Bool !UserId !(LabeledTask a) -> Task a | iData a
foreverTask :: !(Task a) -> Task a | iData a
(<!) infixl 6 :: !(Task a) !(a -> .Bool) -> Task a | iCreateAndPrint a
......
......@@ -69,12 +69,14 @@ mchoiceAndTasks3 :: !HtmlCode ![((!Bool,!ChoiceUpdate,!HtmlCode),LabeledTask a)]
(-&&-) :: do both iTasks in any order (interleaved), task completed when both done
orTasks :: do all iTasks in any order (interleaved), task completed as soon as any subtask is done
andTasks :: do all iTasks in any order (interleaved), task completed when all done
multiAndTask :: start a new instance of the task on demand and do them in any order, task never completes /* not optimized yet */
andTasks_mu :: assign task to indicated users, task completed when all done
*/
(-||-) infixr 3 :: !(Task a) !(Task a) -> Task a | iData a
(-&&-) infixr 4 :: !(Task a) !(Task b) -> Task (a,b) | iData a & iData b
orTasks :: ![LabeledTask a] -> (Task a) | iData a
andTasks :: ![LabeledTask a] -> Task [a] | iData a
multiAndTask :: !(LabeledTask a) -> Task Void | iData a
andTasks_mu :: !String ![(Int,Task a)] -> Task [a] | iData a
/* Time and Date management:
......
......@@ -127,6 +127,16 @@ orTasks taskCollection = newTask "orTasks" (andTasksCond "or Tasks" (\list -> le
andTasks :: ![LabeledTask a] -> (Task [a]) | iData a
andTasks taskCollection = newTask "andTasks" (andTasksCond "and Tasks" (\_ -> False) taskCollection)
multiAndTask :: !(LabeledTask a) -> Task Void | iData a
multiAndTask (label,task)
= taskId
*=> \id -> addNewTask` id 0
where
addNewTask` id cnt
= id @:> ("New " <+++ label, editTask ("Start " <+++ label) Void)
=>> \_ -> (addNewTask` id (inc cnt) -&&- (id @:> (label <+++ " " <+++ cnt,task))
#>> return_V Void)
andTasks_mu :: !String ![(Int,Task a)] -> (Task [a]) | iData a
andTasks_mu label tasks = newTask "andTasks_mu" (domu_andTasks tasks)
where
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment