Commit 0f6877bd authored by Bas Lijnse's avatar Bas Lijnse

Removed code duplication between interactR and interactRW

parent 505da5b3
Pipeline #20706 failed with stage
in 2 minutes and 58 seconds
......@@ -85,6 +85,9 @@ instance toString OSException
/**
* Core interaction task. All other interaction tasks are derived from this one.
* There are two almost identical versions:
* The `interactRW` version can update the given sds.
* The `interactR` version only reads, which means it can also be used for sds's that are not writable.
*/
:: InteractionHandlers l r w v =
{ onInit :: !(r -> (!l, !EditMode v))
......@@ -92,9 +95,7 @@ instance toString OSException
, onRefresh :: !(r l (Maybe v) -> (!l, !v, !Maybe (r -> w)))
}
//Version which does not write shared data
interactR :: !d (sds () r w) (InteractionHandlers l r w v) (Editor v) -> Task (l,v) | toPrompt d & iTask l & iTask r & iTask v & TC r & TC w & Registrable sds
//Version which writes shared data
//Version which can write shared data
interactRW :: !d !(sds () r w) (InteractionHandlers l r w v) (Editor v) -> Task (l,v) | toPrompt d & iTask l & iTask r & iTask v & TC r & TC w & RWShared sds
//Version which does not write shared data
interactR :: !d (sds () r w) (InteractionHandlers l r w v) (Editor v) -> Task (l,v) | toPrompt d & iTask l & iTask r & iTask v & TC r & TC w & Registrable sds
This diff is collapsed.
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