We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4fd9f3 commit d910fe8Copy full SHA for d910fe8
ghcjs/miso-functora/src/Functora/Miso/Types.hs
@@ -542,11 +542,15 @@ data OpenedOrClosed
542
data Update model
543
= PureUpdate (model -> model)
544
| ImpureUpdate (JSM (model -> model))
545
+ | EffectUpdate (JSM ())
546
| PureAndImpureUpdate (model -> model) (JSM (model -> model))
547
+ | PureAndEffectUpdate (model -> model) (JSM ())
548
deriving stock (Generic)
549
550
evalUpdate :: model -> Update model -> JSM model
551
evalUpdate x = \case
552
PureUpdate f -> pure $ f x
553
ImpureUpdate g -> g >>= pure . ($ x)
554
+ EffectUpdate e -> e >> pure x
555
PureAndImpureUpdate f g -> g >>= pure . ($ f x)
556
+ PureAndEffectUpdate f e -> e >> pure (f x)
0 commit comments