Skip to content

Commit d910fe8

Browse files
committed
wip
1 parent c4fd9f3 commit d910fe8

File tree

1 file changed

+4
-0
lines changed
  • ghcjs/miso-functora/src/Functora/Miso

1 file changed

+4
-0
lines changed

ghcjs/miso-functora/src/Functora/Miso/Types.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,11 +542,15 @@ data OpenedOrClosed
542542
data Update model
543543
= PureUpdate (model -> model)
544544
| ImpureUpdate (JSM (model -> model))
545+
| EffectUpdate (JSM ())
545546
| PureAndImpureUpdate (model -> model) (JSM (model -> model))
547+
| PureAndEffectUpdate (model -> model) (JSM ())
546548
deriving stock (Generic)
547549

548550
evalUpdate :: model -> Update model -> JSM model
549551
evalUpdate x = \case
550552
PureUpdate f -> pure $ f x
551553
ImpureUpdate g -> g >>= pure . ($ x)
554+
EffectUpdate e -> e >> pure x
552555
PureAndImpureUpdate f g -> g >>= pure . ($ f x)
556+
PureAndEffectUpdate f e -> e >> pure (f x)

0 commit comments

Comments
 (0)