Commit 550f0e10 authored by Bas Lijnse's avatar Bas Lijnse

Updated examples

parent 620543d7
Pipeline #29096 passed with stage
in 4 minutes and 40 seconds
......@@ -205,7 +205,7 @@ where
hasName name attributes = maybe False ((==) (JSONString name)) ('DM'.get "name" attributes)
startTask _ = appendTask (NamedDetached identity defaultValue True) (removeWhenStable (task @! ())) topLevelTasks @! ()
startTask _ = appendTask (Detached ('DM'.singleton "name" (JSONString identity)) True) (removeWhenStable (task @! ())) topLevelTasks @! ()
stopTask (Just (taskId,_)) = removeTask taskId topLevelTasks @! ()
removeWhenStable t l = t >>* [OnValue (ifStable (\_ -> get (taskListSelfId l) >>- \id -> removeTask id l @? const NoValue))]
......
......@@ -13,7 +13,7 @@ addOnceToWorkspace :: String (Task a) Workspace -> Task () | iTask a
addOnceToWorkspace identity task workspace
= get (taskListMeta workspace)
>>- \items -> case find identity items of
Nothing = appendTask (NamedEmbedded identity) (removeWhenStable task) workspace @! ()
Nothing = appendTask Embedded (\l -> (removeWhenStable task l <<@ ("name", JSONString identity))) workspace @! ()
_ = return ()
where
find identity [] = Nothing
......
......@@ -13,7 +13,7 @@ addOnceToWorkspace :: String (Task a) Workspace -> Task () | iTask a
addOnceToWorkspace identity task workspace
= get (taskListMeta workspace)
>>- \items -> case find identity items of
Nothing = appendTask (NamedEmbedded identity) (removeWhenStable task) workspace @! ()
Nothing = appendTask Embedded (\l -> (removeWhenStable task l <<@ ("name", JSONString identity))) workspace @! ()
_ = return ()
find identity [] = Nothing
......
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