Commit 62fbf150 authored by Mart Lubbers's avatar Mart Lubbers

change examples for new sequence api

parent 75db7734
Pipeline #13113 passed with stage
in 11 minutes and 11 seconds
......@@ -6,7 +6,7 @@ import Incidone.OP.Concepts, Incidone.OP.SDSs, Incidone.OP.ContactManagementTask
importContactsFromCSVFile :: Document -> Task ()
importContactsFromCSVFile doc
= importCSVDocument doc
>>- \csv -> sequence "Importing contacts" (map create (skipHeader csv))
>>- \csv -> sequence (map create (skipHeader csv))
@! ()
where
skipHeader [] = []
......
......@@ -118,7 +118,7 @@ where
@! ()
createIncidoneTables db
= (sequence "Creating Incidone tables" [sqlExecuteCreateTable db table \\ table <- IncidoneDB]
= (sequence [sqlExecuteCreateTable db table \\ table <- IncidoneDB]
>>- viewInformation "Incidone schema created" []) <<@ Title "Creating Incidone tables..."
>>* [OnAction ActionOk (always (return ()))]
......@@ -127,7 +127,7 @@ where
>>? \_ ->
get (sdsFocus db sqlTables)
>>- \tables ->
sequence "Deleting all tables" [sqlExecuteDropTable db table \\ table <- tables]
sequence [sqlExecuteDropTable db table \\ table <- tables]
>>- viewInformation ("Empty database","All data deleted") []
>>* [OnAction ActionOk (always (return ()))]
......@@ -191,7 +191,7 @@ where
-&&-
enterInformation "Immediate close the incidents?" []
>>= \(num,closed) ->
sequence "Generating test incidents" (repeatn num (generateTestIncident closed))
sequence (repeatn num (generateTestIncident closed))
@! ()
configureIntegration :: Task ()
......
......@@ -57,7 +57,7 @@ whileAuthenticated user ents alwaysOnTasks tlist
openAssignedTasks ws = whileUnchanged tasksToDo (doOpen ws) // (watch tasksToDo >>* [OnValue (hasValue (doOpen ws))])
where
doOpen :: Workspace [(TaskId, WorklistRow)] -> Task ()
doOpen ws xs = sequence "openAssignedTasks" (map (\(taskId, _) -> appendOnce taskId (workOn taskId @! ()) ws) xs) @! ()
doOpen ws xs = sequence (map (\(taskId, _) -> appendOnce taskId (workOn taskId @! ()) ws) xs) @! ()
layout = sequenceLayouts
[removeSubUIs (SelectByPath [1]) //Don't show the openAssignedTasks UI
......
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