Just as we have both switchHold and switchHoldPromptly, I think we need mergeGPromptly over mergeG.
processRequestIntMap' ::
forall t m req resp.
(Reflex t, MonadFix m, MonadHold t m, Adjustable t m) =>
Event t (IntMap (m (Event t (Some resp)))) ->
Event t (RequesterData req) ->
m (Event t (IntMap (Some req)), Event t (RequesterData resp))
processRequestIntMap' eOutResp' eReq = mdo
(eInReq, eOutResp) <-
matchResponseMapWithRequests
encdecSome
eReq
eInResp
let eInResp = pushAlways pure $ mergeIntMapIncremental iAdjusted
iAdjusted <- holdIncremental initial ePatch
(initial, ePatch) <-
traverseIntMapWithKeyWithAdjust
(\k v -> v)
mempty
( ( ffor eInResp (fmap (const Nothing))
<> (fmap Just <$> eOutResp')
)
`ffor` PatchIntMap
)
pure (eInReq, eOutResp)
I'm writing such a function and the usage of mergeIntMapIncremental creates a problem that the prompt response is not handled properly. I add delay 0 as a workaround to fix this issue for now. If we have such function mergeIntMapIncrementalPromptly, then it will work without the workaround.
It's related to #508 and #505
Just as we have both
switchHoldandswitchHoldPromptly, I think we needmergeGPromptlyovermergeG.I'm writing such a function and the usage of
mergeIntMapIncrementalcreates a problem that the prompt response is not handled properly. I adddelay 0as a workaround to fix this issue for now. If we have such functionmergeIntMapIncrementalPromptly, then it will work without the workaround.It's related to #508 and #505