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

Provide IO a -> Canvas a #81

Closed
nomeata opened this issue Aug 10, 2016 · 3 comments
Closed

Provide IO a -> Canvas a #81

nomeata opened this issue Aug 10, 2016 · 3 comments

Comments

@nomeata
Copy link
Contributor

nomeata commented Aug 10, 2016

This is obviously not something to be exported by the main module, but for some tasks, it is necessary to do (local) IO in the Canvas monad.

Would it be possible to implement ioToCanvas :: IO a -> Canvas a, exported via some .Internal module maybe?

@nomeata
Copy link
Contributor Author

nomeata commented Aug 10, 2016

Things I want to do here are:

  • Waiting for a certain amount of time
  • Getting the current time
  • Reading and writing MVars

The former two might not be needed if #18 is implemented, but in general, there is always a chance that something is missing from a too-abstract interface.

@nomeata
Copy link
Contributor Author

nomeata commented Aug 10, 2016

Nevermind, I think I am being stupid here.

@nomeata nomeata closed this as completed Aug 10, 2016
@andygill
Copy link
Member

We had this at some point. There are pros and cons. We decided to remove it, because it clarifies what Canvas can actually do - talk to the browser.

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

No branches or pull requests

2 participants