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

Should we deprecate MonadHold (SpiderHost x)? #426

Open
ryantrinkle opened this issue May 14, 2020 · 0 comments
Open

Should we deprecate MonadHold (SpiderHost x)? #426

ryantrinkle opened this issue May 14, 2020 · 0 comments
Labels

Comments

@ryantrinkle
Copy link
Member

Currently, MonadHold does not have documented laws, but there are some laws people might intuitively expect. For instance:

do a <- hold x y
   b <- hold x y

One may expect a and b to be equivalent, but in SpiderHost's instance, it's possible for a frame to occur in between those two lines.

This is even clearer in the case of:

e <- now
b <- hold 0 (1 <$ e)

In most MonadHold instances, b will definitely change to value 1. In SpiderHost, it will always be 0, because the now will finish firing before the hold executes.

I'm not fully convinced that MonadHold (SpiderHost x) is useful, and it may be better not to have it.

@3noch 3noch added the question label May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants