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

Dynamic switching events #180

Open
pepeiborra opened this issue May 1, 2017 · 3 comments
Open

Dynamic switching events #180

pepeiborra opened this issue May 1, 2017 · 3 comments

Comments

@pepeiborra
Copy link
Contributor

The switchE :: Event(Event a) -> m (Event a) operation provided by reactive-banana is missing in threepenny. A while ago this question came up in stackoverflow.com and you mentioned plans to implement it in threepenny, or unify threepenny and reactive-banana. Are you still planning to do this ?

I am writing a library of composable algebraic editors, and this comes up in trying to define the editor for a union type.

@HeinrichApfelmus
Copy link
Owner

Yes, I'm still planning to do replace the FRP implementation in Reactive.Threepenny and use Reactive.Banana instead. The reason I haven't done this yet is that Threepenny requires one or two weird primitives (e.g. for making domEvent a pure function) that are not present in Reactive.Banana yet.

@pepeiborra
Copy link
Contributor Author

Would you accept contributions ? If there was a dev branch and a set of guidelines I might be able to help.

@HeinrichApfelmus
Copy link
Owner

Sure, I'm happy to receive contributions! 😄

I used to have a develop branch, but many people just submitted pull requests against master, so I learned to make this work. So, just submit to master if you like.

Since the project is still relatively small, I didn't make any formal guidelines. Use your best judgement; I usually review submitted code and give feedback.

That said, for this particular issue, it's probably fastest if I do the changes myself. The inner workings of reactive-banana are fairly complex and implementing the first missing primitive (Something similar to newEventsNamed in Reactive.Threepenny) relies on unsafePerformIO, which has all sort of unintended side effects (heh). The second missing primitive is about whether the UI monad can be stacked on top of MomentIO or whether a different solution is needed.

I intend to tackle these as I find free time; sorry that the state of FRP affairs in Threepenny is currently something unsatisfying.

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

No branches or pull requests

2 participants