-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement reactive polymorphism. #8
Comments
Really this could be more generally any kind of "functorial" polymorphism. |
One question I have about this is: When would this be applicable? Does this also apply to IO (and any other monad/functor), or would it only be for specified cases? |
It might make sense to use a special syntax for this. e.x. Thus, this might be a slightly different syntax, but essentially the same idea as idiom brackets from Idris. It would also work pretty similarly to how |
We may be able to make the So we may require something like |
Maybe to deal with ambiguities, we could also borrow a page from [monad-name] { block where ! can be used to bind } So in the reactive UI example, this might look something like: UI = Column {
count <- state 0
btn <- Button "Click me!"
when btn.clicked {
count := count + 1
}
Text $ State { "You clicked me $count times!" }
} So maybe not as nice as I originally imagined for this, but I think this is less ambigious, and still less clunky than explicit binds/maps. This would also be more similar to idiom notation, as we have explicit blocks. |
No description provided.
The text was updated successfully, but these errors were encountered: