Open
Description
Any chance we can get something similar to
data Step a = PureStep a | EffectStep (Effect a) | AffStep (Aff a)
deconstruct :: forall a. Aff a -> Step a
Examples:
deconstruct (pure 5) -- returns (PureStep 5)
deconstruct (liftEffect (log "hello world")) -- returns (EffectStep ...)
Not sure about the names. But there are incidents when I'd like to be able to take a peek at Aff a. And whether I can take advantage of JS' single threaded runtime if it turns out that the Aff is just Effect.
I can try to implement this if this change is welcome - and if it's possible.
Metadata
Metadata
Assignees
Labels
No labels