Commit 2d1922d9 authored by Haye Böhm's avatar Haye Böhm

Fix tests

parent e4ce0543
Pipeline #13727 failed with stage
in 1 minute and 32 seconds
......@@ -44,12 +44,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] (Shared [b]) -> Task [b] | iTask a & iTask b
startChats :: (Task a) (User a -> Task b) [User] (sds () [b] [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) (Shared [b]) -> Task () | iTask a & iTask b
chatWith :: User (Task a) (User a -> Task b) (sds () [b] [b]) -> Task () | iTask a & iTask b & RWShared sds
chatWith me enter update chatStore
= viewSharedInformation ("Chat History:") [] chatStore
||-
......
......@@ -71,7 +71,6 @@ where
makeTable
= [{users = [], date = date} \\ date <- dates]
askAll :: (Shared [MeetingOption]) -> Task MeetingOption
askAll table
= allTasks[(user, purpose) @: checkOptions (toString user) \\ user <- others]
>>- \_ -> enterChoiceWithShared "Select the date for the meeting:" [ChooseFromGrid id] table
......
......@@ -59,12 +59,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] (Shared [b]) -> Task [b] | iTask a & iTask b
startChats :: (Task a) (User a -> Task b) [User] (sds () [b] [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) (Shared [b]) -> Task () | iTask a & iTask b
chatWith :: User (Task a) (User a -> Task b) (sds () [b] [b]) -> Task () | iTask a & iTask b & RWShared sds
chatWith me enter update chatStore
= viewSharedInformation ("Chat History:") [] chatStore
||-
......
......@@ -33,11 +33,11 @@ editWithStatistics
>>* [ OnAction (Action "Quit") (always (return ()))
]
editFile :: String (Shared String) -> Task ()
editFile :: String (sds () String String) -> Task () | RWShared sds
editFile fileName sharedFile
= updateSharedInformation ("edit " +++ fileName) [UpdateUsing id (const id) textArea] sharedFile @! ()
showStatistics :: (Shared String) -> Task ()
showStatistics :: (sds () String String) -> Task () | RWShared sds
showStatistics sharedFile = viewSharedInformation "Statistics:" [ViewAs stat] sharedFile @! ()
where
stat text = {lineCount = lengthLines text, wordCount = lengthWords text}
......@@ -48,7 +48,7 @@ where
lengthWords "" = 0
lengthWords text = length (split " " (replaceSubString "\n" " " text))
replace :: Replace (Shared String) -> Task ()
replace :: Replace (sds () String String) -> Task () | RWShared sds
replace cmnd sharedFile
= ( updateInformation "Replace:" [] cmnd
>>* [ OnAction (Action "Replace") (hasValue substitute)
......
......@@ -50,7 +50,7 @@ proxyTask value_share onDestroy = Task eval
# (val,iworld) = readRegister taskId value_share iworld
= case val of
// TODO: Fix
//Ok (ReadResult val _) = (ValueResult val {TaskEvalInfo|lastEvent=ts,removedTasks=[],refreshSensitive=True} (rep event) tree, iworld)
Ok (ReadResult val _) = (ValueResult val {TaskEvalInfo|lastEvent=ts,removedTasks=[],refreshSensitive=True} (rep event) tree, iworld)
Error e = (ExceptionResult e,iworld)
eval event repAs (TCDestroy _) iworld
# iworld = onDestroy iworld
......
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