Commit b7c410ce authored by Steffen Michels's avatar Steffen Michels

use 'Shared' type synonym where applicable

parent 82fa92a7
Pipeline #17917 failed with stage
in 1 minute and 14 seconds
......@@ -172,7 +172,7 @@ actionStatusByNo :: SDSLens InstanceNo ActionStatus ActionStatu
numActionsByContact :: SDSLens ContactNo Int ()
//Todo items
todoItemTask :: () (sds () ActionStatus ActionStatus) -> Task () | RWShared sds
todoItemTask :: () (Shared sds ActionStatus) -> Task () | RWShared sds
blankTodoItem :: CatalogAction
predefinedTodoItem :: String ItemMeta -> CatalogAction
predefinedInstantItem :: String ItemMeta ActionProgress ((SDSLens () ActionStatus ActionStatus) -> Task a) -> CatalogAction
......@@ -183,7 +183,7 @@ predefinedIncidentItem :: String ItemMeta (IncidentNo (SDSLens () ActionSta
predefinedContactItem :: String ItemMeta (Maybe String) (ContactNo (SDSLens () ActionStatus ActionStatus) -> Task a) -> CatalogAction | iTask a
//Action lists items
listItemTask :: (String,ActionPlan) (sds () ActionStatus ActionStatus) -> Task () | RWShared sds
listItemTask :: (String,ActionPlan) (Shared sds ActionStatus) -> Task () | RWShared sds
blankListItem :: CatalogAction
predefinedListItem :: String ItemMeta ActionPlan -> CatalogAction
configurableListItem :: String ItemMeta (Task c) (c -> ActionPlan) -> CatalogAction | iTask c
......
......@@ -194,7 +194,7 @@ predefinedContactItem identity meta mbGroup contactTask
where
task status contactNo = contactTask status contactNo @? const NoValue
updateSharedActionStatus :: (sds () ActionStatus ActionStatus) -> Task ActionStatus | RWShared sds
updateSharedActionStatus :: (Shared sds ActionStatus) -> Task ActionStatus | RWShared sds
updateSharedActionStatus status
= watch status
>^* [OnAction (Action "Mark active") (ifValue (ifProgress ActionActive) (\_ -> setProgress ActionActive status))
......@@ -265,7 +265,7 @@ userActionCatalog :: SDSLens () [UserCatalogAction] [UserCatalogAction]
userActionCatalog = sharedStore "UserActionCatalog" []
//Todo items
todoItemTask :: () (sds () ActionStatus ActionStatus) -> Task () | RWShared sds
todoItemTask :: () (Shared sds ActionStatus) -> Task () | RWShared sds
todoItemTask _ status
= viewSharedInformation () [ViewAs (\{ActionStatus|description} -> description)] status @! ()
......@@ -287,7 +287,7 @@ userTodoItem :: String ItemMeta -> CatalogAction
userTodoItem identity meta = predefinedTodoItem identity meta
//Alert item
alertItemTask :: (ContactNo,Maybe P2000Message) (sds () ActionStatus ActionStatus) -> Task () | RWShared sds
alertItemTask :: (ContactNo,Maybe P2000Message) (Shared sds ActionStatus) -> Task () | RWShared sds
alertItemTask contactNo status = communicationItemTask contactNo status
configureAlertItemTask :: [ContactNo] [IncidentNo] -> Task ((ContactNo, Maybe P2000Message),ActionStatus)
......@@ -311,7 +311,7 @@ userAlertItem identity meta def
= {CatalogAction|identity=identity,meta=meta,tasks=ActionTasks (configureUserAlertItemTask meta def) alertItemTask}
//Inform items
informItemTask :: (ContactNo,Maybe P2000Message) (sds () ActionStatus ActionStatus) -> Task () | RWShared sds
informItemTask :: (ContactNo,Maybe P2000Message) (Shared sds ActionStatus) -> Task () | RWShared sds
informItemTask contactNo status = communicationItemTask contactNo status
configureInformItemTask :: [ContactNo] [IncidentNo] -> Task ((ContactNo,Maybe P2000Message),ActionStatus)
......@@ -336,7 +336,7 @@ userInformItem identity meta def
= {CatalogAction|identity=identity,meta=meta,tasks=ActionTasks (configureUserInformItemTask meta def) informItemTask}
//List items
listItemTask :: (String,ActionPlan) (sds () ActionStatus ActionStatus) -> Task () | RWShared sds
listItemTask :: (String,ActionPlan) (Shared sds ActionStatus) -> Task () | RWShared sds
listItemTask (title,plan) status
= upd (\s -> {ActionStatus|s & title = title}) status
>>- \{ActionStatus|contacts,incidents} ->
......@@ -427,7 +427,7 @@ configureUserCommunicationItemTask type meta {CommunicationActionDefinition|cont
configureUserCommunicationItemTask type _ _ initContacts initIncidents
= configureCommunicationItemTask type initContacts initIncidents
communicationItemTask :: (ContactNo,Maybe P2000Message) (sds () ActionStatus ActionStatus) -> Task () | RWShared sds
communicationItemTask :: (ContactNo,Maybe P2000Message) (Shared sds ActionStatus) -> Task () | RWShared sds
communicationItemTask (contactNo,mbP2000Template) status
//View action description
= viewSharedInformation () [ViewAs (\{ActionStatus|description} -> description)] status
......@@ -631,7 +631,7 @@ where
>>- \updated ->
logActionUpdated updated @! (Just updated)
edit :: (a -> Task a) (sds () a a) -> Task (Maybe a) | iTask a & RWShared sds //TODO: Move to util
edit :: (a -> Task a) (Shared sds a) -> Task (Maybe a) | iTask a & RWShared sds //TODO: Move to util
edit task sds
= get sds
>>- \current ->
......@@ -677,12 +677,12 @@ where
incidents status
= mapReadWrite (\{ActionStatus|incidents}-> incidents, \incidents status -> Just {ActionStatus|status & incidents=incidents}) Nothing status
manageSubActions :: ActionPlan (sds () ActionStatus ActionStatus) (SharedTaskList ()) -> Task () | RWShared sds
manageSubActions :: ActionPlan (Shared sds ActionStatus) (SharedTaskList ()) -> Task () | RWShared sds
manageSubActions plan status list
= (manageCurrentSubActionItems status list) -||- (addSuggestedSubActionItems plan status list) <<@ ArrangeHorizontal
@? const NoValue
manageCurrentSubActionItems :: (sds () ActionStatus ActionStatus) (SharedTaskList ()) -> Task () | RWShared sds
manageCurrentSubActionItems :: (Shared sds ActionStatus) (SharedTaskList ()) -> Task () | RWShared sds
manageCurrentSubActionItems status list
= enterChoiceWithShared (Title "Current Actions") [ChooseFromGrid (format o thd3)] (subTaskItems list)
>^* [OnAction (Action "Add action") (always (get status >>- \{ActionStatus|contacts,incidents} -> addSubAction contacts incidents list))]
......@@ -696,7 +696,7 @@ where
formatProgress p
= "<div style=\"display:inline-block; width:16px; height:16px; margin-right:10px;\" class=\"icon-action-" +++ toString p +++ "\"></div>"
addSuggestedSubActionItems :: ActionPlan (sds () ActionStatus ActionStatus) (SharedTaskList ()) -> Task () | RWShared sds
addSuggestedSubActionItems :: ActionPlan (Shared sds ActionStatus) (SharedTaskList ()) -> Task () | RWShared sds
addSuggestedSubActionItems plan status list
= plan.suggestedActions
>&> \suggestions ->
......
......@@ -27,7 +27,7 @@ viewContactCommunicationMeans :: ContactNo -> Task [CommunicationMean]
updateContactPosition :: ContactNo -> Task (Maybe (Maybe ContactPosition))
updateContactStatus :: ContactNo -> Task (Maybe (Maybe ContactStatus))
updateSharedContactRefList :: d (sds () [ContactNo] [ContactNo]) -> Task [ContactNo] | toPrompt d & RWShared sds
updateSharedContactRefList :: d (Shared sds [ContactNo]) -> Task [ContactNo] | toPrompt d & RWShared sds
selectKnownOrDefineNewContact :: Task (Either ContactNo NewContact)
createContactIfNew :: (Either ContactNo NewContact) -> Task ContactNo
......@@ -36,7 +36,7 @@ createContact :: NewContact -> Task ContactNo
deleteContact :: ContactNo -> Task ()
addContactPhoto :: ContactNo Document -> Task ContactPhoto
updatePosition :: ContactPosition String (sds () Contact Contact) -> Task Contact | RWShared sds
updatePosition :: ContactPosition String (Shared sds Contact) -> Task Contact | RWShared sds
createCommunicationMean :: ContactNo NewCommunicationMean -> Task CommunicationMeanId
deleteCommunicationMean :: CommunicationMeanId -> Task ()
......@@ -44,4 +44,4 @@ deleteCommunicationMean :: CommunicationMeanId -> Task ()
//Check credentials for contacts that can log in
verifyContactCredentials :: Credentials -> Task (Maybe User)
viewContactsOnMap :: (sds1 () [ContactGeo] w) (sds2 () (Maybe (Either ContactNo MMSI)) (Maybe (Either ContactNo MMSI))) -> Task (Either ContactNo MMSI) | iTask w & RWShared sds1 & RWShared sds2
viewContactsOnMap :: (sds1 () [ContactGeo] w) (Shared sds2 (Maybe (Either ContactNo MMSI))) -> Task (Either ContactNo MMSI) | iTask w & RWShared sds1 & RWShared sds2
......@@ -29,7 +29,7 @@ selectContact = withShared Nothing
where
mapContacts = mapRead (\(x,y) -> x++y) (contactsOfOpenIncidentsGeo |*| contactsProvidingHelpGeo)
selectContactFromLists :: (sds () (Maybe (Either ContactNo MMSI)) (Maybe (Either ContactNo MMSI))) -> Task (Either ContactNo MMSI) | RWShared sds
selectContactFromLists :: (Shared sds (Maybe (Either ContactNo MMSI))) -> Task (Either ContactNo MMSI) | RWShared sds
selectContactFromLists sel
= anyTask [editSharedSelectionWithShared (Title "Involved in open incidents") False
(SelectInTree groupByIncident select) contactsOfOpenIncidentsShort (selIds sel)
......@@ -44,7 +44,7 @@ where
fromOpenOption [{ContactShortWithIncidents|contactNo}] = contactNo
selIds :: (sds () (Maybe (Either ContactNo MMSI)) (Maybe (Either ContactNo MMSI))) -> SDSLens () [Int] [Int] | RWShared sds
selIds :: (Shared sds (Maybe (Either ContactNo MMSI))) -> SDSLens () [Int] [Int] | RWShared sds
selIds sel = mapReadWrite (toPrj,fromPrj) (Just \p w. Ok (toPrj w)) sel
where
toPrj Nothing = []
......@@ -435,7 +435,7 @@ updateContactStatus contactNo
>>| logContactStatusUpdated contactNo status newStatus
@! newStatus
updateSharedContactRefList :: d (sds () [ContactNo] [ContactNo]) -> Task [ContactNo] | toPrompt d & RWShared sds
updateSharedContactRefList :: d (Shared sds [ContactNo]) -> Task [ContactNo] | toPrompt d & RWShared sds
updateSharedContactRefList d refs
= manageCurrentItems
>^* [OnAction (Action "Add") (always (addItem <<@ InWindow))]
......@@ -541,7 +541,7 @@ deleteCommunicationMean id
["CommunicationMean","Telephone","VHFRadio","EmailAccount","P2000Receiver"]]
@! ()
updatePosition :: ContactPosition String (sds () Contact Contact) -> Task Contact | RWShared sds
updatePosition :: ContactPosition String (Shared sds Contact) -> Task Contact | RWShared sds
updatePosition newposition src contact
= upd (update newposition src) contact
where
......@@ -553,7 +553,7 @@ verifyContactCredentials credentials
= get (sdsFocus credentials contactByCredentials)
@ fmap contactUser
viewContactsOnMap :: (sds1 () [ContactGeo] w) (sds2 () (Maybe (Either ContactNo MMSI)) (Maybe (Either ContactNo MMSI))) -> Task (Either ContactNo MMSI) | iTask w & RWShared sds1 & RWShared sds2
viewContactsOnMap :: (sds1 () [ContactGeo] w) (Shared sds2 (Maybe (Either ContactNo MMSI))) -> Task (Either ContactNo MMSI) | iTask w & RWShared sds1 & RWShared sds2
viewContactsOnMap sharedContacts sel
= get (standardMapLayers |*| standardPerspective)
>>- \(baseLayers,perspective) ->
......@@ -566,9 +566,9 @@ viewContactsOnMap sharedContacts sel
]
@? selection
where
mapState :: (sds1 () (Bool,ContactMapPerspective) (Bool,ContactMapPerspective))
mapState :: (Shared sds1 (Bool,ContactMapPerspective))
(sds2 () [ContactGeo] w)
(sds3 () (Maybe (Either ContactNo MMSI)) (Maybe (Either ContactNo MMSI))) ->
(Shared sds3 (Maybe (Either ContactNo MMSI))) ->
SDSSequence () ([(Bool,ContactGeo)], Maybe (Either ContactNo MMSI), ContactMapPerspective) (Maybe (Either ContactNo MMSI), ContactMapPerspective) | iTask w & RWShared sds1 & RWShared sds2 & RWShared sds3
mapState local contacts sel = sdsSequence "mapState" id (\_ r -> r) (\_ _ -> Right read) writel writer (local >*< sel) mapContacts
where
......
......@@ -12,7 +12,7 @@ manageIncidentLog :: IncidentNo -> Task ()
viewIncidentDetails :: IncidentNo -> Task ()
//Reusable task fragments
updateSharedIncidentRefList :: d Bool (sds () [IncidentNo] [IncidentNo]) -> Task [IncidentNo] | toPrompt d & RWShared sds
updateSharedIncidentRefList :: d Bool (Shared sds [IncidentNo]) -> Task [IncidentNo] | toPrompt d & RWShared sds
selectKnownOrDefineNewIncident :: Task (Either IncidentNo NewIncident)
createIncidentIfNew :: (Either IncidentNo NewIncident) -> Task IncidentNo
......
......@@ -164,7 +164,7 @@ viewIncidentDetails incidentNo
where
incident = sdsFocus incidentNo incidentByNo
updateSharedIncidentRefList :: d Bool (sds () [IncidentNo] [IncidentNo]) -> Task [IncidentNo] | toPrompt d & RWShared sds
updateSharedIncidentRefList :: d Bool (Shared sds [IncidentNo]) -> Task [IncidentNo] | toPrompt d & RWShared sds
updateSharedIncidentRefList d compact refs
= manageCurrentItems
>^* [OnAction (Action "Add") (always (addItem <<@ InWindow))]
......
......@@ -56,7 +56,7 @@ toOrderBySQL :: [RowOrderDef] -> String
fromSQLWithId :: [SQLValue] -> (Int,a) | mbFromSQL a
(>++>) infixl 6 :: (sds1 () SQLDatabaseDef SQLDatabaseDef) (sds2 (SQLDatabaseDef,p) r w) -> SDSSequence p r w | iTask p & TC r & TC w & RWShared sds1 & RWShared sds2
(>++>) infixl 6 :: (Shared sds1 SQLDatabaseDef) (sds2 (SQLDatabaseDef,p) r w) -> SDSSequence p r w | iTask p & TC r & TC w & RWShared sds1 & RWShared sds2
sqlReadSDS :: String -> SDSSource (SQLDatabaseDef,QueryDef) [r] () | mbFromSQL r
sqlReadWriteOneSDS :: String -> SDSSource (SQLDatabaseDef,QueryDef) r r | mbFromSQL, mbToSQL r & gDefault{|*|} r
......
......@@ -147,7 +147,7 @@ fromSQLWithId :: [SQLValue] -> (Int,a) | mbFromSQL a
fromSQLWithId row = (fromSQL [last row],fromSQL (init row))
//UTIL SDS Combinators
(>++>) infixl 6 :: (sds1 () SQLDatabaseDef SQLDatabaseDef) (sds2 (SQLDatabaseDef,p) r w) -> SDSSequence p r w | iTask p & TC r & TC w & RWShared sds1 & RWShared sds2
(>++>) infixl 6 :: (Shared sds1 SQLDatabaseDef) (sds2 (SQLDatabaseDef,p) r w) -> SDSSequence p r w | iTask p & TC r & TC w & RWShared sds1 & RWShared sds2
(>++>) db sds = sdsSequence ">++>" id (\p db -> (db,p)) (\_ _ -> Right snd) (SDSWriteConst (\_ _ -> Ok Nothing)) (SDSWriteConst (\_ w -> Ok (Just w))) (sdsFocus () db) sds
sqlReadSDS :: String -> SDSSource (SQLDatabaseDef,QueryDef) [r] () | mbFromSQL r
......
......@@ -26,7 +26,7 @@ doAddRemoveOpen :: (Task a) (r -> Task b) (r -> Task c) Workspace (sds () (M
// Utility
viewAndEdit :: (Task a) (Task b) -> Task b | iTask a & iTask b
viewOrEdit :: d (sds () a a) (a a -> Task ()) -> Task () | toPrompt d & iTask a & RWShared sds
viewOrEdit :: d (Shared sds a) (a a -> Task ()) -> Task () | toPrompt d & iTask a & RWShared sds
doOrClose :: (Task a) -> Task (Maybe a) | iTask a
doOrCancel :: (Task a) -> Task (Maybe a) | iTask a
......@@ -43,7 +43,7 @@ oneOrAnother :: !d (String,Task a) (String,Task b) -> Task (Either a b) | toProm
enterMultiple :: !String !Int (Task a) -> Task [a] | iTask a
//Work on multiple items from a shared list and add
manageSharedListWithDetails :: (Int -> Task ()) (Task Int) (sds () [Int] [Int]) -> Task () | RWShared sds
manageSharedListWithDetails :: (Int -> Task ()) (Task Int) (Shared sds [Int]) -> Task () | RWShared sds
//Ok/Cancel transition
(>>?) infixl 1 :: !(Task a) !(a -> Task b) -> Task (Maybe b) | iTask a & iTask b
......@@ -53,6 +53,6 @@ manageSharedListWithDetails :: (Int -> Task ()) (Task Int) (sds () [Int] [Int])
manageBackgroundTask :: !d !String !String (Task a) -> Task () | toPrompt d & iTask a
//Reading network streams
syncNetworkChannel :: String Int String (String -> m) (m -> String) (sds () ([m],Bool,[m],Bool) ([m],Bool,[m],Bool)) -> Task () | iTask m & RWShared sds
consumeNetworkStream :: ([m] -> Task ()) (sds () ([m],Bool,[m],Bool) ([m],Bool,[m],Bool)) -> Task () | iTask m & RWShared sds
syncNetworkChannel :: String Int String (String -> m) (m -> String) (Shared sds ([m],Bool,[m],Bool)) -> Task () | iTask m & RWShared sds
consumeNetworkStream :: ([m] -> Task ()) (Shared sds ([m],Bool,[m],Bool)) -> Task () | iTask m & RWShared sds
......@@ -89,7 +89,7 @@ viewAndEdit view edit
= forever (view >>* [OnAction (Action "Edit") (always edit)])
//Move to common tasks
viewOrEdit :: d (sds () a a) (a a -> Task ()) -> Task () | toPrompt d & iTask a & RWShared sds
viewOrEdit :: d (Shared sds a) (a a -> Task ()) -> Task () | toPrompt d & iTask a & RWShared sds
viewOrEdit prompt s log
= forever (view >>* [OnAction (Action "/Edit") (hasValue edit)]) @! ()
where
......@@ -166,7 +166,7 @@ where
more list = viewInformation () [] ()
>>* [OnAction (Action action) (always (appendTask Embedded more list >>| task))]
manageSharedListWithDetails :: (Int -> Task ()) (Task Int) (sds () [Int] [Int]) -> Task () | RWShared sds
manageSharedListWithDetails :: (Int -> Task ()) (Task Int) (Shared sds [Int]) -> Task () | RWShared sds
manageSharedListWithDetails detailsTask addTask refsList //Not the best implementation, but good enough for now
= get refsList
>>- \initList ->
......@@ -209,7 +209,7 @@ where
removeWhenStable t l = t >>* [OnValue (ifStable (\_ -> get (taskListSelfId l) >>- \id -> removeTask id l @? const NoValue))]
syncNetworkChannel :: String Int String (String -> m) (m -> String) (sds () ([m],Bool,[m],Bool) ([m],Bool,[m],Bool)) -> Task () | iTask m & RWShared sds
syncNetworkChannel :: String Int String (String -> m) (m -> String) (Shared sds ([m],Bool,[m],Bool)) -> Task () | iTask m & RWShared sds
syncNetworkChannel server port msgSeparator decodeFun encodeFun channel
= tcpconnect server port channel {ConnectionHandlers|onConnect=onConnect,onData=onData,onShareChange=onShareChange,onDisconnect=onDisconnect} @! ()
where
......@@ -229,7 +229,7 @@ where
onDisconnect l (received,receiveStopped,send,sendStopped)
= (Ok l,Just (received,True,send,sendStopped))
consumeNetworkStream :: ([m] -> Task ()) (sds () ([m],Bool,[m],Bool) ([m],Bool,[m],Bool)) -> Task () | iTask m & RWShared sds
consumeNetworkStream :: ([m] -> Task ()) (Shared sds ([m],Bool,[m],Bool)) -> Task () | iTask m & RWShared sds
consumeNetworkStream processTask channel
= ((watch channel >>* [OnValue (ifValue ifProcess process)]) <! id) @! ()
where
......
......@@ -198,7 +198,7 @@ handleAlarm (me, (alarmLoc, detector), (actorLoc, actor), priority)
isFailed (MoveFailed _) = True
isFailed _ = False
taskToDo :: !(!Coord3D, !SectionStatus) !User !(sds1 () MySectionStatusMap MySectionStatusMap) !(UserActorShare o a) !(sds2 () MySectionInventoryMap MySectionInventoryMap)
taskToDo :: !(!Coord3D, !SectionStatus) !User !(Shared sds1 MySectionStatusMap) !(UserActorShare o a) !(Shared sds2 MySectionInventoryMap)
-> Task (MoveSt String) | RWShared sds1 & RWShared sds2
taskToDo (alarmLoc, status) user shStatusMap shUserActor shInventoryMap
= viewSharedInformation ("Handle " <+++ toString status <+++ " in Section: " <+++ alarmLoc) [ViewAs todoTable] (sectionForUserShare user |*| myUserActorMap |*| shStatusMap |*| shInventoryMap |*| lockedExitsShare |*| lockedHopsShare |*| sharedGraph)
......
......@@ -272,7 +272,7 @@ editSectionContents
)
] @! () //TODO <<@ ApplyLayout layout @! ()
where
updateSectionEditor :: !String ![ChoiceOption a] (sds1 () [a] [a]) (sds2 () [a] [a]) -> Task [a] | iTask a & RWShared sds1 & RWShared sds2
updateSectionEditor :: !String ![ChoiceOption a] (Shared sds1 [a]) (Shared sds2 [a]) -> Task [a] | iTask a & RWShared sds1 & RWShared sds2
updateSectionEditor d updOpts listShare focusedShare
= editSharedMultipleChoiceWithShared (Title d) updOpts listShare focusedShare
......
......@@ -30,7 +30,7 @@ changeFloodScript = changeScript "Handling Flood" handleFloodScript
changeSmokeScript :: Task ()
changeSmokeScript = changeScript "Handling Smoke" handleSmokeScript
changeScript :: !String !(sds () [Script] [Script]) -> Task () | RWShared sds
changeScript :: !String !(Shared sds [Script]) -> Task () | RWShared sds
changeScript prompt script
= viewSharedInformation ("Current Script: " <+++ prompt) [ViewAs (\script -> [toString i +++ " : " +++ line \\ line <- map toSingleLineText script & i <- [1..]])] script
>>* [ OnAction (Action "Fine") (always (return ()))
......
......@@ -458,12 +458,12 @@ where
-> ((((((((ms2d`, exitLocks), hopLocks), inventoryMap), statusMap), actorMap), network), allDevices), cl`)
}
setAlarm :: !User !(!Coord3D, !SectionStatus) !(sds () MySectionStatusMap MySectionStatusMap) -> Task () | RWShared sds
setAlarm :: !User !(!Coord3D, !SectionStatus) !(Shared sds MySectionStatusMap) -> Task () | RWShared sds
setAlarm user (alarmLoc, status) shStatusMap
= setSectionStatus alarmLoc status shStatusMap
>>| addLog user "" ("Resets " <+++ status <+++ " in Section " <+++ alarmLoc <+++ " to False.")
setSectionStatus :: !Coord3D !SectionStatus !(sds () (SectionStatusMap SectionStatus) (SectionStatusMap SectionStatus)) -> Task () | RWShared sds
setSectionStatus :: !Coord3D !SectionStatus !(Shared sds (SectionStatusMap SectionStatus)) -> Task () | RWShared sds
setSectionStatus roomNumber status statusMap
= upd ('DM'.put roomNumber status) statusMap @! ()
......
......@@ -585,7 +585,7 @@ getObjectOfType {Actor | carrying} objType` = case [obj \\ obj <- carrying | obj
autoMove :: !Coord3D !Coord3D
!(Coord3D Coord3D (SectionStatusMap r) SectionExitLockMap SectionHopLockMap Graph -> Maybe ([Coord3D], Distance))
!User !(sds () (SectionStatusMap r) (SectionStatusMap r)) !(UserActorShare o a)
!User !(Shared sds (SectionStatusMap r)) !(UserActorShare o a)
-> Task Bool | iTask r & iTask o & iTask a & RWShared sds
autoMove thisSection target pathFun user shipStatusShare userToActorShare
| thisSection == target = return True
......
......@@ -16,22 +16,22 @@ derive class iTask Location
/* Utility tasks */
editSharedList :: (sds () [a] [a]) -> Task () | iTask a & RWShared sds
editSharedList :: (Shared sds [a]) -> Task () | iTask a & RWShared sds
editSharedList list
= editSharedListWithTask (updateInformation "Item Info" []) list
editSharedListWithTask :: (a -> Task a) (sds () [a] [a]) -> Task () | iTask a & RWShared sds
editSharedListWithTask :: (a -> Task a) (Shared sds [a]) -> Task () | iTask a & RWShared sds
editSharedListWithTask tupdate list
= editSharedListWithTaskTask (enterInformation "Enter new item" []) tupdate list
editSharedListWithTaskTask :: (Task a) (a -> Task a) (sds () [a] [a])-> Task () | iTask a & RWShared sds
editSharedListWithTaskTask :: (Task a) (a -> Task a) (Shared sds [a])-> Task () | iTask a & RWShared sds
editSharedListWithTaskTask tenter tupdate list
= editSharedListGeneric [ESLUpdate ("Edit Item",tupdate)
,ESLAdd ("Add Item",tenter)
,ESLDel
,ESLClearAll] list
editSharedListGeneric :: [EditSharedListOption a] (sds () [a] [a]) -> Task () | iTask a & RWShared sds
editSharedListGeneric :: [EditSharedListOption a] (Shared sds [a]) -> Task () | iTask a & RWShared sds
editSharedListGeneric options list
= doOrClose (forever (enterChoiceWithShared "Choose an item"
[ChooseFromGrid snd]
......@@ -64,7 +64,7 @@ where addItem tenter = tenter >>= \item -> upd (\us -> us ++ [item]) list @! (
doOrClose :: (Task a) -> Task (Maybe a) | iTask a
doOrClose task = ((task @ Just) -||- chooseAction [(ActionClose,Nothing)]) >>- return
updateItemInSharedList :: a (a -> Bool) (sds () [a] [a]) -> Task [a] | iTask a & RWShared sds
updateItemInSharedList :: a (a -> Bool) (Shared sds [a]) -> Task [a] | iTask a & RWShared sds
updateItemInSharedList newitem cond share = upd f share
where f [] = []
f [a:as] | cond a = [newitem : as]
......
......@@ -38,11 +38,11 @@ crud` :: !d !((f r) -> [r]) !(r (f r) -> f` w) !(r (f r) -> f` w)
-> Task () | toPrompt d & iTask r & iTask (f r) & iTask w & iTask (f` w) & RWShared sds
crud` descr toList putItem delItem sh = crudWith descr [] [] [] [] toList putItem delItem sh
editStore :: String (sds () [a] [a]) -> Task () | iTask a & Eq a & Ord a & RWShared sds
editStore :: String (Shared sds [a]) -> Task () | iTask a & Eq a & Ord a & RWShared sds
editStore prompt store
= crud` (Title prompt) id (\item items -> sort [item:items]) (\item items -> removeMember item items) store
addToStore :: [a] !(sds () [a] [a]) -> Task () | iTask a & RWShared sds
addToStore :: [a] !(Shared sds [a]) -> Task () | iTask a & RWShared sds
addToStore new store
= upd (\content -> content ++ new) store @! ()
......
......@@ -43,12 +43,12 @@ createChatSession enter update
>>= \me -> enterMultipleChoiceWithShared ("select chatters") [ChooseFromCheckGroup id] users
>>= \others -> withShared [] (startChats enter update [me:others])
startChats :: (Task a) (User a -> Task b) [User] (sds () [b] [b]) -> Task [b] | iTask a & iTask b & RWShared sds
startChats :: (Task a) (User a -> Task b) [User] (Shared sds [b]) -> Task [b] | iTask a & iTask b & RWShared sds
startChats enter update chatters chatStore
= allTasks[(user, "chat") @: chatWith user enter update chatStore \\ user <- chatters]
>>| get chatStore
chatWith :: User (Task a) (User a -> Task b) (sds () [b] [b]) -> Task () | iTask a & iTask b & RWShared sds
chatWith :: User (Task a) (User a -> Task b) (Shared sds [b]) -> Task () | iTask a & iTask b & RWShared sds
chatWith me enter update chatStore
= viewSharedInformation ("Chat History:") [] chatStore
||-
......
......@@ -58,12 +58,12 @@ createChatSession enter update
>>= \me -> enterMultipleChoiceWithShared ("select chatters") [ChooseFromCheckGroup id] users
>>= \others -> withShared [] (startChats enter update [me:others])
where
startChats :: (Task a) (User a -> Task b) [User] (sds () [b] [b]) -> Task [b] | iTask a & iTask b & RWShared sds
startChats :: (Task a) (User a -> Task b) [User] (Shared sds [b]) -> Task [b] | iTask a & iTask b & RWShared sds
startChats enter update chatters chatStore
= allTasks[(user,foldl (+++) "" (map toString chatters)) @: chatWith user enter update chatStore \\ user <- chatters]
>>| get chatStore
chatWith :: User (Task a) (User a -> Task b) (sds () [b] [b]) -> Task () | iTask a & iTask b & RWShared sds
chatWith :: User (Task a) (User a -> Task b) (Shared sds [b]) -> Task () | iTask a & iTask b & RWShared sds
chatWith me enter update chatStore
= viewSharedInformation ("Chat History:") [] chatStore
||-
......
......@@ -32,11 +32,11 @@ editWithStatistics
>>* [ OnAction (Action "Quit") (always (return ()))
]
editFile :: String (sds () String String) -> Task () | RWShared sds
editFile :: String (Shared sds String) -> Task () | RWShared sds
editFile fileName sharedFile
= updateSharedInformation ("edit " +++ fileName) [UpdateUsing id (const id) textArea] sharedFile @! ()
showStatistics :: (sds () String String) -> Task () | RWShared sds
showStatistics :: (Shared sds String) -> Task () | RWShared sds
showStatistics sharedFile = viewSharedInformation "Statistics:" [ViewAs stat] sharedFile @! ()
where
stat text = {lineCount = lengthLines text, wordCount = lengthWords text}
......@@ -47,7 +47,7 @@ where
lengthWords "" = 0
lengthWords text = length (split " " (replaceSubString "\n" " " text))
replace :: Replace (sds () String String) -> Task () | RWShared sds
replace :: Replace (Shared sds String) -> Task () | RWShared sds
replace cmnd sharedFile
= ( updateInformation "Replace:" [] cmnd
>>* [ OnAction (Action "Replace") (hasValue substitute)
......
......@@ -12,14 +12,14 @@ playWithMaps = withShared {defaultValue & icons = shipIcons} (\m ->
manipulateMap m
) <<@ ArrangeWithSideBar 0 LeftSide 600 True @! ()
manipulateMap :: (sds () LeafletMap LeafletMap) -> Task () | RWShared sds
manipulateMap :: (Shared sds LeafletMap) -> Task () | RWShared sds
manipulateMap m = updateSharedInformation () [] m
<<@ ApplyLayout (layoutSubUIs (SelectByPath [1]) (setUIAttributes (sizeAttr FlexSize FlexSize))) @! ()
managePerspective :: (sds () LeafletMap LeafletMap) -> Task () | RWShared sds
managePerspective :: (Shared sds LeafletMap) -> Task () | RWShared sds
managePerspective m = updateSharedInformation (Title "Perspective") [] (mapReadWrite (\x -> x.LeafletMap.perspective,\p x -> Just {x & perspective = p}) Nothing m) @! ()
manageMapObjects :: (sds () LeafletMap LeafletMap) -> Task () | RWShared sds
manageMapObjects :: (Shared sds LeafletMap) -> Task () | RWShared sds
manageMapObjects m = updateSharedInformation (Title "Manage objects") [UpdateAs toPrj fromPrj] m
-|| addDemoObjects m
@! ()
......
......@@ -28,31 +28,31 @@ invite_friends
(viewInformation "Oops" [] "number of friends must be 1, 2, or 3" >>| invite_friends)
(return them)
play_game :: ![(Color,User)] !(sds () GameSt GameSt) -> Task (Color,String) | RWShared sds
play_game :: ![(Color,User)] !(Shared sds GameSt) -> Task (Color,String) | RWShared sds
play_game users game_st
= anyTask [ (u,"Play Ligretto") @: play (c,toString u) game_st
\\ (c,u) <- users
]
play :: !(!Color,!String) !(sds () GameSt GameSt) -> Task (Color,String) | RWShared sds
play :: !(!Color,!String) !(Shared sds GameSt) -> Task (Color,String) | RWShared sds
play (me,name) game_st
= updateSharedInformation name [ligrettoEditor me] game_st
>>* [OnValue (withValue (\gameSt -> determine_winner gameSt
>>= \winner -> return (accolades winner me game_st >>| return winner)))]
show_winner :: Color (sds () GameSt GameSt) GameSt -> Task (Color,String) | RWShared sds
show_winner :: Color (Shared sds GameSt) GameSt -> Task (Color,String) | RWShared sds
show_winner me game_st gameSt
= accolades winner me game_st >>| return winner
where
{color,name} = fromJust (and_the_winner_is gameSt)
winner = (color,name)
game_over :: !Color !(sds () GameSt GameSt) !GameSt -> Maybe (Task (Color,String)) | RWShared sds
game_over :: !Color !(Shared sds GameSt) !GameSt -> Maybe (Task (Color,String)) | RWShared sds
game_over me game_st gameSt
= and_the_winner_is gameSt
>>= \{color,name} -> (let winner = (color,name)
in return (accolades winner me game_st >>| return winner))
accolades :: !(!Color,!String) !Color !(sds () GameSt GameSt) -> Task GameSt | RWShared sds
accolades :: !(!Color,!String) !Color !(Shared sds GameSt) -> Task GameSt | RWShared sds
accolades winner me game_st
= updateSharedInformation ("The winner is " <+++ winner) [accoladesEditor me] game_st
......@@ -14,7 +14,7 @@ tonic :: Task ()
tonicStaticBrowser :: [TaskAppRenderer] -> Task ()
tonicBrowseWithModule :: AllBlueprints [TaskAppRenderer] (sds () NavStack NavStack) TonicModule -> Task () | RWShared sds
tonicBrowseWithModule :: AllBlueprints [TaskAppRenderer] (Shared sds NavStack) TonicModule -> Task () | RWShared sds
tonicStaticWorkflow :: [TaskAppRenderer] -> Workflow
......@@ -22,4 +22,4 @@ tonicDynamicBrowser :: [TaskAppRenderer] -> Task ()
tonicDynamicWorkflow :: [TaskAppRenderer] -> Workflow
viewStaticTask :: !AllBlueprints ![TaskAppRenderer] !(sds () NavStack NavStack) !BlueprintIdent !TonicModule !TonicFunc !Int !Bool -> Task () | RWShared sds
viewStaticTask :: !AllBlueprints ![TaskAppRenderer] !(Shared sds NavStack) !BlueprintIdent !TonicModule !TonicFunc !Int !Bool -> Task () | RWShared sds
......@@ -68,7 +68,7 @@ tonicStaticBrowser rs
selectModule = getTonicModules >>- enterChoice "Select a module" [ChooseFromDropdown id]
noModuleSelection = viewInformation () [] "Select module..."
tonicBrowseWithModule :: AllBlueprints [TaskAppRenderer] (sds () NavStack NavStack) TonicModule -> Task () | RWShared sds
tonicBrowseWithModule :: AllBlueprints [TaskAppRenderer] (Shared sds NavStack) TonicModule -> Task () | RWShared sds
tonicBrowseWithModule allbps rs navstack tm
= (selectTask tm
>&> withSelection noTaskSelection (
......@@ -90,7 +90,7 @@ tonicBrowseWithModule allbps rs navstack tm
noTaskSelection = viewInformation () [] "Select task..."
viewStaticTask :: !AllBlueprints ![TaskAppRenderer] !(sds () NavStack NavStack) !BlueprintIdent !TonicModule !TonicFunc !Int !Bool -> Task () | RWShared sds
viewStaticTask :: !AllBlueprints ![TaskAppRenderer] !(Shared sds NavStack) !BlueprintIdent !TonicModule !TonicFunc !Int !Bool -> Task () | RWShared sds
viewStaticTask allbps rs navstack bpref tm tt depth compact
= get navstack
>>~ \ns -> (showStaticBlueprint rs bpref (expandTask allbps depth tt) compact depth
......@@ -281,7 +281,7 @@ tonicDynamicBrowser rs
//# (as,bs) = split xs
//= merge f (mergeSortBy f as) (mergeSortBy f bs)
tonicDynamicBrowser` :: [TaskAppRenderer] (sds () NavStack NavStack) -> Task () | RWShared sds
tonicDynamicBrowser` :: [TaskAppRenderer] (Shared sds NavStack) -> Task () | RWShared sds
tonicDynamicBrowser` rs navstack =
((activeBlueprintInstances -&&- blueprintViewer) /* <<@ ArrangeVertical */) @! ()
where
......@@ -379,7 +379,7 @@ getModuleAndTask allbps mn tn
Just tt -> return (mod, tt)
_ -> throw "Can't get module and task"
viewInstance :: ![TaskAppRenderer] !(sds () NavStack NavStack) !DynamicDisplaySettings !BlueprintInstance
viewInstance :: ![TaskAppRenderer] !(Shared sds NavStack) !DynamicDisplaySettings !BlueprintInstance
!(Maybe (Either ClickMeta (ModuleName, FuncName, ComputationId, Int))) !ClickMeta
-> Task () | RWShared sds
viewInstance rs navstack dynSett bpinst=:{bpi_bpref = {bpr_moduleName, bpr_taskName}} selDetail meta=:{click_target_bpident = {bpident_compId = Just tid}}
......
......@@ -64,7 +64,7 @@ where
onDisconnect state share
= (Ok state, Just share)
process :: (sds () AuthShare AuthShare) -> Task () | RWShared sds
process :: (Shared sds AuthShare) -> Task () | RWShared sds
process share
= forever (watch share >>* [OnValue (ifValue hasRequests \_ -> changed)] @! ())
where
......
......@@ -43,10 +43,10 @@ where
changeTask handleValue value
= handleValue value @? const NoValue
proxyTask :: (sds () (TaskValue a) (TaskValue a)) (*IWorld -> *IWorld) -> (Task a) | iTask a & RWShared sds
proxyTask :: (Shared sds (TaskValue a)) (*IWorld -> *IWorld) -> (Task a) | iTask a & RWShared sds
proxyTask value_share onDestroy = Task (eval value_share)
where
eval :: (sds () (TaskValue a) (TaskValue a)) Event TaskEvalOpts TaskTree *IWorld -> *(!TaskResult a, !*IWorld) | iTask a & RWShared sds
eval :: (Shared sds (TaskValue a)) Event TaskEvalOpts TaskTree *IWorld -> *(!TaskResult a, !*IWorld) | iTask a & RWShared sds
eval value_share event evalOpts tree=:(TCInit taskId ts) iworld
# (val,iworld) = readRegister taskId value_share iworld
= case val of
......@@ -64,7 +64,7 @@ taskValueShare taskid = sdsFocus store_name (memoryStore store_name (Just NoValu
where
store_name = "taskValueShare_" +++ (toString taskid)
customEval :: (sds () (TaskValue a) (TaskValue a)) (Task a) -> (Task a) | iTask a & RWShared sds
customEval :: (Shared sds (TaskValue a)) (Task a) -> (Task a) | iTask a & RWShared sds
customEval value_share (Task eval) = Task eval`
where
eval` event evalOpts state iworld
......
......@@ -136,7 +136,7 @@ where
(Just (id, reqs)) -> (Just (id, [request:reqs]))
Nothing -> Nothing
process :: (sds () InstanceServerShare InstanceServerShare) -> Task () | RWShared sds
process :: (Shared sds InstanceServerShare) -> Task () | RWShared sds
process share
= forever (watch share >>* [OnValue (ifValue hasRequests \_ -> changed)] @! ())
where
......@@ -497,7 +497,7 @@ where
onDisconnect state share
= (Ok state, Just share)
process :: (sds () ClientShare ClientShare) Int -> Task () | RWShared sds
process :: (Shared sds ClientShare) Int -> Task () | RWShared sds
process share clientId
= forever (watch share >>* [OnValue (ifValue hasRequests \_ -> changed)] @! ())
where
......@@ -590,7 +590,7 @@ sendDistributedInstance _ task attributes domain
>>- \clientId -> upd (\s=:{ClientShare|responses=or} -> {ClientShare| s & responses = or ++ ["instance add " +++ (toString id) +++ " " +++ (serializeToBase64 (Remote_Task task attributes id))]}) (instanceClientShare (fromMaybe 0 clientId))
>>| proxyTask valueShare (onDestroy id (instanceClientShare (fromMaybe 0 clientId)))
where
onDestroy :: InstanceNo (sds () ClientShare ClientShare) *IWorld -> *IWorld | RWShared sds
onDestroy :: InstanceNo (Shared sds ClientShare) *IWorld -> *IWorld | RWShared sds
onDestroy id share iworld
# (error,iworld) = modify (\s=:{ClientShare|responses=or} ->{ClientShare| s & responses = or ++ ["instance destory " +++ (toString id)]}) share EmptyContext iworld
= iworld
......@@ -619,7 +619,7 @@ wrapperTask instanceno clientId
>>- \task -> case deserializeFromBase64 task symbols of
(Remote_Task task _ _) = evalRemoteTask task (valueChange instanceno) @! ())
where
loadTask :: InstanceNo Bool (sds () String String) -> Task String | RWShared sds
loadTask :: InstanceNo Bool (Shared sds String) -> Task String | RWShared sds
loadTask instanceno force shared
= viewInformation "Loading task" [] "Please wait, the task is loaded ..."
||- (addWrapperTaskHandler instanceno (handlerTask shared)
......@@ -627,10 +627,10 @@ where
>>| (watch shared >>* [OnValue (ifValue (\v -> not (v == "")) return)])
) >>- \result -> if (result=="ASSIGNED") (assinged instanceno shared) (return result)
handlerTask :: (sds () String String) String -> Task () | RWShared sds
handlerTask :: (Shared sds String) String -> Task () | RWShared sds
handlerTask shared data = set data shared @! ()
assinged :: InstanceNo (sds () String String) -> Task String | RWShared sds
assinged :: InstanceNo (Shared sds String) -> Task String | RWShared sds
assinged instanceno shared
= viewInformation "Task is assigned to another node" []
"You can takeover the task. Please take in mind that the progress at the other device maybe lost."
......
......@@ -475,7 +475,7 @@ where
= ConnectionInstance opts channel
addIOTask :: !TaskId
!(sds () Dynamic Dynamic)
!(Shared sds Dynamic)
!(*IWorld -> (!MaybeErrorString (!initInfo, !.ioChannels), !*IWorld))
!(IOTaskOperations .ioChannels readData closeInfo)
!(ConnectionId initInfo Dynamic *IWorld -> (!MaybeErrorString Dynamic, !Maybe Dynamic, ![String], !Bool, !*IWorld))
......@@ -577,4 +577,4 @@ ioStateString ioStates
where
cMapString (IOActive mapje) = concat (map ((\s. s +++ " ") o toString o fst) ('DM'.toList mapje))
cMapString (IOException str) = "Exception: " +++ str
cMapString _ = "Destroyed"
\ No newline at end of file
cMapString _ = "Destroyed"
......@@ -305,7 +305,7 @@ acceptAndViewTonicTraces
||-
viewSharedInformation "Logged traces" [] tonicServerShare @! ()
acceptTonicTraces :: !(sds () TMessageStore TMessageStore) -> Task [ServerState] | RWShared sds
acceptTonicTraces :: !(Shared sds TMessageStore) -> Task [ServerState] | RWShared sds
acceptTonicTraces tonicShare
= tcplisten 9000 True tonicShare { ConnectionHandlers
| onConnect = onConnect
......
......@@ -129,14 +129,14 @@ taskListItemProgress :: !(SharedTaskList a) -> SDSLens (Either Int TaskId) Insta
/**
* Convenience lens for lookups in Maps. Returns Nothing on a missing key.
*/
mapMaybeLens :: !String !(sds () (Map a b) (Map a b)) -> SDSLens a (Maybe b) b | < a & == a & TC a & TC b & RWShared sds
mapMaybeLens :: !String !(Shared sds (Map a b)) -> SDSLens a (Maybe b) b | < a & == a & TC a & TC b & RWShared sds
/**
* Convenience lens for lookups in Maps. Can use a default value on a missing key, gives an error if no default is supplied.
*/
mapLens :: !String !(sds () (Map a b) (Map a b)) !(Maybe b) -> SDSLens a b b | < a & == a & TC a & TC b & RWShared sds
mapLens :: !String !(Shared sds (Map a b)) !(Maybe b) -> SDSLens a b b | < a & == a & TC a & TC b & RWShared sds
/**
* Convenience lens for lookups in IntMaps. Can use a default value on a missing key, gives an error if no default is supplied.
*/
intMapLens :: !String !(sds () (IntMap a) (IntMap a)) !(Maybe a) -> SDSLens Int a a | TC a & RWShared sds
intMapLens :: !String !(Shared sds (IntMap a)) !(Maybe a) -> SDSLens Int a a | TC a & RWShared sds
......@@ -201,7 +201,7 @@ where
[p:_] = Ok p
_ = Error (exception "taskListItemProgress: item not found")
mapMaybeLens :: !String !(sds () (Map a b) (Map a b)) -> SDSLens a (Maybe b) b | < a & == a & TC a & TC b & RWShared sds
mapMaybeLens :: !String !(Shared sds (Map a b)) -> SDSLens a (Maybe b) b | < a & == a & TC a & TC b & RWShared sds
mapMaybeLens name origShare = sdsLens name (const ()) (SDSRead read) (SDSWrite write) (SDSNotify notify) (Just reducer) origShare
where
read :: !a !(Map a b) -> MaybeError TaskException (Maybe b) | < a & == a
......@@ -216,7 +216,7 @@ where
reducer p map = case 'DM'.get p map of
(Just r) = Ok r
mapLens :: !String !(sds () (Map a b) (Map a b)) !(Maybe b) -> SDSLens a b b | < a & == a & TC a & TC b & RWShared sds
mapLens :: !String !(Shared sds (Map a b)) !(Maybe b) -> SDSLens a b b | < a & == a & TC a & TC b & RWShared sds
mapLens name origShare mdef = sdsLens name (const ()) (SDSRead (read mdef)) (SDSWrite write) (SDSNotify notify) (Just reducer) origShare
where
read :: !(Maybe b) !a !(Map a b) -> MaybeError TaskException b | < a & == a
......@@ -238,7 +238,7 @@ mapLens name origShare mdef = sdsLens name (const ()) (SDSRead (read mdef)) (SDS
Just b = Ok b
Nothing = Error (exception (name +++ " (mapLens): Index not found"))
intMapLens :: !String !(sds () (IntMap a) (IntMap a)) !(Maybe a) -> SDSLens Int a a | TC a & RWShared sds
intMapLens :: !String !(Shared sds (IntMap a)) !(Maybe a) -> SDSLens Int a a | TC a & RWShared sds
intMapLens name origShare mdef = sdsLens name (const ()) (SDSRead (read mdef)) (SDSWrite write) (SDSNotify notify) (Just (reducer mdef)) origShare
where
read :: !(Maybe a) !Int !(IntMap a) -> MaybeError TaskException a
......
......@@ -30,7 +30,7 @@ from Data.Error import :: MaybeError, :: MaybeErrorString
* @param Pseudotty settings
* @result Task returning the exit code on termination
*/
externalProcess :: !Timespec !FilePath ![String] !(Maybe FilePath) !(Maybe ProcessPtyOptions) !(sds1 () [String] [String]) !(sds2 () ([String], [String]) ([String], [String])) -> Task Int | RWShared sds1 & RWShared sds2
externalProcess :: !Timespec !FilePath ![String] !(Maybe FilePath) !(Maybe ProcessPtyOptions) !(Shared sds1 [String]) !(Shared sds2 ([String], [String])) -> Task Int | RWShared sds1 & RWShared sds2
/**
* Connect to an external system using TCP. This task's value becomes stable when the connection is closed
......
......@@ -38,7 +38,7 @@ liftOSErr f iw = case (liftIWorld f) iw of
(Error (_, e), iw) = (Error (exception e), iw)
(Ok a, iw) = (Ok a, iw)
externalProcess :: !Timespec !FilePath ![String] !(Maybe FilePath) !(Maybe ProcessPtyOptions) !(sds1 () [String] [String]) !(sds2 () ([String], [String]) ([String], [String])) -> Task Int | RWShared sds1 & RWShared sds2
externalProcess :: !Timespec !FilePath ![String] !(Maybe FilePath) !(Maybe ProcessPtyOptions) !(Shared sds1 [String]) !(Shared sds2 ([String], [String])) -> Task Int | RWShared sds1 & RWShared sds2
externalProcess poll cmd args dir mopts sdsin sdsout = Task eval
where
fjson = mb2error (exception "Corrupt taskstate") o fromDeferredJSON
......
......@@ -113,10 +113,10 @@ editSelection :: !d !Bool !(SelectOption c a) c [Int] -> Task [a] | toPrompt d &
editSelectionWithShared :: !d !Bool !(SelectOption c a) (sds () c w) (c -> [Int]) -> Task [a] | toPrompt d & iTask c & iTask a & TC w & RWShared sds
//Options: local, selection: shared
editSharedSelection :: !d !Bool !(SelectOption c a) c (sds () [Int] [Int]) -> Task [a] | toPrompt d & iTask c & iTask a & RWShared sds