Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to deconstruct Aff to either Pure or Effect #197

Open
jvliwanag opened this issue Dec 17, 2020 · 0 comments
Open

Attempt to deconstruct Aff to either Pure or Effect #197

jvliwanag opened this issue Dec 17, 2020 · 0 comments

Comments

@jvliwanag
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant